================
Comment at: lib/Format/TokenAnnotator.cpp:980
@@ -980,4 +979,3 @@
     return Left.FormatTok.Tok.isLiteral() ||
-           (Left.isNot(tok::star) && Left.isNot(tok::amp) &&
-            Left.isNot(tok::l_paren) && !Style.PointerBindsToType);
-  if (Left.is(tok::amp) || Left.is(tok::star))
+           ((Left.Type != TT_PointerOrReference) && Left.isNot(tok::l_paren) &&
+            !Style.PointerBindsToType);
----------------
Daniel Jasper wrote:
> No parenthesis around Left.Type != ... necessary. Same below.
I hate guessing operations priorities, so I'd leave parenthesis, if you don't 
mind.

================
Comment at: unittests/Format/FormatTest.cpp:1979
@@ +1978,3 @@
+  verifyFormat("int f(int a, char &&b) {}");
+  verifyGoogleFormat("int f(int a, char&& b) {}");
+
----------------
Daniel Jasper wrote:
> Add a test case with "int &&b = .."
Done.


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

BRANCH
  svn

ARCANIST PROJECT
  clang
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to