//===--- ParsedTemplate.h - Template Parsing Data Types ---------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file provides data structures that store the parsed representation of // templates. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_SEMA_PARSEDTEMPLATE_H #define LLVM_CLANG_SEMA_PARSEDTEMPLATE_H #include "clang/Basic/OperatorKinds.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/TemplateKinds.h" #include "clang/Sema/DeclSpec.h" #include "clang/Sema/Ownership.h" #include "llvm/ADT/SmallVector.h" #include <cassert> #include <cstdlib> #include <new> namespace clang { /// Represents the parsed form of a C++ template argument. class ParsedTemplateArgument { … }; /// Information about a template-id annotation /// token. /// /// A template-id annotation token contains the template name, /// template arguments, and the source locations for important /// tokens. All of the information about template arguments is allocated /// directly after this structure. /// A template-id annotation token can also be generated by a type-constraint /// construct with no explicit template arguments, e.g. "template<C T>" would /// annotate C as a TemplateIdAnnotation with no template arguments (the angle /// locations would be invalid in this case). struct TemplateIdAnnotation final : private llvm::TrailingObjects<TemplateIdAnnotation, ParsedTemplateArgument> { … }; /// Retrieves the range of the given template parameter lists. SourceRange getTemplateParamsRange(TemplateParameterList const *const *Params, unsigned NumParams); } // end namespace clang #endif // LLVM_CLANG_SEMA_PARSEDTEMPLATE_H