summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-assignment-condition.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-10-19 06:32:17 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-10-19 06:32:17 +0000
commitb2d6df5c955ed2ff4a4ac237f1bd7966f133b426 (patch)
tree3307ad5062dcdabcb4c72b4a5ef4214a6c2e7165 /clang/test/SemaCXX/warn-assignment-condition.cpp
parent09959949896f2f0ff84b557176a8c21048d13cab (diff)
downloadbcm5719-llvm-b2d6df5c955ed2ff4a4ac237f1bd7966f133b426.tar.gz
bcm5719-llvm-b2d6df5c955ed2ff4a4ac237f1bd7966f133b426.zip
PR14124: When performing template instantiation of a qualified-id outside of a
class, diagnose if the qualified-id instantiates to a non-static class member. llvm-svn: 166268
Diffstat (limited to 'clang/test/SemaCXX/warn-assignment-condition.cpp')
-rw-r--r--clang/test/SemaCXX/warn-assignment-condition.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/SemaCXX/warn-assignment-condition.cpp b/clang/test/SemaCXX/warn-assignment-condition.cpp
index 04f2e795254..09084e36bb4 100644
--- a/clang/test/SemaCXX/warn-assignment-condition.cpp
+++ b/clang/test/SemaCXX/warn-assignment-condition.cpp
@@ -133,14 +133,14 @@ void test2() {
namespace rdar9027658 {
template <typename T>
-void f() {
- if ((T::g == 3)) { } // expected-warning {{equality comparison with extraneous parentheses}} \
+void f(T t) {
+ if ((t.g == 3)) { } // 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}}
}
struct S { int g; };
void test() {
- f<S>(); // expected-note {{in instantiation}}
+ f(S()); // expected-note {{in instantiation}}
}
}
OpenPOWER on IntegriCloud