// RUN: %clang_cc1 -fsyntax-only -verify -Wconsumed -std=c++11 %s
// FIXME: This test is here because the warning is issued by the Consumed
// analysis, not SemaDeclAttr. The analysis won't run after an error
// has been issued. Once the attribute propagation for template
// instantiation has been fixed, this can be moved somewhere else and the
// definition can be removed.
int ; // expected-warning {{return state set for an unconsumable type 'int'}}
int
;
int var0 ; // expected-warning {{'set_typestate' attribute only applies to functions}}
int var1 ; // expected-warning {{'test_typestate' attribute only applies to}}
int var2 ; // expected-warning {{'callable_when' attribute only applies to}}
int var3 ; // expected-warning {{'consumable' attribute only applies to classes}}
int var4 ; // expected-warning {{'return_typestate' attribute only applies to functions}}
void ; // expected-warning {{'set_typestate' attribute only applies to}}
void ; // expected-warning {{'test_typestate' attribute only applies to}}
void ; // expected-warning {{'callable_when' attribute only applies to}}
void ; // expected-warning {{'consumable' attribute only applies to classes}}
;
AttrTester1 ; // expected-warning {{'return_typestate' attribute argument not supported: 'not_a_state'}}
AttrTester1 ; // expected-error {{'return_typestate' attribute requires an identifier}}
void ;
;
; // expected-error {{'consumable' attribute requires an identifier}}
;