diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-10-19 06:32:17 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-10-19 06:32:17 +0000 |
commit | 80ddc31c5379df78a007eaf08d531efdbcd9b161 (patch) | |
tree | 1c4fe3c42142e0e2a1f7e6b10369dca48c6c6f26 /test/SemaCXX/warn-assignment-condition.cpp | |
parent | 0b4cc950c54c8dd2de51587ef48446de670fa012 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/warn-assignment-condition.cpp')
-rw-r--r-- | test/SemaCXX/warn-assignment-condition.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/SemaCXX/warn-assignment-condition.cpp b/test/SemaCXX/warn-assignment-condition.cpp index 04f2e79525..09084e36bb 100644 --- a/test/SemaCXX/warn-assignment-condition.cpp +++ b/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}} } } |