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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to