Much to everyone's surprise, the default constructor for TypeResult produces
an instance with Invalid == false. This seems like a decision we may want to
revisit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138601
91177308-0d34-0410-b5e6-
96231b3b80d8
QualType Result = CheckTemplateIdType(Template, TemplateLoc, TemplateArgs);
if (Result.isNull())
- return TypeResult();
+ return TypeResult(true);
// Check the tag kind
if (const RecordType *RT = Result->getAs<RecordType>()) {
--- /dev/null
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+class G {};
+template <Foo> // expected-error{{unknown type name 'Foo'}} \
+ // expected-note{{template parameter is declared here}}
+class Bar {};
+
+class Bar<G> blah_test; // expected-error{{template argument for non-type template parameter must be an expression}}