]> granicus.if.org Git - clang/commit
Implement -Wparentheses: warn about using assignments in contexts that require
authorJohn McCall <rjmccall@apple.com>
Mon, 12 Oct 2009 21:59:07 +0000 (21:59 +0000)
committerJohn McCall <rjmccall@apple.com>
Mon, 12 Oct 2009 21:59:07 +0000 (21:59 +0000)
commit5a881bb09928b7ade891efc680088aaad276f8d6
treeef404b9efd3fb4ac34ac1bdaf717189e0bb48987
parent65f6642e88ac39f2c1129f9b92b3fafd55dc32df
Implement -Wparentheses:  warn about using assignments in contexts that require
conditions.  Add a fixit to insert the parentheses.  Also fix a very minor
possible memory leak in 'for' conditions.

Fixes PR 4876 and rdar://problem/7289172

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83907 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/Sema.h
lib/Sema/SemaExpr.cpp
lib/Sema/SemaStmt.cpp
test/SemaCXX/warn-assignment-condition.cpp [new file with mode: 0644]