Warn for "if ((a == b))" where the equality expression is needlessly wrapped inside...
commit01d240ffc42e250c0d6066574fd665f370c889cc
authorArgiris Kirtzidis <akyrtzi@gmail.com>
Tue, 1 Feb 2011 18:24:22 +0000 (1 18:24 +0000)
committerArgiris Kirtzidis <akyrtzi@gmail.com>
Tue, 1 Feb 2011 18:24:22 +0000 (1 18:24 +0000)
treeaf7b32e291a316e1c5e7fae41b03e46fece42813
parent44dfbc3250706eca586778894a48ade18f58af86
Warn for "if ((a == b))" where the equality expression is needlessly wrapped inside parentheses.
It's highly likely that the user intended an assignment used as condition.

Addresses rdar://8848646.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124668 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaExpr.cpp
test/Analysis/self-init.m
test/SemaCXX/warn-assignment-condition.cpp