[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 26 22:09:17 PDT 2024
================
@@ -122,22 +122,20 @@ static bool CheckFieldsInitialized(InterpState &S, SourceLocation Loc,
}
// Check Fields in all bases
- for (const Record::Base &B : R->bases()) {
+ unsigned BaseIndex = 0;
+ const CXXRecordDecl *CD = dyn_cast<CXXRecordDecl>(R->getDecl());
----------------
tbaederr wrote:
```suggestion
const auto *CD = dyn_cast<CXXRecordDecl>(R->getDecl());
```
https://github.com/llvm/llvm-project/pull/100761
More information about the cfe-commits
mailing list