[all-commits] [llvm/llvm-project] 403d7d: Ignore FullExpr when traversing cast sub-expressions
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Mon Mar 21 12:06:41 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 403d7d8d7093d6637a006f8b3f75382294259d3f
https://github.com/llvm/llvm-project/commit/403d7d8d7093d6637a006f8b3f75382294259d3f
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2022-03-21 (Mon, 21 Mar 2022)
Changed paths:
M clang/lib/AST/Expr.cpp
M clang/test/SemaCXX/cxx2a-consteval.cpp
M clang/unittests/Tooling/CastExprTest.cpp
Log Message:
-----------
Ignore FullExpr when traversing cast sub-expressions
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.
More information about the All-commits
mailing list