]> granicus.if.org Git - clang/commit
Add a warning to catch a bug recently caught by code review, like this:
authorChris Lattner <sabre@nondot.org>
Tue, 13 Jul 2010 19:41:32 +0000 (19:41 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 13 Jul 2010 19:41:32 +0000 (19:41 +0000)
commit90a8f27f144233b53cac0c88a1595f7f05105b7e
treea3ef6406b2b4ac33704047c7ae3a8188a7200640
parent3d4b482b5f2cacc7686f65bb231ad666a5adad4a
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
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/Sema.h
lib/Sema/SemaExpr.cpp
test/CodeGenCXX/static-init-2.cpp
test/Sema/exprs.c
test/Sema/i-c-e.c
test/Sema/switch.c
test/SemaCXX/bool.cpp
test/SemaCXX/switch.cpp