diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-09-18 17:37:21 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-09-18 17:37:21 +0000 |
commit | 15a9356464f0809e1cb24aa3a7cc2577914ff5bb (patch) | |
tree | 74e1829ebc9eb58aaf648cad5e95dcd7ebe7d09a /test/SemaCXX/for-range-examples.cpp | |
parent | f9361b504c14f50ffdd872710bc805f7259d200a (diff) |
c: warn when an integer value comparison with an
integral expression have the obvious result.
Patch reviewed by John McCall off line.
// rdar://12202422
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164143 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/for-range-examples.cpp')
-rw-r--r-- | test/SemaCXX/for-range-examples.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/SemaCXX/for-range-examples.cpp b/test/SemaCXX/for-range-examples.cpp index 8bda51062a..86899bd2ea 100644 --- a/test/SemaCXX/for-range-examples.cpp +++ b/test/SemaCXX/for-range-examples.cpp @@ -122,12 +122,12 @@ int main() { for (auto n : range(1, 5)) { total += n; } - assert(total == 10); + assert((total == 10)); for (auto n : range(10, 100, 10)) { total += n; } - assert(total == 460); + assert((total == 460)); map_range::vector<char> chars; chars.push_back('a'); @@ -136,7 +136,7 @@ int main() { for (char c : chars) { ++total; } - assert(total == 463); + assert((total == 463)); typedef map_range::tuple<int, double> T; map_range::vector<T> pairs; @@ -146,7 +146,7 @@ int main() { for (auto a : map(map_range::mem_fun(&T::get<int>), pairs)) { total += a; } - assert(total == 500); + assert((total == 500)); } // PR11793 |