r.stahl added inline comments.
================ Comment at: include/clang/AST/ASTImporter.h:137 + /// + /// \returns the equivalent attribute in the "to" context, or NULL if an + /// error occurred. ---------------- a.sidorin wrote: > nullptr I tried to stay consistent with the other descriptions. Will be removed anyway (see below). ================ Comment at: lib/AST/ASTImporter.cpp:2650 + for (const auto *A : D->attrs()) + ToIndirectField->addAttr(Importer.Import(const_cast<Attr *>(A))); ---------------- a.sidorin wrote: > Could we just remove 'const' qualifier from `A` to avoid `const_cast`? (Same > below) I made the interface const instead. ================ Comment at: lib/AST/ASTImporter.cpp:6547 +Attr *ASTImporter::Import(Attr *FromAttr) { + if (!FromAttr) + return nullptr; ---------------- a.sidorin wrote: > Is it possible to get into a situation where a nullptr attribute is imported? I looked at the Decl variant and thought it should act similarly, but as far as I can tell, null attributes should not exist. https://reviews.llvm.org/D46115 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits