diff options
Diffstat (limited to 'clang/test/SemaTemplate/instantiate-function-2.cpp')
-rw-r--r-- | clang/test/SemaTemplate/instantiate-function-2.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-function-2.cpp b/clang/test/SemaTemplate/instantiate-function-2.cpp index b4c0d9d6393..21eccd49013 100644 --- a/clang/test/SemaTemplate/instantiate-function-2.cpp +++ b/clang/test/SemaTemplate/instantiate-function-2.cpp @@ -42,3 +42,17 @@ namespace PR9654 { f<int>(0); } } + +namespace AliasTagDef { + template<typename T> + T f() { + using S = struct { // expected-warning {{C++0x}} + T g() { + return T(); + } + }; + return S().g(); + } + + int n = f<int>(); +} |