clang
9.0.0
|
#include "clang/AST/Expr.h"
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/EvaluatedExprVisitor.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/Mangle.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/Lexer.h"
#include "clang/Lex/LiteralSupport.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cstring>
#include "clang/AST/StmtNodes.inc"
#include "clang/AST/OperationKinds.def"
Go to the source code of this file.
Macros | |
#define | ABSTRACT_STMT(type) |
#define | STMT(type, base) case Stmt::type##Class: break; |
#define | EXPR(type, base) case Stmt::type##Class: return getExprLocImpl<type>(this, &type::getExprLoc); |
#define | UNARY_OPERATION(Name, Spelling) case UO_##Name: return Spelling; |
#define | CAST_OPERATION(Name) case CK_##Name: return #Name; |
#define | ABSTRACT_STMT(x) |
#define | CASTEXPR(Type, Base) |
#define | STMT(Type, Base) |
#define | BINARY_OPERATION(Name, Spelling) case BO_##Name: return Spelling; |
#define | ABSTRACT_STMT(Type) |
#define | STMT(Type, Base) case Type##Class: |
#define | EXPR(Type, Base) |
Functions | |
static void | AssertResultStorageKind (ConstantExpr::ResultStorageKind Kind) |
static void | computeDeclRefDependence (const ASTContext &Ctx, NamedDecl *D, QualType T, bool &TypeDependent, bool &ValueDependent, bool &InstantiationDependent) |
Compute the type-, value-, and instantiation-dependence of a declaration reference based on the declaration being referenced. More... | |
static QualType | getDecayedSourceLocExprType (const ASTContext &Ctx, SourceLocExpr::IdentKind Kind) |
static Expr * | IgnoreImpCastsSingleStep (Expr *E) |
static Expr * | IgnoreImpCastsExtraSingleStep (Expr *E) |
static Expr * | IgnoreCastsSingleStep (Expr *E) |
static Expr * | IgnoreLValueCastsSingleStep (Expr *E) |
static Expr * | IgnoreBaseCastsSingleStep (Expr *E) |
static Expr * | IgnoreImplicitSingleStep (Expr *E) |
static Expr * | IgnoreParensSingleStep (Expr *E) |
static Expr * | IgnoreNoopCastsSingleStep (const ASTContext &Ctx, Expr *E) |
static Expr * | IgnoreExprNodesImpl (Expr *E) |
template<typename FnTy , typename... FnTys> | |
static Expr * | IgnoreExprNodesImpl (Expr *E, FnTy &&Fn, FnTys &&... Fns) |
template<typename... FnTys> | |
static Expr * | IgnoreExprNodes (Expr *E, FnTys &&... Fns) |
Given an expression E and functions Fn_1,...,Fn_n : Expr * -> Expr *, Recursively apply each of the functions to E until reaching a fixed point. More... | |
static const Expr * | skipTemporaryBindingsNoOpCastsAndParens (const Expr *E) |
Skip over any no-op casts and any temporary-binding expressions. More... | |
#define ABSTRACT_STMT | ( | type | ) |
#define ABSTRACT_STMT | ( | x | ) |
#define ABSTRACT_STMT | ( | Type | ) |
#define BINARY_OPERATION | ( | Name, | |
Spelling | |||
) | case BO_##Name: return Spelling; |
#define CAST_OPERATION | ( | Name | ) | case CK_##Name: return #Name; |
#define EXPR | ( | type, | |
base | |||
) | case Stmt::type##Class: return getExprLocImpl<type>(this, &type::getExprLoc); |
#define STMT | ( | type, | |
base | |||
) | case Stmt::type##Class: break; |
#define UNARY_OPERATION | ( | Name, | |
Spelling | |||
) | case UO_##Name: return Spelling; |
|
static |
Definition at line 232 of file Expr.cpp.
References clang::ConstantExpr::RSK_APValue, clang::ConstantExpr::RSK_Int64, and clang::ConstantExpr::RSK_None.
|
static |
Compute the type-, value-, and instantiation-dependence of a declaration reference based on the declaration being referenced.
Definition at line 362 of file Expr.cpp.
References clang::DeclarationName::CXXConversionFunctionName, clang::Stmt::ExprBits, clang::DeclarationName::getCXXNameType(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::ASTContext::getLangOpts(), clang::DeclarationName::getNameKind(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), clang::Type::isIncompleteArrayType(), and clang::Type::isInstantiationDependentType().
|
static |
Definition at line 2129 of file Expr.cpp.
References clang::ASTContext::CharTy, clang::SourceLocExpr::Column, clang::SourceLocExpr::File, clang::SourceLocExpr::Function, clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), clang::ASTContext::getPointerType(), clang::ASTContext::getStringLiteralArrayType(), clang::SourceLocExpr::Line, and clang::ASTContext::UnsignedIntTy.
Definition at line 2835 of file Expr.cpp.
Referenced by clang::Expr::ignoreParenBaseCasts().
Definition at line 2809 of file Expr.cpp.
Referenced by clang::Expr::IgnoreCasts(), IgnoreLValueCastsSingleStep(), and clang::Expr::IgnoreParenCasts().
Given an expression E and functions Fn_1,...,Fn_n : Expr * -> Expr *, Recursively apply each of the functions to E until reaching a fixed point.
Note that a null E is valid; in this case nothing is done.
Definition at line 2917 of file Expr.cpp.
References IgnoreExprNodesImpl().
Referenced by clang::Expr::IgnoreCasts(), clang::Expr::IgnoreImpCasts(), clang::Expr::IgnoreImplicit(), clang::Expr::ignoreParenBaseCasts(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::IgnoreParenLValueCasts(), clang::Expr::IgnoreParenNoopCasts(), and clang::Expr::IgnoreParens().
Definition at line 2907 of file Expr.cpp.
Referenced by IgnoreExprNodes(), and IgnoreExprNodesImpl().
|
static |
Definition at line 2909 of file Expr.cpp.
References IgnoreExprNodesImpl().
Definition at line 2792 of file Expr.cpp.
References IgnoreImpCastsSingleStep().
Referenced by clang::Expr::IgnoreParenImpCasts().
Definition at line 2782 of file Expr.cpp.
Referenced by clang::Expr::IgnoreImpCasts(), IgnoreImpCastsExtraSingleStep(), and IgnoreImplicitSingleStep().
Definition at line 2845 of file Expr.cpp.
References IgnoreImpCastsSingleStep().
Referenced by clang::Expr::IgnoreImplicit().
Definition at line 2825 of file Expr.cpp.
References IgnoreCastsSingleStep().
Referenced by clang::Expr::IgnoreParenLValueCasts().
|
static |
Definition at line 2884 of file Expr.cpp.
References clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isIntegralType(), and clang::Type::isPointerType().
Referenced by clang::Expr::IgnoreParenNoopCasts().
Definition at line 2859 of file Expr.cpp.
Referenced by clang::Expr::ignoreParenBaseCasts(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::IgnoreParenLValueCasts(), clang::Expr::IgnoreParenNoopCasts(), and clang::Expr::IgnoreParens().
Skip over any no-op casts and any temporary-binding expressions.
Definition at line 2988 of file Expr.cpp.
References clang::Expr::IgnoreParens().
Referenced by clang::Expr::isTemporaryObject().