aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM aside from a minor nit and a question.



================
Comment at: clang/lib/Sema/ParsedAttr.cpp:144
+  // otherwise return a default ParsedAttrInfo.
+  if (A.getKind() < sizeof(AttrInfoMap)/sizeof(AttrInfoMap[0]))
+    return *AttrInfoMap[A.getKind()];
----------------
You can use `llvm::array_lengthof()` here instead.


================
Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:3646
+    OS << "};\n";
+    OS << "ParsedAttrInfo" << I->first << " ParsedAttrInfo" << I->first << 
"::Instance;\n";
   }
----------------
Would it make sense for this object to be `const` under the assumption that 
once we've generated a `ParsedAttrInfo` object, we don't want to modify its 
properties? I'm not certain if trying to be const-correct here would be a 
burden or not, so I don't insist on a change unless it's trivial to support.


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

https://reviews.llvm.org/D31337



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to