1 //===--- TemplateKinds.h - Enum values for C++ Template Kinds ---*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 /// Defines the clang::TemplateNameKind enum.
12 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_CLANG_BASIC_TEMPLATEKINDS_H
14 #define LLVM_CLANG_BASIC_TEMPLATEKINDS_H
18 /// Specifies the kind of template name that an identifier refers to.
19 /// Be careful when changing this: this enumeration is used in diagnostics.
20 enum TemplateNameKind {
21 /// The name does not refer to a template.
23 /// The name refers to a function template or a set of overloaded
24 /// functions that includes at least one function template, or (in C++20)
25 /// refers to a set of non-template functions but is followed by a '<'.
26 TNK_Function_template,
27 /// The name refers to a template whose specialization produces a
28 /// type. The template itself could be a class template, template
29 /// template parameter, or template alias.
31 /// The name refers to a variable template whose specialization produces a
34 /// The name refers to a dependent template name:
36 /// template<typename MetaFun, typename T1, typename T2> struct apply2 {
37 /// typedef typename MetaFun::template apply<T1, T2>::type type;
41 /// Here, "apply" is a dependent template name within the typename
42 /// specifier in the typedef. "apply" is a nested template, and
43 /// whether the template name is assumed to refer to a type template or a
44 /// function template depends on the context in which the template
46 TNK_Dependent_template_name,
47 /// Lookup for the name failed, but we're assuming it was a template name
48 /// anyway. In C++20, this is mandatory in order to parse ADL-only function
49 /// template specialization calls.
50 TNK_Undeclared_template,
51 /// The name refers to a concept.