aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-20 02:04:01 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-20 02:04:01 +0000
commit44aa1f397855f130e88e62ffc1029f7f83bb5d2e (patch)
treec6d1de9b78b047e771056e04fb99c703752f3e6c /lib/Sema/TreeTransform.h
parent7663f396651716c82280f8fdcf97ad8e27c1ce5a (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/Sema/TreeTransform.h')
-rw-r--r--lib/Sema/TreeTransform.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index 3ae4e5c5f4..807346c4c5 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -772,11 +772,9 @@ public:
/// By default, performs semantic analysis to build the new statement.
/// Subclasses may override this routine to provide different behavior.
StmtResult RebuildIfStmt(SourceLocation IfLoc, Sema::FullExprArg Cond,
- VarDecl *CondVar, Stmt *Then,
- bool MacroExpandedInThenStmt,
+ VarDecl *CondVar, Stmt *Then,
SourceLocation ElseLoc, Stmt *Else) {
- return getSema().ActOnIfStmt(IfLoc, Cond, CondVar, Then,
- MacroExpandedInThenStmt, ElseLoc, Else);
+ return getSema().ActOnIfStmt(IfLoc, Cond, CondVar, Then, ElseLoc, Else);
}
/// \brief Start building a new switch statement.
@@ -3694,7 +3692,7 @@ TreeTransform<Derived>::TransformIfStmt(IfStmt *S) {
return SemaRef.Owned(S);
return getDerived().RebuildIfStmt(S->getIfLoc(), FullCond, ConditionVar,
- Then.get(), S->hasMacroExpandedInThenStmt(),
+ Then.get(),
S->getElseLoc(), Else.get());
}