clang 22.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>
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 666 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::TemplateArgument::StructuralValue, clang::T, clang::TemplateArgument::Template, clang::TemplateArgument::TemplateExpansion, toString(), and clang::TemplateArgument::Type.
Referenced by clang::operator<<().
Definition at line 136 of file TemplateBase.cpp.
References clang::ast_matchers::arrayType, and clang::ast_matchers::type.
Referenced by needsAmpersandOnTemplateArg().
|
static |
Definition at line 212 of file TemplateBase.cpp.
References clang::ASTContext::getTemplateParamObjectDecl(), clang::T, and V.
Referenced by clang::TemplateArgument::TemplateArgument().
Definition at line 145 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 53 of file TemplateBase.cpp.
References clang::Ascii, clang::TemplateArgument::getAsIntegral(), clang::TemplateArgument::getIntegralType(), clang::QualType::getTypePtr(), clang::PrintingPolicy::MSVCFormatting, clang::CharacterLiteral::print(), clang::T, clang::PrintingPolicy::UseEnumerators, clang::UTF16, clang::UTF32, clang::UTF8, and clang::Wide.
Referenced by clang::TemplateArgument::print().