summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-consumed-parsing.cpp
diff options
context:
space:
mode:
authorChris Wailes <chris.wailes@gmail.com>2013-10-29 20:28:41 +0000
committerChris Wailes <chris.wailes@gmail.com>2013-10-29 20:28:41 +0000
commit9385f9f7c35404b423ba60e02bab56200d947de1 (patch)
treea50b98a0efcd0ba40248bfce27fbd024358a1376 /clang/test/SemaCXX/warn-consumed-parsing.cpp
parente8cd2fad0e690cc661a54defbcfee49a1ea6fcd1 (diff)
downloadbcm5719-llvm-9385f9f7c35404b423ba60e02bab56200d947de1.tar.gz
bcm5719-llvm-9385f9f7c35404b423ba60e02bab56200d947de1.zip
Changed tests_typestate to test_typestate for consistency.
llvm-svn: 193648
Diffstat (limited to 'clang/test/SemaCXX/warn-consumed-parsing.cpp')
-rw-r--r--clang/test/SemaCXX/warn-consumed-parsing.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/clang/test/SemaCXX/warn-consumed-parsing.cpp b/clang/test/SemaCXX/warn-consumed-parsing.cpp
index c1bc1078733..0a91636ea94 100644
--- a/clang/test/SemaCXX/warn-consumed-parsing.cpp
+++ b/clang/test/SemaCXX/warn-consumed-parsing.cpp
@@ -4,7 +4,7 @@
#define CONSUMABLE(state) __attribute__ ((consumable(state)))
#define SET_TYPESTATE(state) __attribute__ ((set_typestate(state)))
#define RETURN_TYPESTATE(state) __attribute__ ((return_typestate(state)))
-#define TESTS_TYPESTATE(state) __attribute__ ((tests_typestate(state)))
+#define TEST_TYPESTATE(state) __attribute__ ((test_typestate(state)))
// FIXME: This test is here because the warning is issued by the Consumed
// analysis, not SemaDeclAttr. The analysis won't run after an error
@@ -17,28 +17,28 @@ int returnTypestateForUnconsumable() {
}
class AttrTester0 {
- void consumes() __attribute__ ((set_typestate())); // expected-error {{attribute takes one argument}}
- bool testsUnconsumed() __attribute__ ((tests_typestate())); // expected-error {{attribute takes one argument}}
- void callableWhen() __attribute__ ((callable_when())); // expected-error {{attribute takes at least 1 argument}}
+ void consumes() __attribute__ ((set_typestate())); // expected-error {{attribute takes one argument}}
+ bool testUnconsumed() __attribute__ ((test_typestate())); // expected-error {{attribute takes one argument}}
+ void callableWhen() __attribute__ ((callable_when())); // expected-error {{attribute takes at least 1 argument}}
};
int var0 SET_TYPESTATE(consumed); // expected-warning {{'set_typestate' attribute only applies to methods}}
-int var1 TESTS_TYPESTATE(consumed); // expected-warning {{'tests_typestate' attribute only applies to methods}}
+int var1 TEST_TYPESTATE(consumed); // expected-warning {{'test_typestate' attribute only applies to methods}}
int var2 CALLABLE_WHEN("consumed"); // expected-warning {{'callable_when' attribute only applies to methods}}
int var3 CONSUMABLE(consumed); // expected-warning {{'consumable' attribute only applies to classes}}
int var4 RETURN_TYPESTATE(consumed); // expected-warning {{'return_typestate' attribute only applies to functions}}
void function0() SET_TYPESTATE(consumed); // expected-warning {{'set_typestate' attribute only applies to methods}}
-void function1() TESTS_TYPESTATE(consumed); // expected-warning {{'tests_typestate' attribute only applies to methods}}
+void function1() TEST_TYPESTATE(consumed); // expected-warning {{'test_typestate' attribute only applies to methods}}
void function2() CALLABLE_WHEN("consumed"); // expected-warning {{'callable_when' attribute only applies to methods}}
void function3() CONSUMABLE(consumed); // expected-warning {{'consumable' attribute only applies to classes}}
class CONSUMABLE(unknown) AttrTester1 {
- void callableWhen0() CALLABLE_WHEN("unconsumed");
- void callableWhen1() CALLABLE_WHEN(42); // expected-error {{'callable_when' attribute requires a string}}
- void callableWhen2() CALLABLE_WHEN("foo"); // expected-warning {{'callable_when' attribute argument not supported: foo}}
- void consumes() SET_TYPESTATE(consumed);
- bool testsUnconsumed() TESTS_TYPESTATE(consumed);
+ void callableWhen0() CALLABLE_WHEN("unconsumed");
+ void callableWhen1() CALLABLE_WHEN(42); // expected-error {{'callable_when' attribute requires a string}}
+ void callableWhen2() CALLABLE_WHEN("foo"); // expected-warning {{'callable_when' attribute argument not supported: foo}}
+ void consumes() SET_TYPESTATE(consumed);
+ bool testUnconsumed() TEST_TYPESTATE(consumed);
};
AttrTester1 returnTypestateTester0() RETURN_TYPESTATE(not_a_state); // expected-warning {{'return_typestate' attribute argument not supported: 'not_a_state'}}
@@ -47,9 +47,9 @@ AttrTester1 returnTypestateTester1() RETURN_TYPESTATE(42); // expected-error {{'
void returnTypestateTester2(AttrTester1 &Param RETURN_TYPESTATE(unconsumed));
class AttrTester2 {
- void callableWhen() CALLABLE_WHEN("unconsumed"); // expected-warning {{consumed analysis attribute is attached to member of class 'AttrTester2' which isn't marked as consumable}}
- void consumes() SET_TYPESTATE(consumed); // expected-warning {{consumed analysis attribute is attached to member of class 'AttrTester2' which isn't marked as consumable}}
- bool testsUnconsumed() TESTS_TYPESTATE(consumed); // expected-warning {{consumed analysis attribute is attached to member of class 'AttrTester2' which isn't marked as consumable}}
+ void callableWhen() CALLABLE_WHEN("unconsumed"); // expected-warning {{consumed analysis attribute is attached to member of class 'AttrTester2' which isn't marked as consumable}}
+ void consumes() SET_TYPESTATE(consumed); // expected-warning {{consumed analysis attribute is attached to member of class 'AttrTester2' which isn't marked as consumable}}
+ bool testUnconsumed() TEST_TYPESTATE(consumed); // expected-warning {{consumed analysis attribute is attached to member of class 'AttrTester2' which isn't marked as consumable}}
};
class CONSUMABLE(42) AttrTester3; // expected-error {{'consumable' attribute requires an identifier}}
OpenPOWER on IntegriCloud