]> granicus.if.org Git - clang/commitdiff
Turn -Wparentheses on by default.
authorJohn McCall <rjmccall@apple.com>
Tue, 13 Oct 2009 17:57:23 +0000 (17:57 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 13 Oct 2009 17:57:23 +0000 (17:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83993 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
test/Analysis/dead-stores.c

index 2a70ff2e660f09088aed7f2d47f5cad5d293aeec..89700ab087c272aeab1d21c16bab630dcd17b645 100644 (file)
@@ -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<Parentheses>, DefaultIgnore;
+  InGroup<Parentheses>;
 
 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">;
index d19e8c4f5c6bdf77cfc04f8160d3c3bb11a8577b..c4ff7fa0e860bd257a83902437fb2ab0a68c767e 100644 (file)
@@ -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;
 }