diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-05-31 05:41:42 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-05-31 05:41:42 +0000 |
commit | e54ff6cc3e479523b71e4c7eb4bd13707d84de0f (patch) | |
tree | c3508683d9859d5dfdc1b9ace8c2b4f334440225 /clang/test/CodeGenCXX | |
parent | b3483b3d91af65619471cdbf44563e5759eef4bc (diff) | |
download | bcm5719-llvm-e54ff6cc3e479523b71e4c7eb4bd13707d84de0f.tar.gz bcm5719-llvm-e54ff6cc3e479523b71e4c7eb4bd13707d84de0f.zip |
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.
llvm-svn: 132327
Diffstat (limited to 'clang/test/CodeGenCXX')
-rw-r--r-- | clang/test/CodeGenCXX/static-init-2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/static-init-2.cpp b/clang/test/CodeGenCXX/static-init-2.cpp index 65ab3bb1262..768e6de92c0 100644 --- a/clang/test/CodeGenCXX/static-init-2.cpp +++ b/clang/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; |