aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-02-09 08:42:57 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-02-09 08:42:57 +0000
commit086eb9f93eadbc63a12770e3457dfe2c6d8f7c30 (patch)
treea49741d453bfa081d689f00e18da5d26810ca74c
parentf8c7fdbfc6854a11f0823dd11514af5a8d759aff (diff)
Non-void functions need to return some value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125185 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AST/Stmt.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index 92af03a542..66182957d6 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -91,15 +91,23 @@ namespace {
// 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) {}
+ static inline good is_good(good) { return 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::*) {
+ return good();
+ }
+ static inline bad implements_children(children_t Stmt::*) {
+ return bad();
+ }
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::*) {
+ return good();
+ }
+ static inline bad implements_getSourceRange(getSourceRange_t Stmt::*) {
+ return bad();
+ }
#define ASSERT_IMPLEMENTS_children(type) \
(void) sizeof(is_good(implements_children(&type::children)))