mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 10:55:58 +08:00
[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. llvm-svn: 302322
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user