krasimir added inline comments.

================
Comment at: lib/Format/TokenAnnotator.cpp:323
 
+  const FormatToken *parseCpp11Attribute(const FormatToken &Tok,
+                                         bool NamespaceAllowed) {
----------------
Please inline this into the other function: it's used only once and its name 
and arguments aren't clear outside of that context.


================
Comment at: unittests/Format/FormatTest.cpp:12083
 
+TEST_F(FormatTest, GuessLanguageWithCpp11AttributeSpecifiers) {
+  EXPECT_EQ(FormatStyle::LK_Cpp, guessLanguage("foo.h", "[[noreturn]];"));
----------------
djasper wrote:
> You are not adding any test (AFAICT) that tests that you have correctly set 
> TT_AttributeSpecifier or that you are making any formatting decisions based 
> on it. If you can't test it, remove that part of this patch.
This will also require adding tests about not messing up the formatting 
inside/around attribute specifiers too much. At least take these examples and 
copy them to the C++/ObjC formatting unittests.


Repository:
  rC Clang

https://reviews.llvm.org/D43902



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

Reply via email to