================
@@ -126,6 +127,32 @@ static bool isInitializerOfDynamicClass(const
CXXCtorInitializer *baseInit) {
return baseClassDecl->isDynamicClass();
}
+namespace {
+/// A visitor which checks whether an initializer uses 'this' in a
+/// way which requires the vtable to be properly set.
+struct DynamicThisUseChecker
+ : ConstEvaluatedExprVisitor<DynamicThisUseChecker> {
+ using super = ConstEvaluatedExprVisitor<DynamicThisUseChecker>;
+
+ bool usesThis;
----------------
erichkeane wrote:
just use inline init:
```suggestion
bool usesThis = false;
```
instead of in the ctor.
https://github.com/llvm/llvm-project/pull/155275
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits