}
// We can have a type template here if we're classifying a template argument.
- if (isa<TemplateDecl>(FirstDecl) && !isa<FunctionTemplateDecl>(FirstDecl))
+ if (isa<TemplateDecl>(FirstDecl) && !isa<FunctionTemplateDecl>(FirstDecl) &&
+ !isa<VarTemplateDecl>(FirstDecl))
return NameClassification::TypeTemplate(
TemplateName(cast<TemplateDecl>(FirstDecl)));
auto variadic1 = Variadic<>;
auto variadic2 = Variadic<int, int>;
#endif
+
+namespace VexingParse {
+ template <typename> int var; // expected-note {{declared here}}
+ int x(var); // expected-error {{cannot refer to variable template 'var' without a template argument list}}
+}