clang 20.0.0git
TemplateKinds.h
Go to the documentation of this file.
1//===--- TemplateKinds.h - Enum values for C++ Template Kinds ---*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file
10/// Defines the clang::TemplateNameKind enum.
11///
12//===----------------------------------------------------------------------===//
13#ifndef LLVM_CLANG_BASIC_TEMPLATEKINDS_H
14#define LLVM_CLANG_BASIC_TEMPLATEKINDS_H
15
16namespace clang {
17
18/// Specifies the kind of template name that an identifier refers to.
19/// Be careful when changing this: this enumeration is used in diagnostics.
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 '<'.
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
32 /// variable.
34 /// The name refers to a dependent template name:
35 /// \code
36 /// template<typename MetaFun, typename T1, typename T2> struct apply2 {
37 /// typedef typename MetaFun::template apply<T1, T2>::type type;
38 /// };
39 /// \endcode
40 ///
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
45 /// name occurs.
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.
51 /// The name refers to a concept.
53};
54
55}
56#endif
The JSON file list parser is used to communicate input to InstallAPI.
TemplateNameKind
Specifies the kind of template name that an identifier refers to.
Definition: TemplateKinds.h:20
@ TNK_Var_template
The name refers to a variable template whose specialization produces a variable.
Definition: TemplateKinds.h:33
@ TNK_Type_template
The name refers to a template whose specialization produces a type.
Definition: TemplateKinds.h:30
@ TNK_Dependent_template_name
The name refers to a dependent template name:
Definition: TemplateKinds.h:46
@ TNK_Function_template
The name refers to a function template or a set of overloaded functions that includes at least one fu...
Definition: TemplateKinds.h:26
@ TNK_Concept_template
The name refers to a concept.
Definition: TemplateKinds.h:52
@ TNK_Non_template
The name does not refer to a template.
Definition: TemplateKinds.h:22
@ TNK_Undeclared_template
Lookup for the name failed, but we're assuming it was a template name anyway.
Definition: TemplateKinds.h:50