variables. Fixes PR6948.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102436
91177308-0d34-0410-b5e6-
96231b3b80d8
return false;
}
+ // If we failed to complete the type for some reason, don't
+ // diagnose the variable.
+ if (Ty->isIncompleteType())
+ return false;
+
if (const TagType *TT = Ty->getAs<TagType>()) {
const TagDecl *Tag = TT->getDecl();
if (Tag->hasAttr<UnusedAttr>())
X0<int> i(p);
(void)i;
}
+
+namespace PR6948 {
+ template<typename T> class X;
+
+ void f() {
+ X<char> str (read_from_file()); // expected-error{{use of undeclared identifier 'read_from_file'}}
+ }
+}