diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-05-21 23:29:46 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-05-21 23:29:46 +0000 |
| commit | eebe125f77f7e5650c1809464dfa9dfd62b07507 (patch) | |
| tree | c14675fa8eda780452fc8b74d692e6ceba4f4764 /clang/test | |
| parent | 69e25c45e47f3f3b545f509bb86440efd664f812 (diff) | |
| download | bcm5719-llvm-eebe125f77f7e5650c1809464dfa9dfd62b07507.tar.gz bcm5719-llvm-eebe125f77f7e5650c1809464dfa9dfd62b07507.zip | |
Fix crash-on-invalid: only use TransformAddressOfOperand when transforming the
operand of a unary address-of expression, not for *all* expressions!
llvm-svn: 182436
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaTemplate/instantiate-expr-5.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-expr-5.cpp b/clang/test/SemaTemplate/instantiate-expr-5.cpp index 13b7eae21fd..c42c2a964dc 100644 --- a/clang/test/SemaTemplate/instantiate-expr-5.cpp +++ b/clang/test/SemaTemplate/instantiate-expr-5.cpp @@ -36,3 +36,13 @@ namespace PR5880 { template void test_anon_union<int>(); } + +namespace AddrOfClassMember { + template <typename T> struct S { + int n; + static void f() { + +T::n; // expected-error {{invalid use of member}} + } + }; + void g() { S<S<int> >::f(); } // expected-note {{in instantiation of}} +} |

