[PATCH] Fix alignment attribute printing.

Richard Smith richard at metafoo.co.uk
Thu Jan 31 15:28:29 PST 2013


  Some minor style issues. I think I'd slightly prefer for AddAlignedAttr to allocate the AlignedAttr earlier, and ask it whether it's a DeclSpec attribute (rather than passing this in as a flag), but this way is OK too.


================
Comment at: utils/TableGen/ClangAttrEmitter.cpp:837
@@ +836,3 @@
+
+  for (unsigned Index = 0; Index < SpellingList.size(); ++ Index) {
+    Record *S = SpellingList[Index];
----------------
No space after ++.

================
Comment at: utils/TableGen/ClangAttrEmitter.cpp:867
@@ +866,3 @@
+    OS << "  bool " << Name << "() const { return SpellingListIndex == ";
+    for (unsigned Index = 0; Index < Spellings.size(); ++ Index) {
+      OS << getSpellingListIndex(SpellingList, *Spellings[Index]);
----------------
No space after ++.

================
Comment at: utils/TableGen/ClangAttrEmitter.cpp:841-843
@@ +840,5 @@
+      continue;
+    if ((S->getValueAsString("Variety") == "CXX11") &&
+        (S->getValueAsString("Namespace") !=
+         Spelling.getValueAsString("Namespace")))
+      continue;
----------------
No parens around == and != expressions here.

================
Comment at: utils/TableGen/ClangAttrEmitter.cpp:857
@@ +856,3 @@
+  for (std::vector<Record*>::const_iterator I = Accessors.begin(),
+       E = Accessors.end(); I != E; ++ I) {
+    Record *Accessor = *I;
----------------
No space after ++.


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



More information about the cfe-commits mailing list