[clang] [libclang]Visit lambda init-capture as VarDeclaration (PR #174116)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 2 04:53:38 PST 2026
================
@@ -17,9 +17,9 @@ struct X {
// CHECK-LOAD: cxx14-lambdas.cpp:7:19: CallExpr= Extent=[7:19 - 9:6]
// CHECK-LOAD: cxx14-lambdas.cpp:7:19: UnexposedExpr= Extent=[7:19 - 9:6]
// CHECK-LOAD: cxx14-lambdas.cpp:7:19: LambdaExpr= Extent=[7:19 - 9:6]
-// CHECK-LOAD: cxx14-lambdas.cpp:7:20: VariableRef=ptr:7:20 Extent=[7:20 - 7:23]
-// CHECK-LOAD: cxx14-lambdas.cpp:7:35: VariableRef=copy:7:35 Extent=[7:35 - 7:39]
+// CHECK-LOAD: cxx14-lambdas.cpp:7:20: VarDecl=ptr:7:20 (Definition) Extent=[7:20 - 7:33]
----------------
AaronBallman wrote:
This is a breaking change but I don't have a good intuition as to how disruptive it's going to be. It is fixing an issue in a reasonable way, but because these visitors are as generic as they are, it may still cause surprises for existing consumers of the API.
We should call this out more explicitly in the release notes.
https://github.com/llvm/llvm-project/pull/174116
More information about the cfe-commits
mailing list