martong added inline comments.

================
Comment at: clang/unittests/AST/ASTImporterTest.cpp:625
+      "class shouldNotBeImported {};", Lang_CXX, "class realDecl {};", 
Lang_CXX,
+      "shouldNotBeImported", RedirectingImporter::Constructor);
+  auto *Imported = cast<CXXRecordDecl>(To);
----------------
I just realized that maybe we could simplify and make this part more elegant:
If `ASTImporterTestBase` had a data member with the type `ImporterConstructor` 
then we could overwrite that data member in the constructor of `CustomImporter`.
(The `ASTImporter` is created lazily when the first `getImportedDecl` is 
called, but by that time the creator is already set, so this will work.)
This way we could elide the last argument here 
(`RedirectingImporter::Constructor`) and in all subsequent `TEST_P` tests, it 
would be enough to set up the creator per test fixture.



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59485/new/

https://reviews.llvm.org/D59485



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

Reply via email to