]> granicus.if.org Git - clang/commit
Warn for "if ((a == b))" where the equality expression is needlessly wrapped inside...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 1 Feb 2011 18:24:22 +0000 (18:24 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 1 Feb 2011 18:24:22 +0000 (18:24 +0000)
commit0e2dc3a1159806c8303b0979be1ce1526cc64ed3
treeaf7b32e291a316e1c5e7fae41b03e46fece42813
parent63b54104700873dc4a5b95b3108052580b5370e7
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