[PATCH] D60934: [clang] adding explicit(bool) from c++2a

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 23 07:23:44 PDT 2019


martong added inline comments.


================
Comment at: clang/lib/AST/ASTImporter.cpp:3126
+        auto Imp =
+            importSeq(FromConstructor->getExplicitSpecifier().getPointer());
+        if (!Imp)
----------------
Why is it needed to import the explicit specifier here again?
You already imported that above. Perhaps this hunk is not needed here at all?


================
Comment at: clang/lib/AST/ASTStructuralEquivalence.cpp:965
     auto *Conversion2 = cast<CXXConversionDecl>(Method2);
-    if (Conversion1->isExplicit() != Conversion2->isExplicit())
+    if (!Conversion1->isEquivalentExplicit(Conversion2->getExplicitSpecifier()))
       return false;
----------------
Would it work if `Method1` has a different `ASTContext` than `Method2?
That is exactly the case when we import an AST into another with ASTImporter.


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

https://reviews.llvm.org/D60934





More information about the cfe-commits mailing list