[PATCH] D119477: Ignore FullExpr when traversing cast sub-expressions
Kim Gräsman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 10 13:13:28 PST 2022
kimgr created this revision.
kimgr requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Full-expressions are Sema-generated implicit nodes that cover
constant-expressions and expressions-with-cleanup for temporaries.
Ignore those as part of implicit-ignore, and also remove too-aggressive
IgnoreImplicit (which includes nested ImplicitCastExprs, for example) on
unpacked sub-expressions.
Add some unittests to demonstrate that RecursiveASTVisitor sees through
ConstantExpr nodes correctly.
Adjust cxx2a-consteval test to cover diagnostics for nested consteval
expressions that were previously missed.
Fixes bug #53044.
Depends on D119476 <https://reviews.llvm.org/D119476>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119477
Files:
clang/lib/AST/Expr.cpp
clang/test/SemaCXX/cxx2a-consteval.cpp
clang/unittests/Tooling/CastExprTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119477.407658.patch
Type: text/x-patch
Size: 6471 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220210/943952cb/attachment.bin>
More information about the cfe-commits
mailing list