[all-commits] [llvm/llvm-project] 27ea0c: [Parse] Use empty RecoveryExpr when if/while/do/sw...
Sam McCall via All-commits
all-commits at lists.llvm.org
Mon Jan 10 01:49:36 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 27ea0c4e7234f3b15cbbb696e6c408af7141f342
https://github.com/llvm/llvm-project/commit/27ea0c4e7234f3b15cbbb696e6c408af7141f342
Author: Sam McCall <sam.mccall at gmail.com>
Date: 2022-01-10 (Mon, 10 Jan 2022)
Changed paths:
M clang/include/clang/Parse/Parser.h
M clang/include/clang/Sema/Sema.h
M clang/lib/AST/ExprConstant.cpp
M clang/lib/Parse/ParseExprCXX.cpp
M clang/lib/Parse/ParseStmt.cpp
M clang/lib/Sema/SemaExpr.cpp
M clang/lib/Sema/SemaStmt.cpp
M clang/lib/Sema/TreeTransform.h
M clang/test/AST/ast-dump-invalid.cpp
A clang/test/AST/loop-recovery.cpp
M clang/test/Parser/cxx0x-attributes.cpp
M clang/test/Sema/complex-int.c
M clang/test/SemaCXX/condition.cpp
M clang/test/SemaCXX/constexpr-function-recovery-crash.cpp
Log Message:
-----------
[Parse] Use empty RecoveryExpr when if/while/do/switch conditions fail to parse
This allows the body to be parsed.
An special-case that would replace a missing if condition with OpaqueValueExpr
was removed as it's now redundant (unless recovery-expr is disabled).
For loops are not handled at this point, as the parsing is more complicated.
Differential Revision: https://reviews.llvm.org/D113752
More information about the All-commits
mailing list