For "if ((a == b))" only warn if 'a' is a modifiable l-value. Caught by John!

llvm-svn: 124675
diff --git a/clang/test/SemaCXX/warn-assignment-condition.cpp b/clang/test/SemaCXX/warn-assignment-condition.cpp
index 48cc137..6cfab554 100644
--- a/clang/test/SemaCXX/warn-assignment-condition.cpp
+++ b/clang/test/SemaCXX/warn-assignment-condition.cpp
@@ -109,4 +109,14 @@
   if ((x == 5)) {} // expected-warning {{equality comparison with extraneous parentheses}} \
                    // expected-note {{use '=' to turn this equality comparison into an assignment}} \
                    // expected-note {{remove extraneous parentheses around the comparison to silence this warning}}
+  if ((5 == x)) {}
+}
+
+void (*fn)();
+
+void test2() {
+    if ((fn == test2)) {} // expected-warning {{equality comparison with extraneous parentheses}} \
+                          // expected-note {{use '=' to turn this equality comparison into an assignment}} \
+                          // expected-note {{remove extraneous parentheses around the comparison to silence this warning}}
+    if ((test2 == fn)) {}
 }