From: John McCall Date: Tue, 13 Oct 2009 17:57:23 +0000 (+0000) Subject: Turn -Wparentheses on by default. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f66d5cd8926541099def3cb187d56eff60d3be99;p=clang Turn -Wparentheses on by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83993 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 2a70ff2e66..89700ab087 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -1735,7 +1735,7 @@ def err_cannot_form_pointer_to_member_of_reference_type : Error< def warn_condition_is_assignment : Warning<"using the result of an " "assignment as a condition without parentheses">, - InGroup, DefaultIgnore; + InGroup; def warn_value_always_zero : Warning<"%0 is always zero in this context">; def warn_value_always_false : Warning<"%0 is always false in this context">; diff --git a/test/Analysis/dead-stores.c b/test/Analysis/dead-stores.c index d19e8c4f5c..c4ff7fa0e8 100644 --- a/test/Analysis/dead-stores.c +++ b/test/Analysis/dead-stores.c @@ -57,7 +57,7 @@ int f7(int *p) { int f8(int *p) { extern int *baz(); - if (p = baz()) // expected-warning{{Although the value}} + if ((p = baz())) // expected-warning{{Although the value}} return 1; return 0; }