qualifiers. Fixes PR6021.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93513
91177308-0d34-0410-b5e6-
96231b3b80d8
if (T.isNull())
return 0;
- T = Context.getCanonicalType(T);
+ T = Context.getCanonicalType(T).getUnqualifiedType();
- for (DeclContext *Ctx = CurContext; Ctx; Ctx = Ctx->getParent()) {
+ for (DeclContext *Ctx = CurContext; Ctx; Ctx = Ctx->getLookupParent()) {
// If we've hit a namespace or the global scope, then the
// nested-name-specifier can't refer to the current instantiation.
if (Ctx->isFileContext())
this->f<T*>();
}
};
+
+namespace PR6021 {
+ template< class T1, class T2 >
+ class Outer
+ {
+ public: // Range operations
+ template< class X > X tmpl( const X* = 0 ) const;
+
+ struct Inner
+ {
+ const Outer& o;
+
+ template< class X >
+ operator X() const
+ {
+ return o.tmpl<X>();
+ }
+ };
+ };
+}