diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-20 02:04:01 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-20 02:04:01 +0000 |
commit | 44aa1f397855f130e88e62ffc1029f7f83bb5d2e (patch) | |
tree | c6d1de9b78b047e771056e04fb99c703752f3e6c /lib/AST/Stmt.cpp | |
parent | 7663f396651716c82280f8fdcf97ad8e27c1ce5a (diff) |
Revert r119838 "Don't warn for empty 'if' body if there is a macro that expands to nothing"
and use a better and more general approach, where NullStmt has a flag to indicate whether it was preceded by an empty macro.
Thanks to Abramo Bagnara for the hint!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Stmt.cpp')
-rw-r--r-- | lib/AST/Stmt.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index 85e640701b..acd77beaca 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -470,10 +470,8 @@ CXXTryStmt::CXXTryStmt(SourceLocation tryLoc, Stmt *tryBlock, } IfStmt::IfStmt(ASTContext &C, SourceLocation IL, VarDecl *var, Expr *cond, - Stmt *then, SourceLocation EL, Stmt *elsev, - bool macroExpandedInThenStmt) - : Stmt(IfStmtClass), IfLoc(IL), ElseLoc(EL), - MacroExpandedInThenStmt(macroExpandedInThenStmt) + Stmt *then, SourceLocation EL, Stmt *elsev) + : Stmt(IfStmtClass), IfLoc(IL), ElseLoc(EL) { setConditionVariable(C, var); SubExprs[COND] = reinterpret_cast<Stmt*>(cond); |