balazske added inline comments.

================
Comment at: clang/lib/AST/ASTImporter.cpp:7851
+    if (!getImportDeclErrorIfAny(FromD)) {
+      // Error encountered for the first time.
+      // After takeError the error is not usable any more in ToDOrErr.
----------------
martong wrote:
> a_sidorin wrote:
> > Is it possible to get this error more than once?
> Yes, that can happen in cyclic imports like: ClassTemplateDecl -> 
> TemplatedDecl -> ClassTemplateDecl.
I do not understand this completely, in this branch `setImportDeclError` is 
called so at next time we can not go into this branch again (for the same 
`FromD`). (We can get the error and not go into this branch more than once but 
get no error and go into the branch only once.)


================
Comment at: clang/unittests/AST/ASTImporterTest.cpp:4697
+                        DefaultTestValuesForRunOptions, );
+
 INSTANTIATE_TEST_CASE_P(ParameterizedTests, ASTImporterLookupTableTest,
----------------
a_sidorin wrote:
> #undef ERRONEOUSSTMT?
Maybe we should not use a macro for this, specially not define the macro inside 
the `struct` block. For the current tests it is sufficient to make a 
std::string that contains something like `void f() { asm(""); }`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62373



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

Reply via email to