[libcxx] r302322 - [libcxx] [test] Fix MSVC "warning C6326: Potential comparison of a constant with another constant".
Stephan T. Lavavej via cfe-commits
cfe-commits at lists.llvm.org
Fri May 5 16:38:24 PDT 2017
Author: stl_msft
Date: Fri May 5 18:38:24 2017
New Revision: 302322
URL: http://llvm.org/viewvc/llvm-project?rev=302322&view=rev
Log:
[libcxx] [test] Fix MSVC "warning C6326: Potential comparison of a constant with another constant".
The expressions `1 == 1` and `true` have the same type, value category, and value.
Fixes D32924.
Modified:
libcxx/trunk/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp
Modified: libcxx/trunk/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp?rev=302322&r1=302321&r2=302322&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp Fri May 5 18:38:24 2017
@@ -48,7 +48,7 @@ int main()
assert(c.front() == false);
assert(c.back() == true);
#endif
- c.emplace_back(1 == 1);
+ c.emplace_back(true);
assert(c.size() == 3);
assert(c.front() == false);
assert(c[1] == true);
@@ -82,7 +82,7 @@ int main()
assert(c.front() == false);
assert(c.back() == true);
#endif
- c.emplace_back(1 == 1);
+ c.emplace_back(true);
assert(c.size() == 3);
assert(c.front() == false);
assert(c[1] == true);
More information about the cfe-commits
mailing list