clang 20.0.0git
|
#include "clang/AST/TemplateBase.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DependenceFlags.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <optional>
Go to the source code of this file.
Functions | |
static void | printIntegral (const TemplateArgument &TemplArg, raw_ostream &Out, const PrintingPolicy &Policy, bool IncludeType) |
Print a template integral argument value. | |
static unsigned | getArrayDepth (QualType type) |
static bool | needsAmpersandOnTemplateArg (QualType paramType, QualType argType) |
static const ValueDecl * | getAsSimpleValueDeclRef (const ASTContext &Ctx, QualType T, const APValue &V) |
template<typename T > | |
static const T & | DiagTemplateArg (const T &DB, const TemplateArgument &Arg) |
|
static |
Definition at line 625 of file TemplateBase.cpp.
References clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, clang::TemplateArgument::getAsDecl(), clang::TemplateArgument::getAsExpr(), clang::TemplateArgument::getAsIntegral(), clang::TemplateArgument::getAsStructuralValue(), clang::TemplateArgument::getAsTemplate(), clang::TemplateArgument::getAsTemplateOrTemplatePattern(), clang::TemplateArgument::getAsType(), clang::TemplateArgument::getKind(), clang::TemplateArgument::getStructuralValueType(), clang::TemplateArgument::Integral, clang::TemplateArgument::Null, clang::TemplateArgument::NullPtr, clang::TemplateArgument::Pack, clang::TemplateArgument::print(), clang::APValue::printPretty(), clang::Stmt::printPretty(), clang::TemplateArgument::StructuralValue, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, toString(), and clang::TemplateArgument::Type.
Referenced by clang::operator<<().
Definition at line 137 of file TemplateBase.cpp.
References clang::ast_matchers::arrayType, and clang::ast_matchers::type.
Referenced by needsAmpersandOnTemplateArg().
|
static |
Definition at line 213 of file TemplateBase.cpp.
References clang::ASTContext::getTemplateParamObjectDecl(), clang::Type::isDependentType(), clang::Type::isInstantiationDependentType(), clang::T, and V.
Referenced by clang::TemplateArgument::TemplateArgument().
Definition at line 146 of file TemplateBase.cpp.
References getArrayDepth(), clang::Type::getPointeeType(), clang::Type::isArrayType(), clang::Type::isMemberPointerType(), and clang::Type::isPointerType().
Referenced by clang::TemplateArgument::print().
|
static |
Print a template integral argument value.
TemplArg | the TemplateArgument instance to print. |
Out | the raw_ostream instance to use for printing. |
Policy | the printing policy for EnumConstantDecl printing. |
IncludeType | If set, ensure that the type of the expression printed matches the type of the template argument. |
Definition at line 54 of file TemplateBase.cpp.
References clang::Type::getAs(), clang::TemplateArgument::getAsIntegral(), clang::QualType::getAsString(), clang::Type::getCanonicalTypeInternal(), clang::TemplateArgument::getIntegralType(), clang::QualType::getTypePtr(), clang::Type::isAnyCharacterType(), clang::Type::isBooleanType(), clang::Type::isChar16Type(), clang::Type::isChar32Type(), clang::Type::isChar8Type(), clang::Type::isCharType(), clang::Type::isSpecificBuiltinType(), clang::Type::isWideCharType(), clang::PrintingPolicy::MSVCFormatting, clang::CharacterLiteral::print(), clang::T, and clang::PrintingPolicy::UseEnumerators.
Referenced by clang::TemplateArgument::print().