summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/attr-no-sanitize-memory.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-05-20 14:10:53 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-05-20 14:10:53 +0000
commit981ba24156430e2d75ad50aefea941839f9ddc51 (patch)
tree4b3fd5e3a79968d5386677a5759ba0fd33736b81 /clang/test/SemaCXX/attr-no-sanitize-memory.cpp
parentcf5b09b5dc3c3ad2df1e9a4525ce35a8b9bb0ecf (diff)
downloadbcm5719-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-memory.cpp')
-rw-r--r--clang/test/SemaCXX/attr-no-sanitize-memory.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/SemaCXX/attr-no-sanitize-memory.cpp b/clang/test/SemaCXX/attr-no-sanitize-memory.cpp
index d6eca1b69dc..9cbcb03d6ec 100644
--- a/clang/test/SemaCXX/attr-no-sanitize-memory.cpp
+++ b/clang/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}}
OpenPOWER on IntegriCloud