[PATCH] Add CommentOptions, allow specifying custom comment block commands

Doug Gregor dgregor at apple.com
Sun Feb 17 21:29:56 PST 2013


  Just a few tiny changes, but otherwise this looks great to go in.


================
Comment at: lib/AST/CommentCommandTraits.cpp:27
@@ +26,3 @@
+  for (CommentOptions::BlockCommandNamesTy::const_iterator I =
+         CommentOptions.BlockCommandNames.begin();
+       I != CommentOptions.BlockCommandNames.end();
----------------
Please drop the "I =" down to a new line, and capture the end iterator in a variable. For example,

  for (CommentOptions::BlockCommandNamesTy::const_iterator
           I = CommentOptions.BlockCommandNames.begin(),
           E = CommentOptions.BlockCommandNames.end();
        I != E; ++I)

================
Comment at: lib/Serialization/ASTReader.cpp:117
@@ +116,3 @@
+      Diags->Report(diag::err_pch_langopt_value_mismatch)
+      << "block command names";
+    return true;
----------------
This should be indented two spaces.

================
Comment at: lib/Serialization/ASTWriter.cpp:1064
@@ +1063,3 @@
+  for (CommentOptions::BlockCommandNamesTy::const_iterator I =
+         LangOpts.CommentOpts.BlockCommandNames.begin(), IEnd =
+         LangOpts.CommentOpts.BlockCommandNames.end();
----------------
The "I = " and "IEnd = " should be at the start of new lines.

================
Comment at: lib/Serialization/ASTWriter.cpp:1070
@@ +1069,3 @@
+    Record.push_back(BlockCommandName.size());
+    Record.append(BlockCommandName.begin(), BlockCommandName.end());
+  }
----------------
Please use AddString here.


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

BRANCH
  comment-commands

ARCANIST PROJECT
  clang



More information about the cfe-commits mailing list