aaron.ballman added inline comments.
================ Comment at: lib/Sema/SemaDeclAttr.cpp:5769 + // might include a subject list even when it has custom parsing. + if (!Attr.diagnoseAppertainsTo(S, D)) + return true; ---------------- Instead of duplicating this check in the if statement, why not hoist the current check above the if statement? ================ Comment at: utils/TableGen/ClangAttrEmitter.cpp:1620 + bool IsRule) + : Rules(Rules.begin(), Rules.end()), IsRule(IsRule) {} + ---------------- ArrayRef automatically converts to a std::vector, so you should just be able to use `Rules(Rules)`. ================ Comment at: utils/TableGen/ClangAttrEmitter.cpp:1625 + + AttributeSubjectMatchRule &getRule() { + assert(IsRule && "not a rule!"); ---------------- Any reason not to return this rule by const ref and make the function const? ================ Comment at: utils/TableGen/ClangAttrEmitter.cpp:1701 + std::vector<Record *> DeclNodes = Records.getAllDerivedDefinitions("DDecl"); + for (const Record *Aggregate : Aggregates) { + Record *SubjectDecl = Aggregate->getValueAsDef("Subject"); ---------------- Can use `const auto *` here Repository: rL LLVM https://reviews.llvm.org/D32176 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits