diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2013-09-10 22:57:15 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2013-09-10 22:57:15 +0000 |
commit | dc41d791f9949f8674d8709b35c72ea1e4168ae9 (patch) | |
tree | a0b36083bf8b65b274b6addf04fa1cabb7b22954 /clang/lib/AST/Comment.cpp | |
parent | 1891f693238be703c46265520aa781c64ebe9e75 (diff) | |
download | llvm-dc41d791f9949f8674d8709b35c72ea1e4168ae9.zip llvm-dc41d791f9949f8674d8709b35c72ea1e4168ae9.tar.gz llvm-dc41d791f9949f8674d8709b35c72ea1e4168ae9.tar.bz2 |
Add unused markings to suppress warnings.
trunk clang is a bit more aggressive about emitting unused-declaration
warnings, so adjust some AST code to match. Specifically, use
LLVM_ATTRIBUTE_UNUSED for declarations which are never supposed to be
referenced, and turn references to declarations which are supposed to be
referenced into odr-uses.
llvm-svn: 190443
Diffstat (limited to 'clang/lib/AST/Comment.cpp')
-rw-r--r-- | clang/lib/AST/Comment.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/AST/Comment.cpp b/clang/lib/AST/Comment.cpp index 79cabdb..f24a23d 100644 --- a/clang/lib/AST/Comment.cpp +++ b/clang/lib/AST/Comment.cpp @@ -42,14 +42,16 @@ good implements_child_begin_end(Comment::child_iterator (T::*)() const) { return good(); } +LLVM_ATTRIBUTE_UNUSED static inline bad implements_child_begin_end( Comment::child_iterator (Comment::*)() const) { return bad(); } #define ASSERT_IMPLEMENTS_child_begin(function) \ - (void) sizeof(good(implements_child_begin_end(function))) + (void) good(implements_child_begin_end(function)) +LLVM_ATTRIBUTE_UNUSED static inline void CheckCommentASTNodes() { #define ABSTRACT_COMMENT(COMMENT) #define COMMENT(CLASS, PARENT) \ |