[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 26 05:25:54 PDT 2018


a.sidorin requested changes to this revision.
a.sidorin added inline comments.
This revision now requires changes to proceed.


================
Comment at: unittests/AST/ASTImporterTest.cpp:1569
+        FirstDeclMatcher<FunctionTemplateDecl>().match(*TB, Pattern);
+    if (!FromDSDRE)
+      return;
----------------
szepet wrote:
> martong wrote:
> > I think, this `if` would be needed only if the test suite would be parameterized also with `ArgVector{"-fdelayed-template-parsing"}`, but that is not.
> Its necessary, since on windows platforms we have that flag by default (so, it does not matter that we dont include here, it will be used anyway).
The declaration should be always present independently of flags so `if` is invalid here. To achieve this, we use explicit template instantiations in the test code. See `ImportCXXDependentScopeMemberExpr` test for reference. Explicit instantiations also allow us to find errors in the template code itself.


================
Comment at: unittests/AST/ASTImporterTest.cpp:1577
+
+INSTANTIATE_TEST_CASE_P(ParameterizedTests, NoDelayedTemplateParsing,
+                        ::testing::Values(ArgVector()), );
----------------
Please don't do this - always test the code with both flag options. Explicit instantiations will help you to do this. Otherwise, windows buildbot will add the flag on its own causing the test to crash after the commit.


https://reviews.llvm.org/D38845





More information about the cfe-commits mailing list