summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/static-init-2.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-05-31 05:41:42 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-05-31 05:41:42 +0000
commit0683a1418b28b289eca4cb602ac69780f9e0a609 (patch)
tree431c3a3e98c383f8123221b2ae31f02b5cca8362 /test/CodeGenCXX/static-init-2.cpp
parent049f6d0239e242dc338be6ac6f6c5175803d2163 (diff)
Expand the coverage of the warning for constants on the RHS of logical operands:
return f() || -1; where the user meant to write '|'. This bootstraps without any additional warnings. Patch by Richard Trieu. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/static-init-2.cpp')
-rw-r--r--test/CodeGenCXX/static-init-2.cpp2
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..768e6de92c 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;