diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-09-29 11:40:46 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-09-29 11:40:46 +0000 |
commit | 6743e0469914b34322efed11617574b394c91705 (patch) | |
tree | 69a104efe1f0507201f003bf061c217fdf08704e /clang/test/Sema/warn-documentation-fixits.cpp | |
parent | 903790eff54f473fca8fbf6915713751a070b5df (diff) | |
download | bcm5719-llvm-6743e0469914b34322efed11617574b394c91705.tar.gz bcm5719-llvm-6743e0469914b34322efed11617574b394c91705.zip |
Move the 'find macro by spelling' infrastructure to the Preprocessor class and
use it to suggest appropriate macro for __attribute__((deprecated)) in
-Wdocumentation-deprecated-sync.
llvm-svn: 164892
Diffstat (limited to 'clang/test/Sema/warn-documentation-fixits.cpp')
-rw-r--r-- | clang/test/Sema/warn-documentation-fixits.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Sema/warn-documentation-fixits.cpp b/clang/test/Sema/warn-documentation-fixits.cpp index 812d404e68d..a47b7763750 100644 --- a/clang/test/Sema/warn-documentation-fixits.cpp +++ b/clang/test/Sema/warn-documentation-fixits.cpp @@ -51,6 +51,12 @@ struct test_deprecated_6 { } }; +#define MY_ATTR_DEPRECATED __attribute__((deprecated)) + +// expected-warning@+1 {{declaration is marked with '\deprecated' command but does not have a deprecation attribute}} expected-note@+2 {{add a deprecation attribute to the declaration to silence this warning}} +/// \deprecated +void test_deprecated_9(int a); + // CHECK: fix-it:"{{.*}}":{5:12-5:22}:"a" // CHECK: fix-it:"{{.*}}":{9:12-9:15}:"aaa" // CHECK: fix-it:"{{.*}}":{13:13-13:23}:"T" @@ -61,4 +67,5 @@ struct test_deprecated_6 { // CHECK: fix-it:"{{.*}}":{38:27-38:27}:" __attribute__((deprecated))" // CHECK: fix-it:"{{.*}}":{46:27-46:27}:" __attribute__((deprecated))" // CHECK: fix-it:"{{.*}}":{50:27-50:27}:" __attribute__((deprecated))" +// CHECK: fix-it:"{{.*}}":{58:30-58:30}:" MY_ATTR_DEPRECATED" |