Fix a QoI bug with overloaded operators inside macros.

We were failing to set source locations and ranges in isUnusedResultAWarning
for CXXOperatorCallExprs, leading to an "expression result unused" warning
with absolutely no context if the expression was inside a macro.

llvm-svn: 140036
diff --git a/clang/test/SemaCXX/warn-unused-value.cpp b/clang/test/SemaCXX/warn-unused-value.cpp
index 775c3cf..80298ec 100644
--- a/clang/test/SemaCXX/warn-unused-value.cpp
+++ b/clang/test/SemaCXX/warn-unused-value.cpp
@@ -15,3 +15,18 @@
     box->j;
   }
 }
+
+namespace test1 {
+struct Foo {
+  int i;
+  bool operator==(const Foo& rhs) {
+    return i == rhs.i;
+  }
+};
+
+#define NOP(x) (x)
+void b(Foo f1, Foo f2) {
+  NOP(f1 == f2);  // expected-warning {{expression result unused}}
+}
+#undef NOP
+}