aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ObjectFile.cpp
diff options
context:
space:
mode:
authorzyn0217 <117258288+zyn0217@users.noreply.github.com>2023-10-04 04:45:46 -0500
committerGitHub <noreply@github.com>2023-10-04 04:45:46 -0500
commit077e1b892d9555c503b86d5361278aa999764884 (patch)
tree97d2b50f80ae90541e1afa9ed0b7a6b940fd610d /llvm/lib/Object/ObjectFile.cpp
parent73f8ec9edb52fa8312f65a66481ab02d73f85da3 (diff)
downloadllvm-077e1b892d9555c503b86d5361278aa999764884.zip
llvm-077e1b892d9555c503b86d5361278aa999764884.tar.gz
llvm-077e1b892d9555c503b86d5361278aa999764884.tar.bz2
[clang] Preserve UDL nodes in RemoveNestedImmediateInvocation (#66641)
D63960 performs a tree transformation on AST to prevent evaluating constant expressions eagerly by removing recorded immediate consteval invocations from subexpressions. (See https://reviews.llvm.org/D63960#inline-600736 for its motivation.) However, the UDL node has been replaced with a CallExpr in the default TreeTransform since ca844ab0 (inadvertently?). This confuses clangd as it relies on the exact AST node type to decide whether or not to present inlay hints for an expression. With regard to the fix, I think it's enough to return the UDL expression as-is during the transformation: We've bound it to temporary in its construction, and there's no ConstantExpr to visit under a UDL. Fixes https://github.com/llvm/llvm-project/issues/63898.
Diffstat (limited to 'llvm/lib/Object/ObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions