forked from OSchip/llvm-project
Don't "optimize" empty or unit compound exprs away.
llvm-svn: 39467
This commit is contained in:
parent
30d1fbc803
commit
3bbe7bed39
|
@ -23,12 +23,7 @@ using namespace clang;
|
|||
Action::StmtResult
|
||||
Sema::ParseCompoundStmt(SourceLocation L, SourceLocation R,
|
||||
StmtTy **Elts, unsigned NumElts) {
|
||||
if (NumElts > 1)
|
||||
return new CompoundStmt((Stmt**)Elts, NumElts);
|
||||
else if (NumElts == 1)
|
||||
return Elts[0]; // {stmt} -> stmt
|
||||
else
|
||||
return 0; // {} -> ;
|
||||
return new CompoundStmt((Stmt**)Elts, NumElts);
|
||||
}
|
||||
|
||||
Action::StmtResult
|
||||
|
|
|
@ -23,12 +23,7 @@ using namespace clang;
|
|||
Action::StmtResult
|
||||
Sema::ParseCompoundStmt(SourceLocation L, SourceLocation R,
|
||||
StmtTy **Elts, unsigned NumElts) {
|
||||
if (NumElts > 1)
|
||||
return new CompoundStmt((Stmt**)Elts, NumElts);
|
||||
else if (NumElts == 1)
|
||||
return Elts[0]; // {stmt} -> stmt
|
||||
else
|
||||
return 0; // {} -> ;
|
||||
return new CompoundStmt((Stmt**)Elts, NumElts);
|
||||
}
|
||||
|
||||
Action::StmtResult
|
||||
|
|
Loading…
Reference in New Issue