[cfe-commits] [PATCH] Implement Attr dumping for -ast-dump

Alexander Kornienko alexfh at google.com
Fri Dec 21 06:40:01 PST 2012


  Looks good except for some nits:


================
Comment at: lib/AST/ASTDumper.cpp:317
@@ +316,3 @@
+    IndentScope Indent(*this);
+    Attr *A = *I;
+    switch (A->getKind()) {
----------------
const Attr *A ?

================
Comment at: utils/TableGen/ClangAttrEmitter.cpp:1243
@@ -1165,1 +1242,3 @@
 
+// Emits the code to dump an attribute.
+void EmitClangAttrDump(RecordKeeper &Records, raw_ostream &OS) {
----------------
Should it better be a Doxygen comment?

================
Comment at: utils/TableGen/ClangAttrEmitter.cpp:1245
@@ +1244,3 @@
+void EmitClangAttrDump(RecordKeeper &Records, raw_ostream &OS) {
+  OS << "  switch (A->getKind()) {\n";
+  OS << "  default:\n";
----------------
I'd better let the compiler concatenate strings:
OS <<
  "  switch... {\n"
  "  case xx:\n"
  "  ...";


http://llvm-reviews.chandlerc.com/D234



More information about the cfe-commits mailing list