diff options
author | Daniel Jasper <djasper@google.com> | 2013-05-03 14:41:24 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-05-03 14:41:24 +0000 |
commit | 16a69ef481f4580c571b6c693a5d3dd64ea56b53 (patch) | |
tree | e0b579adc0d8c4d3c41f8efad3233d8f9687e2ec /unittests/Format/FormatTest.cpp | |
parent | 8eead16398c003dc2a8be22f44e8c2d92af80479 (diff) |
Fix expression recognition in for-loops.
Before: for (; a&& b;) {}
After: for (; a && b;) {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181017 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 055b9d1cb2..abb2b5819c 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -2547,6 +2547,7 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyIndependentOfContext("A<int **, int **> a;"); verifyIndependentOfContext("void f(int *a = d * e, int *b = c * d);"); verifyFormat("for (char **a = b; *a; ++a) {\n}"); + verifyFormat("for (; a && b;) {\n}"); verifyFormat( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n" |