diff options
Diffstat (limited to 'test/SemaTemplate/instantiate-function-2.cpp')
| -rw-r--r-- | test/SemaTemplate/instantiate-function-2.cpp | 33 | 
1 files changed, 33 insertions, 0 deletions
| diff --git a/test/SemaTemplate/instantiate-function-2.cpp b/test/SemaTemplate/instantiate-function-2.cpp index ebc0ef3a9f96..087ede2b89cb 100644 --- a/test/SemaTemplate/instantiate-function-2.cpp +++ b/test/SemaTemplate/instantiate-function-2.cpp @@ -31,3 +31,36 @@ namespace UsedAttr {      foo<int>(); // expected-note{{instantiation of}}    }  } + +namespace PR9654 { +  typedef void ftype(int); + +  template<typename T> +  ftype f; + +  void g() { +    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>(); +} + +namespace PR10273 { +  template<typename T> void (f)(T t) {} + +  void g() { +    (f)(17); +  } +} | 
