[PATCH] D158948: [clang][ASTImporter] Add import of type-related nodes
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 29 08:49:38 PDT 2023
balazske added inline comments.
================
Comment at: clang/lib/AST/ASTImporter.cpp:1758
+ *ToAttrLocOrErr);
+}
+
----------------
At cases like this (many imported values) `importChecked` can be used, like at `VisitDependentSizedArrayType`.
================
Comment at: clang/unittests/AST/ASTImporterObjCTest.cpp:100
+ FirstDeclMatcher<ObjCTypeParamDecl>().match(ToInterfaceDecl, Pattern);
+ ASSERT_TRUE(ToTypeParamDeclImported);
+ ASSERT_TRUE(ToTypeParamDeclMatched);
----------------
This single assert can be sufficient for this test because the ToTU was empty before import, it is not expected that more than one instance will be created. Better is to check for example if `getTypeForDecl` is correctly imported.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158948/new/
https://reviews.llvm.org/D158948
More information about the cfe-commits
mailing list