[PATCH] D46115: [ASTImporter] properly import SrcLoc of Attr

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 7 10:13:56 PDT 2018


a.sidorin added a comment.

Sorry, two more nits.



================
Comment at: include/clang/AST/ASTImporter.h:137
+    ///
+    /// \returns the equivalent attribute in the "to" context, or NULL if an
+    /// error occurred.
----------------
nullptr


================
Comment at: lib/AST/ASTImporter.cpp:4724
   SmallVector<const Attr *, 1> ToAttrs(FromAttrs.size());
-  ASTContext &_ToContext = Importer.getToContext();
   std::transform(FromAttrs.begin(), FromAttrs.end(), ToAttrs.begin(),
+    [this](const Attr *A) -> const Attr * {
----------------
Could we use ImportArrayChecked instead?


https://reviews.llvm.org/D46115





More information about the cfe-commits mailing list