[PATCH] D63603: [ASTImporter] Propagate error from ImportDeclContext
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 24 09:59:34 PDT 2019
martong marked 4 inline comments as done.
martong added inline comments.
================
Comment at: clang/lib/AST/ASTImporter.cpp:1724
+ };
+ DefinitionCompleter CompleterRAII(To);
----------------
jkorous wrote:
> You might consider using just a lambda with `llvm::make_scope_exit`.
>
> https://llvm.org/doxygen/namespacellvm.html#a4896534f3c6278be56967444daf38e3f
>
> For example:
> ```
> To->startDefinition();
> auto DefinitionCompleter = llvm::make_scope_exit( [To](){To->completeDefinition();} );
> ```
Thanks! I have changed to make_scope_exit.
================
Comment at: clang/unittests/AST/ASTImporterTest.cpp:4743
+}
+
INSTANTIATE_TEST_CASE_P(ParameterizedTests, ErrorHandlingTest,
----------------
balazske wrote:
> Maybe add a similar test for namespace and check that the error is not propagated?
Ok, I have added that test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63603/new/
https://reviews.llvm.org/D63603
More information about the cfe-commits
mailing list