vabridgers updated this revision to Diff 278630.
vabridgers added a comment.
Fix lint pre-merge check
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83992/new/
https://reviews.llvm.org/D83992
Files:
clang/lib/AST/ASTImporterLookupTable.cpp
Index: clang/lib/AST/ASTImporterLookupTable.cpp
===================================================================
--- clang/lib/AST/ASTImporterLookupTable.cpp
+++ clang/lib/AST/ASTImporterLookupTable.cpp
@@ -22,6 +22,20 @@
struct Builder : RecursiveASTVisitor<Builder> {
ASTImporterLookupTable <
Builder(ASTImporterLookupTable <) : LT(LT) {}
+
+ bool VisitTypedefNameDecl(TypedefNameDecl *D) {
+ QualType Ty = D->getUnderlyingType();
+ Ty = Ty.getCanonicalType();
+ if (const auto *RTy = dyn_cast<RecordType>(Ty)) {
+ LT.add(RTy->getAsRecordDecl());
+ // iterate over the field decls, adding them
+ for (auto *it : RTy->getAsRecordDecl()->fields()) {
+ LT.add(it);
+ }
+ }
+ return true;
+ }
+
bool VisitNamedDecl(NamedDecl *D) {
LT.add(D);
return true;
Index: clang/lib/AST/ASTImporterLookupTable.cpp
===================================================================
--- clang/lib/AST/ASTImporterLookupTable.cpp
+++ clang/lib/AST/ASTImporterLookupTable.cpp
@@ -22,6 +22,20 @@
struct Builder : RecursiveASTVisitor<Builder> {
ASTImporterLookupTable <
Builder(ASTImporterLookupTable <) : LT(LT) {}
+
+ bool VisitTypedefNameDecl(TypedefNameDecl *D) {
+ QualType Ty = D->getUnderlyingType();
+ Ty = Ty.getCanonicalType();
+ if (const auto *RTy = dyn_cast<RecordType>(Ty)) {
+ LT.add(RTy->getAsRecordDecl());
+ // iterate over the field decls, adding them
+ for (auto *it : RTy->getAsRecordDecl()->fields()) {
+ LT.add(it);
+ }
+ }
+ return true;
+ }
+
bool VisitNamedDecl(NamedDecl *D) {
LT.add(D);
return true;
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits