diff options
author | Chris Lattner <sabre@nondot.org> | 2010-07-13 19:41:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-07-13 19:41:32 +0000 |
commit | 90a8f27f144233b53cac0c88a1595f7f05105b7e (patch) | |
tree | a3ef6406b2b4ac33704047c7ae3a8188a7200640 /test/CodeGenCXX/static-init-2.cpp | |
parent | 3d4b482b5f2cacc7686f65bb231ad666a5adad4a (diff) |
Add a warning to catch a bug recently caught by code review, like this:
t2.c:2:12: warning: use of logical && with constant operand; switch to bitwise &
or remove constant [-Wlogical-bitwise-confusion]
return x && 4;
^ ~
wording improvement suggestions are welcome.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108260 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/static-init-2.cpp')
-rw-r--r-- | test/CodeGenCXX/static-init-2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGenCXX/static-init-2.cpp b/test/CodeGenCXX/static-init-2.cpp index 65ab3bb126..7eb4a7d5aa 100644 --- a/test/CodeGenCXX/static-init-2.cpp +++ b/test/CodeGenCXX/static-init-2.cpp @@ -3,4 +3,4 @@ // Make sure we don't crash generating y; its value is constant, but the // initializer has side effects, so EmitConstantExpr should fail. int x(); -int y = x() && 0; +int y = x() && 0; // expected-warning {{use of logical && with constant operand}} |