diff options
author | Richard Trieu <rtrieu@google.com> | 2012-05-02 22:48:45 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2012-05-02 22:48:45 +0000 |
commit | 82129e25c8d26d933771bc37aa0e0ed2edd131b4 (patch) | |
tree | 0bcc867ea32d1ee360d3e672fd4e6d168b358466 /test/SemaCXX/warn-loop-analysis.cpp | |
parent | a058fd4f0a944174295f77169b438510dad389f8 (diff) |
Add commas to for loop warning to separate variable names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/warn-loop-analysis.cpp')
-rw-r--r-- | test/SemaCXX/warn-loop-analysis.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/SemaCXX/warn-loop-analysis.cpp b/test/SemaCXX/warn-loop-analysis.cpp index 802ce52c4e..a55ca6c6ea 100644 --- a/test/SemaCXX/warn-loop-analysis.cpp +++ b/test/SemaCXX/warn-loop-analysis.cpp @@ -83,7 +83,7 @@ void test2() { for (; i != 3i; ) { ++i; } // Testing ConditionalOperator - for (; i ? j : k; ) {} // expected-warning {{variables 'i' 'j' and 'k' used in loop condition not modified in loop body}} + for (; i ? j : k; ) {} // expected-warning {{variables 'i', 'j', and 'k' used in loop condition not modified in loop body}} for (; i ? j : k; ) { ++i; } for (; i ? j : k; ) { ++j; } for (; i ? j : k; ) { ++k; } @@ -124,12 +124,12 @@ void test4() { int a, b, c, d, e, f; for (; a;); // expected-warning {{variable 'a' used in loop condition not modified in loop body}} for (; a + b;); // expected-warning {{variables 'a' and 'b' used in loop condition not modified in loop body}} - for (; a + b + c;); // expected-warning {{variables 'a' 'b' and 'c' used in loop condition not modified in loop body}} - for (; a + b + c + d;); // expected-warning {{variables 'a' 'b' 'c' and 'd' used in loop condition not modified in loop body}} + for (; a + b + c;); // expected-warning {{variables 'a', 'b', and 'c' used in loop condition not modified in loop body}} + for (; a + b + c + d;); // expected-warning {{variables 'a', 'b', 'c', and 'd' used in loop condition not modified in loop body}} for (; a + b + c + d + e;); // expected-warning {{variables used in loop condition not modified in loop body}} for (; a + b + c + d + e + f;); // expected-warning {{variables used in loop condition not modified in loop body}} - for (; a + c + d + b;); // expected-warning {{variables 'a' 'c' 'd' and 'b' used in loop condition not modified in loop body}} - for (; d + c + b + a;); // expected-warning {{variables 'd' 'c' 'b' and 'a' used in loop condition not modified in loop body}} + for (; a + c + d + b;); // expected-warning {{variables 'a', 'c', 'd', and 'b' used in loop condition not modified in loop body}} + for (; d + c + b + a;); // expected-warning {{variables 'd', 'c', 'b', and 'a' used in loop condition not modified in loop body}} } // Ensure that the warning doesn't fail when lots of variables are used |