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 | 8a04753c6cdec5c45f84d38eaf33f9b6121b7d14 (patch) | |
tree | 9ba793d942261c192b1a39136d70fba42cae5073 /test/SemaCXX/attr-no-sanitize-memory.cpp | |
parent | b46eb10258c61d1253c6bdf64836ebbb73877d19 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/attr-no-sanitize-memory.cpp')
-rw-r--r-- | test/SemaCXX/attr-no-sanitize-memory.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/SemaCXX/attr-no-sanitize-memory.cpp b/test/SemaCXX/attr-no-sanitize-memory.cpp index d6eca1b69d..9cbcb03d6e 100644 --- a/test/SemaCXX/attr-no-sanitize-memory.cpp +++ b/test/SemaCXX/attr-no-sanitize-memory.cpp @@ -15,23 +15,23 @@ int noanal_testfn(int y) NO_SANITIZE_MEMORY; int noanal_testfn(int y) { int x NO_SANITIZE_MEMORY = y; // \ - // expected-error {{'no_sanitize_memory' attribute only applies to functions and methods}} + // expected-error {{'no_sanitize_memory' attribute only applies to functions}} return x; } int noanal_test_var NO_SANITIZE_MEMORY; // \ - // expected-error {{'no_sanitize_memory' attribute only applies to functions and methods}} + // expected-error {{'no_sanitize_memory' attribute only applies to functions}} class NoanalFoo { private: int test_field NO_SANITIZE_MEMORY; // \ - // expected-error {{'no_sanitize_memory' attribute only applies to functions and methods}} + // expected-error {{'no_sanitize_memory' attribute only applies to functions}} void test_method() NO_SANITIZE_MEMORY; }; class NO_SANITIZE_MEMORY NoanalTestClass { // \ - // expected-error {{'no_sanitize_memory' attribute only applies to functions and methods}} + // expected-error {{'no_sanitize_memory' attribute only applies to functions}} }; void noanal_fun_params(int lvar NO_SANITIZE_MEMORY); // \ - // expected-error {{'no_sanitize_memory' attribute only applies to functions and methods}} + // expected-error {{'no_sanitize_memory' attribute only applies to functions}} |