summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Stmt.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-02-09 08:31:17 +0000
committerJohn McCall <rjmccall@apple.com>2011-02-09 08:31:17 +0000
commitf75152fb9f7d63de20a2065b60591e3ce34da265 (patch)
tree710c534b8a8121e33049fe4fcf8e3c558e34f378 /clang/lib/AST/Stmt.cpp
parentbd06678921615ad90caed466e011bd928261b22b (diff)
downloadbcm5719-llvm-f75152fb9f7d63de20a2065b60591e3ce34da265.tar.gz
bcm5719-llvm-f75152fb9f7d63de20a2065b60591e3ce34da265.zip
Give these little helper functions definitions so that newer gccs stop
complaining. llvm-svn: 125184
Diffstat (limited to 'clang/lib/AST/Stmt.cpp')
-rw-r--r--clang/lib/AST/Stmt.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp
index b4abd05d689..92af03a5421 100644
--- a/clang/lib/AST/Stmt.cpp
+++ b/clang/lib/AST/Stmt.cpp
@@ -87,15 +87,19 @@ bool Stmt::CollectingStats(bool Enable) {
namespace {
struct good {};
struct bad {};
- static inline good is_good(good); // static inline to suppress unused warning
+
+ // These silly little functions have to be static inline to suppress
+ // unused warnings, and they have to be defined to suppress other
+ // warnings.
+ static inline good is_good(good) {}
typedef Stmt::child_range children_t();
- template <class T> good implements_children(children_t T::*);
- static inline bad implements_children(children_t Stmt::*);
+ template <class T> good implements_children(children_t T::*) {}
+ static inline bad implements_children(children_t Stmt::*) {}
typedef SourceRange getSourceRange_t() const;
- template <class T> good implements_getSourceRange(getSourceRange_t T::*);
- static inline bad implements_getSourceRange(getSourceRange_t Stmt::*);
+ template <class T> good implements_getSourceRange(getSourceRange_t T::*) {}
+ static inline bad implements_getSourceRange(getSourceRange_t Stmt::*) {}
#define ASSERT_IMPLEMENTS_children(type) \
(void) sizeof(is_good(implements_children(&type::children)))
OpenPOWER on IntegriCloud