diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-05-20 14:10:53 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-05-20 14:10:53 +0000 |
| commit | 981ba24156430e2d75ad50aefea941839f9ddc51 (patch) | |
| tree | 4b3fd5e3a79968d5386677a5759ba0fd33736b81 /clang/test/SemaCXX/attr-no-sanitize-thread.cpp | |
| parent | cf5b09b5dc3c3ad2df1e9a4525ce35a8b9bb0ecf (diff) | |
| download | bcm5719-llvm-981ba24156430e2d75ad50aefea941839f9ddc51.tar.gz bcm5719-llvm-981ba24156430e2d75ad50aefea941839f9ddc51.zip | |
None of these attributes require FunctionTemplate to be explicitly listed as part of their subject definition. FunctionTemplateDecls are not what the attribute appertains to in the first place -- it attaches to the underlying FunctionDecl.
The attribute emitter was using FunctionTemplate to map the diagnostic to "functions or methods", but that isn't a particularly clear diagnostic in these cases anyway (since they do not apply to ObjC methods). Updated the attribute emitter to remove custom logic for FunctionTemplateDecl, and updated the test cases for the change in diagnostic wording.
llvm-svn: 209209
Diffstat (limited to 'clang/test/SemaCXX/attr-no-sanitize-thread.cpp')
| -rw-r--r-- | clang/test/SemaCXX/attr-no-sanitize-thread.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/SemaCXX/attr-no-sanitize-thread.cpp b/clang/test/SemaCXX/attr-no-sanitize-thread.cpp index d6372bceff8..6cb9c715bf6 100644 --- a/clang/test/SemaCXX/attr-no-sanitize-thread.cpp +++ b/clang/test/SemaCXX/attr-no-sanitize-thread.cpp @@ -15,23 +15,23 @@ int noanal_testfn(int y) NO_SANITIZE_THREAD; int noanal_testfn(int y) { int x NO_SANITIZE_THREAD = y; // \ - // expected-error {{'no_sanitize_thread' attribute only applies to functions and methods}} + // expected-error {{'no_sanitize_thread' attribute only applies to functions}} return x; } int noanal_test_var NO_SANITIZE_THREAD; // \ - // expected-error {{'no_sanitize_thread' attribute only applies to functions and methods}} + // expected-error {{'no_sanitize_thread' attribute only applies to functions}} class NoanalFoo { private: int test_field NO_SANITIZE_THREAD; // \ - // expected-error {{'no_sanitize_thread' attribute only applies to functions and methods}} + // expected-error {{'no_sanitize_thread' attribute only applies to functions}} void test_method() NO_SANITIZE_THREAD; }; class NO_SANITIZE_THREAD NoanalTestClass { // \ - // expected-error {{'no_sanitize_thread' attribute only applies to functions and methods}} + // expected-error {{'no_sanitize_thread' attribute only applies to functions}} }; void noanal_fun_params(int lvar NO_SANITIZE_THREAD); // \ - // expected-error {{'no_sanitize_thread' attribute only applies to functions and methods}} + // expected-error {{'no_sanitize_thread' attribute only applies to functions}} |

