Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:51

0001 //===--- TemplateKinds.h - Enum values for C++ Template Kinds ---*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 ///
0009 /// \file
0010 /// Defines the clang::TemplateNameKind enum.
0011 ///
0012 //===----------------------------------------------------------------------===//
0013 #ifndef LLVM_CLANG_BASIC_TEMPLATEKINDS_H
0014 #define LLVM_CLANG_BASIC_TEMPLATEKINDS_H
0015 
0016 namespace clang {
0017 
0018 /// Specifies the kind of template name that an identifier refers to.
0019 /// Be careful when changing this: this enumeration is used in diagnostics.
0020 enum TemplateNameKind {
0021   /// The name does not refer to a template.
0022   TNK_Non_template = 0,
0023   /// The name refers to a function template or a set of overloaded
0024   /// functions that includes at least one function template, or (in C++20)
0025   /// refers to a set of non-template functions but is followed by a '<'.
0026   TNK_Function_template,
0027   /// The name refers to a template whose specialization produces a
0028   /// type. The template itself could be a class template, template
0029   /// template parameter, or template alias.
0030   TNK_Type_template,
0031   /// The name refers to a variable template whose specialization produces a
0032   /// variable.
0033   TNK_Var_template,
0034   /// The name refers to a dependent template name:
0035   /// \code
0036   /// template<typename MetaFun, typename T1, typename T2> struct apply2 {
0037   ///   typedef typename MetaFun::template apply<T1, T2>::type type;
0038   /// };
0039   /// \endcode
0040   ///
0041   /// Here, "apply" is a dependent template name within the typename
0042   /// specifier in the typedef. "apply" is a nested template, and
0043   /// whether the template name is assumed to refer to a type template or a
0044   /// function template depends on the context in which the template
0045   /// name occurs.
0046   TNK_Dependent_template_name,
0047   /// Lookup for the name failed, but we're assuming it was a template name
0048   /// anyway. In C++20, this is mandatory in order to parse ADL-only function
0049   /// template specialization calls.
0050   TNK_Undeclared_template,
0051   /// The name refers to a concept.
0052   TNK_Concept_template,
0053 };
0054 
0055 }
0056 #endif