aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTReaderStmt.cpp
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/Serialization/ASTReaderStmt.cpp
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/Serialization/ASTReaderStmt.cpp')
-rw-r--r--lib/Serialization/ASTReaderStmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Serialization/ASTReaderStmt.cpp b/lib/Serialization/ASTReaderStmt.cpp
index a7b42cd3fc..5aba1f8ada 100644
--- a/lib/Serialization/ASTReaderStmt.cpp
+++ b/lib/Serialization/ASTReaderStmt.cpp
@@ -202,6 +202,7 @@ void ASTStmtReader::VisitStmt(Stmt *S) {
void ASTStmtReader::VisitNullStmt(NullStmt *S) {
VisitStmt(S);
S->setSemiLoc(ReadSourceLocation(Record, Idx));
+ S->LeadingEmptyMacro = Record[Idx++];
}
void ASTStmtReader::VisitCompoundStmt(CompoundStmt *S) {
@@ -256,7 +257,6 @@ void ASTStmtReader::VisitIfStmt(IfStmt *S) {
S->setElse(Reader.ReadSubStmt());
S->setIfLoc(ReadSourceLocation(Record, Idx));
S->setElseLoc(ReadSourceLocation(Record, Idx));
- S->MacroExpandedInThenStmt = Record[Idx++];
}
void ASTStmtReader::VisitSwitchStmt(SwitchStmt *S) {