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 | de2bdf637ed7f2ade02bebde801ee1a9fe3ea68d (patch) | |
tree | 3abece97fff722b40ebff9f6b3f76d12096fe583 /clang/lib/Serialization/ASTWriterStmt.cpp | |
parent | 9331ed89f8d3466c9389b7e9ef7b69c877ffbea2 (diff) | |
download | bcm5719-llvm-de2bdf637ed7f2ade02bebde801ee1a9fe3ea68d.tar.gz bcm5719-llvm-de2bdf637ed7f2ade02bebde801ee1a9fe3ea68d.zip |
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!
llvm-svn: 119887
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index a59b772da4e..4d2fb8a0301 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -171,6 +171,7 @@ void ASTStmtWriter::VisitStmt(Stmt *S) { void ASTStmtWriter::VisitNullStmt(NullStmt *S) { VisitStmt(S); Writer.AddSourceLocation(S->getSemiLoc(), Record); + Record.push_back(S->LeadingEmptyMacro); Code = serialization::STMT_NULL; } @@ -228,7 +229,6 @@ void ASTStmtWriter::VisitIfStmt(IfStmt *S) { Writer.AddStmt(S->getElse()); Writer.AddSourceLocation(S->getIfLoc(), Record); Writer.AddSourceLocation(S->getElseLoc(), Record); - Record.push_back(S->MacroExpandedInThenStmt); Code = serialization::STMT_IF; } |