You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the initializer Expr that is a child of the constructor now that CXXDefaultInitExprs may be copied in the AST.
This fixes a crash that I believe did not exist before llvm/llvm-project#91879. The CXXDefaultInitExpr that is the in-class member initializer is now not the same object that is referenced through the constructor's initializers, so we could no longer retrieve the correct environment values for the expressions involved. We need to use the object referenced by the constructor's initializers.
The minimal crash repro I could find still needed `#include <assert.h>`, so isn't an option for unit tests in collect_evidence_test.cc:
```cpp
#include <assert.h>
#include <memory>
int* g;
class C {
C() {}
std::unique_ptr<int, void (*)(int*)> field_{
g, [](int*) { __assert_fail("", __builtin_FILE(), 0, ""); }};
};
```
PiperOrigin-RevId: 654006679
Change-Id: If4b8455132ae1b637be3544e15e63bcdf962772b
0 commit comments