]> granicus.if.org Git - clang/commit
Ignore trailing NullStmts in StmtExprs for GCC compatibility.
authorAaron Ballman <aaron@aaronballman.com>
Tue, 9 Jul 2019 15:02:07 +0000 (15:02 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 9 Jul 2019 15:02:07 +0000 (15:02 +0000)
commit2d1a4169141e3a2f10a58a9ca59deb781ca17ec5
tree527453420cb56ebb4dabefea55da1ec348784c48
parent7657c2181292fb1563256f27fe9620fc0d73ab53
Ignore trailing NullStmts in StmtExprs for GCC compatibility.

Ignore trailing NullStmts in compound expressions when determining the result type and value. This is to match the GCC behavior which ignores semicolons at the end of compound expressions.

Patch by Dominic Ferreira.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365498 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Stmt.h
lib/CodeGen/CGStmt.cpp
lib/Parse/ParseStmt.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/TreeTransform.h
test/AST/ast-dump-stmt.c
test/CodeGen/exprs.c
test/Sema/statements.c
test/SemaCXX/statements.cpp