From de2bdf637ed7f2ade02bebde801ee1a9fe3ea68d Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sat, 20 Nov 2010 02:04:01 +0000 Subject: 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 --- clang/lib/Serialization/ASTReaderStmt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Serialization/ASTReaderStmt.cpp') diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index a7b42cd3fcf..5aba1f8ada7 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/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) { -- cgit v1.2.3