|
clang
5.0.0
|
#include "clang/AST/ASTContext.h"#include "clang/AST/CharUnits.h"#include "clang/AST/DeclCXX.h"#include "clang/AST/DeclObjC.h"#include "clang/AST/EvaluatedExprVisitor.h"#include "clang/AST/Expr.h"#include "clang/AST/ExprCXX.h"#include "clang/AST/ExprObjC.h"#include "clang/AST/ExprOpenMP.h"#include "clang/AST/StmtCXX.h"#include "clang/AST/StmtObjC.h"#include "clang/Analysis/Analyses/FormatString.h"#include "clang/Basic/CharInfo.h"#include "clang/Basic/TargetBuiltins.h"#include "clang/Basic/TargetInfo.h"#include "clang/Lex/Lexer.h"#include "clang/Sema/Initialization.h"#include "clang/Sema/Lookup.h"#include "clang/Sema/ScopeInfo.h"#include "clang/Sema/Sema.h"#include "clang/Sema/SemaInternal.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallBitVector.h"#include "llvm/ADT/SmallString.h"#include "llvm/Support/ConvertUTF.h"#include "llvm/Support/Format.h"#include "llvm/Support/Locale.h"#include "llvm/Support/raw_ostream.h"#include "clang/Basic/Builtins.def"#include "clang/Basic/arm_neon.inc"Go to the source code of this file.
Macros | |
| #define | BUILTIN(ID, TYPE, ATTRS) |
| #define | ATOMIC_BUILTIN(ID, TYPE, ATTRS) |
| #define | GET_NEON_OVERLOAD_CHECK |
| #define | GET_NEON_IMMEDIATE_CHECK |
| #define | BUILTIN_ROW(x) |
Enumerations | |
| enum | StringLiteralCheckType |
| enum | AbsoluteValueKind { AVK_Integer, AVK_Floating, AVK_Complex } |
Functions | |
| static bool | checkArgCount (Sema &S, CallExpr *call, unsigned desiredArgCount) |
| Checks that a call expression's argument count is the desired number. More... | |
| static bool | SemaBuiltinAnnotation (Sema &S, CallExpr *TheCall) |
| Check that the first argument to __builtin_annotation is an integer and the second argument is a non-wide string literal. More... | |
| static bool | SemaBuiltinAddressof (Sema &S, CallExpr *TheCall) |
| Check that the argument to __builtin_addressof is a glvalue, and set the result type to the corresponding pointer type. More... | |
| static bool | SemaBuiltinOverflow (Sema &S, CallExpr *TheCall) |
| static void | SemaBuiltinMemChkCall (Sema &S, FunctionDecl *FDecl, CallExpr *TheCall, unsigned SizeIdx, unsigned DstSizeIdx) |
| static bool | SemaBuiltinCallWithStaticChain (Sema &S, CallExpr *BuiltinCall) |
| static bool | SemaBuiltinSEHScopeCheck (Sema &SemaRef, CallExpr *TheCall, Scope::ScopeFlags NeededScopeFlags, unsigned DiagID) |
| static bool | isBlockPointer (Expr *Arg) |
| static bool | checkOpenCLBlockArgs (Sema &S, Expr *BlockArg) |
| OpenCL C v2.0, s6.13.17.2 - Checks that the block parameters are all local void*, which is a requirement of device side enqueue. More... | |
| static bool | SemaOpenCLBuiltinKernelWorkGroupSize (Sema &S, CallExpr *TheCall) |
| OpenCL C v2.0, s6.13.17.6 - Check the argument to the get_kernel_work_group_size and get_kernel_preferred_work_group_size_multiple builtin functions. More... | |
| static bool | checkOpenCLEnqueueIntType (Sema &S, Expr *E, const QualType &IntType) |
| Diagnose integer type and any valid implicit conversion to it. More... | |
| static bool | checkOpenCLEnqueueLocalSizeArgs (Sema &S, CallExpr *TheCall, unsigned Start, unsigned End) |
| static bool | checkOpenCLEnqueueVariadicArgs (Sema &S, CallExpr *TheCall, Expr *BlockArg, unsigned NumNonVarArgs) |
| OpenCL v2.0, s6.13.17.1 - Check that sizes are provided for all 'local void*' parameter of passed block. More... | |
| static bool | SemaOpenCLBuiltinEnqueueKernel (Sema &S, CallExpr *TheCall) |
| OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different overload formats specified in Table 6.13.17.1. More... | |
| static OpenCLAccessAttr * | getOpenCLArgAccess (const Decl *D) |
| Returns OpenCL access qual. More... | |
| static bool | checkOpenCLPipeArg (Sema &S, CallExpr *Call) |
| Returns true if pipe element type is different from the pointer. More... | |
| static bool | checkOpenCLPipePacketType (Sema &S, CallExpr *Call, unsigned Idx) |
| Returns true if pipe element type is different from the pointer. More... | |
| static bool | SemaBuiltinRWPipe (Sema &S, CallExpr *Call) |
| static bool | SemaBuiltinReserveRWPipe (Sema &S, CallExpr *Call) |
| static bool | SemaBuiltinCommitRWPipe (Sema &S, CallExpr *Call) |
| static bool | SemaBuiltinPipePackets (Sema &S, CallExpr *Call) |
| static bool | SemaOpenCLBuiltinToAddr (Sema &S, unsigned BuiltinID, CallExpr *Call) |
| static unsigned | RFT (unsigned t, bool shift=false, bool ForceQuad=false) |
| static QualType | getNeonEltType (NeonTypeFlags Flags, ASTContext &Context, bool IsPolyUnsigned, bool IsInt64Long) |
| getNeonEltType - Return the QualType corresponding to the elements of the vector type specified by the NeonTypeFlags. More... | |
| static bool | SemaBuiltinCpuSupports (Sema &S, CallExpr *TheCall) |
| SemaBuiltinCpuSupports - Handle __builtin_cpu_supports(char *). More... | |
| static bool | CheckNonNullExpr (Sema &S, const Expr *Expr) |
| Checks if a the given expression evaluates to null. More... | |
| static void | CheckNonNullArgument (Sema &S, const Expr *ArgExpr, SourceLocation CallSiteLoc) |
| static void | DiagnoseCStringFormatDirectiveInCFAPI (Sema &S, const NamedDecl *FDecl, Expr **Args, unsigned NumArgs) |
| Diagnose use of s directive in an NSString which is being passed as formatting string to formatting method. More... | |
| static bool | isNonNullType (ASTContext &ctx, QualType type) |
| Determine whether the given type has a non-null nullability annotation. More... | |
| static void | CheckNonNullArguments (Sema &S, const NamedDecl *FDecl, const FunctionProtoType *Proto, ArrayRef< const Expr * > Args, SourceLocation CallSiteLoc) |
| static bool | isValidOrderingForOp (int64_t Ordering, AtomicExpr::AtomicOp Op) |
| static bool | checkBuiltinArgument (Sema &S, CallExpr *E, unsigned ArgIndex) |
| checkBuiltinArgument - Given a call to a builtin function, perform normal type-checking on the given argument, updating the call in place. More... | |
| static bool | checkVAStartABI (Sema &S, unsigned BuiltinID, Expr *Fn) |
| Check that the user is calling the appropriate va_start builtin for the target and calling convention. More... | |
| static bool | checkVAStartIsInVariadicFunction (Sema &S, Expr *Fn, ParmVarDecl **LastParam=nullptr) |
| static void | sumOffsets (llvm::APSInt &Offset, llvm::APSInt Addend, BinaryOperatorKind BinOpKind, bool AddendIsRight) |
| static void | CheckFormatString (Sema &S, const FormatStringLiteral *FExpr, const Expr *OrigFormatExpr, ArrayRef< const Expr * > Args, bool HasVAListArg, unsigned format_idx, unsigned firstDataArg, Sema::FormatStringType Type, bool inFunctionCall, Sema::VariadicCallType CallType, llvm::SmallBitVector &CheckedVarArgs, UncoveredArgHandler &UncoveredArg) |
| static StringLiteralCheckType | checkFormatStringExpr (Sema &S, const Expr *E, ArrayRef< const Expr * > Args, bool HasVAListArg, unsigned format_idx, unsigned firstDataArg, Sema::FormatStringType Type, Sema::VariadicCallType CallType, bool InFunctionCall, llvm::SmallBitVector &CheckedVarArgs, UncoveredArgHandler &UncoveredArg, llvm::APSInt Offset) |
| template<typename MemberKind > | |
| static llvm::SmallPtrSet < MemberKind *, 1 > | CXXRecordMembersNamed (StringRef Name, Sema &S, QualType Ty) |
| static bool | requiresParensToAddCast (const Expr *E) |
| static std::pair< QualType, StringRef > | shouldNotPrintDirectly (const ASTContext &Context, QualType IntendedTy, const Expr *E) |
| static unsigned | getLargerAbsoluteValueFunction (unsigned AbsFunction) |
| static QualType | getAbsoluteValueArgumentType (ASTContext &Context, unsigned AbsType) |
| static unsigned | getBestAbsFunction (ASTContext &Context, QualType ArgType, unsigned AbsFunctionKind) |
| static AbsoluteValueKind | getAbsoluteValueKind (QualType T) |
| static unsigned | changeAbsFunction (unsigned AbsKind, AbsoluteValueKind ValueKind) |
| static unsigned | getAbsoluteValueFunctionKind (const FunctionDecl *FDecl) |
| static void | emitReplacement (Sema &S, SourceLocation Loc, SourceRange Range, unsigned AbsKind, QualType ArgType) |
| template<std::size_t StrLen> | |
| static bool | IsStdFunction (const FunctionDecl *FDecl, const char(&Str)[StrLen]) |
| static bool | CheckMemorySizeofForComparison (Sema &S, const Expr *E, IdentifierInfo *FnName, SourceLocation FnLoc, SourceLocation RParenLoc) |
| Takes the expression passed to the size_t parameter of functions such as memcmp, strncat, etc and warns if it's a comparison. More... | |
| static const CXXRecordDecl * | getContainedDynamicClass (QualType T, bool &IsContained) |
| Determine whether the given type is or contains a dynamic class type (e.g., whether it has a vtable). More... | |
| static const Expr * | getSizeOfExprArg (const Expr *E) |
| If E is a sizeof expression, returns its argument expression, otherwise returns NULL. More... | |
| static QualType | getSizeOfArgType (const Expr *E) |
| If E is a sizeof expression, returns its argument type. More... | |
| static const Expr * | ignoreLiteralAdditions (const Expr *Ex, ASTContext &Ctx) |
| static bool | isConstantSizeArrayWithMoreThanOneElement (QualType Ty, ASTContext &Context) |
| static bool | referToTheSameDecl (const Expr *E1, const Expr *E2) |
| Check if two expressions refer to the same declaration. More... | |
| static const Expr * | getStrlenExprArg (const Expr *E) |
| static const Expr * | EvalVal (const Expr *E, SmallVectorImpl< const DeclRefExpr * > &refVars, const Decl *ParentDecl) |
| EvalVal - This function is complements EvalAddr in the mutual recursion. More... | |
| static const Expr * | EvalAddr (const Expr *E, SmallVectorImpl< const DeclRefExpr * > &refVars, const Decl *ParentDecl) |
| EvalAddr - EvalAddr and EvalVal are mutually recursive functions that check if the expression in a return statement evaluates to an address to a location on the stack, a local block, an address of a label, or a reference to local temporary. More... | |
| static void | CheckReturnStackAddr (Sema &S, Expr *RetValExp, QualType lhsType, SourceLocation ReturnLoc) |
| CheckReturnStackAddr - Check if a return statement returns the address of a stack variable. More... | |
| static bool | CheckForReference (Sema &SemaRef, const Expr *E, const PartialDiagnostic &PD) |
| static bool | IsInAnyMacroBody (const SourceManager &SM, SourceLocation Loc) |
| static void | diagnoseArrayStarInParamType (Sema &S, QualType PType, SourceLocation Loc) |
| static CharUnits | getDeclAlign (Expr *E, CharUnits TypeAlign, ASTContext &Context) |
| A helper function to get the alignment of a Decl referred to by DeclRefExpr or MemberExpr. More... | |
| static bool | IsTailPaddedMemberArray (Sema &S, const llvm::APInt &Size, const NamedDecl *ND) |
| Check whether this array fits the idiom of a size-one tail padded array member of a struct. More... | |
| static bool | considerVariable (VarDecl *var, Expr *ref, RetainCycleOwner &owner) |
| Consider whether capturing the given variable can possibly lead to a retain cycle. More... | |
| static bool | findRetainCycleOwner (Sema &S, Expr *e, RetainCycleOwner &owner) |
| static Expr * | findCapturingExpr (Sema &S, Expr *e, RetainCycleOwner &owner) |
| Check whether the given argument is a block which captures a variable. More... | |
| static void | diagnoseRetainCycle (Sema &S, Expr *capturer, RetainCycleOwner &owner) |
| static bool | isSetterLikeSelector (Selector sel) |
| Check for a keyword selector that starts with the word 'add' or 'set'. More... | |
| static Optional< int > | GetNSMutableArrayArgumentIndex (Sema &S, ObjCMessageExpr *Message) |
| static Optional< int > | GetNSMutableDictionaryArgumentIndex (Sema &S, ObjCMessageExpr *Message) |
| static Optional< int > | GetNSSetArgumentIndex (Sema &S, ObjCMessageExpr *Message) |
| static bool | checkUnsafeAssignLiteral (Sema &S, SourceLocation Loc, Expr *RHS, bool isProperty) |
| static bool | checkUnsafeAssignObject (Sema &S, SourceLocation Loc, Qualifiers::ObjCLifetime LT, Expr *RHS, bool isProperty) |
| #define BUILTIN_ROW | ( | x | ) |
| #define GET_NEON_IMMEDIATE_CHECK |
| #define GET_NEON_OVERLOAD_CHECK |
| enum AbsoluteValueKind |
| Enumerator | |
|---|---|
| AVK_Integer | |
| AVK_Floating | |
| AVK_Complex | |
Definition at line 6676 of file SemaChecking.cpp.
Definition at line 4512 of file SemaChecking.cpp.
|
static |
Definition at line 6695 of file SemaChecking.cpp.
References AVK_Complex, AVK_Floating, and AVK_Integer.
Checks that a call expression's argument count is the desired number.
This is useful when doing custom type-checking. Returns true on error.
Definition at line 55 of file SemaChecking.cpp.
References clang::Sema::Diag(), clang::CallExpr::getArg(), clang::Stmt::getLocEnd(), clang::CallExpr::getLocEnd(), clang::Stmt::getLocStart(), clang::CallExpr::getNumArgs(), and clang::Stmt::getSourceRange().
Referenced by SemaBuiltinAddressof(), SemaBuiltinAnnotation(), SemaBuiltinCallWithStaticChain(), SemaBuiltinCommitRWPipe(), SemaBuiltinOverflow(), SemaBuiltinPipePackets(), SemaBuiltinReserveRWPipe(), and SemaOpenCLBuiltinKernelWorkGroupSize().
checkBuiltinArgument - Given a call to a builtin function, perform normal type-checking on the given argument, updating the call in place.
This is useful when a builtin function requires custom type-checking for some of its arguments but not necessarily all of them.
Returns true on error.
Definition at line 3111 of file SemaChecking.cpp.
References clang::Sema::Context, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::CallExpr::getArg(), clang::CallExpr::getDirectCallee(), clang::FunctionDecl::getParamDecl(), clang::InitializedEntity::InitializeParameter(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Sema::PerformCopyInitialization(), and clang::CallExpr::setArg().
|
static |
Definition at line 6490 of file SemaChecking.cpp.
References clang::Sema::Context, clang::Sema::FST_FreeBSDKPrintf, clang::Sema::FST_NSString, clang::Sema::FST_OSLog, clang::Sema::FST_OSTrace, clang::Sema::FST_Printf, clang::Sema::FST_Scanf, clang::ASTContext::getAsConstantArrayType(), clang::Sema::getLangOpts(), clang::ConstantArrayType::getSize(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), max(), min(), clang::analyze_format_string::ParsePrintfString(), clang::analyze_format_string::ParseScanfString(), and clang::Sema::PDiag().
Referenced by checkFormatStringExpr().
|
static |
Definition at line 4623 of file SemaChecking.cpp.
References CheckFormatString(), clang::Sema::Context, E, clang::Expr::EvaluateAsBooleanCondition(), clang::Expr::EvaluateAsInt(), clang::CallExpr::getArg(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::Sema::getASTContext(), clang::CallExpr::getCalleeDecl(), clang::AbstractConditionalOperator::getCond(), clang::DeclRefExpr::getDecl(), clang::AbstractConditionalOperator::getFalseExpr(), clang::Sema::GetFormatStringType(), clang::StringLiteral::getLength(), clang::BinaryOperator::getLHS(), clang::UnaryOperator::getOpcode(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Stmt::getStmtClass(), clang::StringLiteral::getString(), clang::UnaryOperator::getSubExpr(), clang::AbstractConditionalOperator::getTrueExpr(), clang::Expr::getType(), clang::Expr::IgnoreParenCasts(), clang::BinaryOperator::isAdditiveOp(), clang::QualType::isConstant(), clang::Expr::isNullPointerConstant(), clang::Type::isObjCObjectPointerType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::Expr::NPC_ValueDependentIsNotNull, and sumOffsets().
|
static |
Definition at line 9683 of file SemaChecking.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::CallExpr::getCallReturnType(), clang::DeclRefExpr::getDecl(), clang::CallExpr::getDirectCallee(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Expr::IgnoreParenImpCasts(), and clang::Type::isReferenceType().
Referenced by clang::Sema::DiagnoseAlwaysNonNullPointer().
|
static |
Takes the expression passed to the size_t parameter of functions such as memcmp, strncat, etc and warns if it's a comparison.
This is to catch typos like if (memcmp(&a, &b, sizeof(a) > 0)).
Definition at line 7036 of file SemaChecking.cpp.
References clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::Sema::Diag(), E, clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::BinaryOperator::getLHS(), clang::Stmt::getLocEnd(), clang::Sema::getLocForEndOfToken(), clang::BinaryOperator::getOperatorLoc(), clang::Stmt::getSourceRange(), clang::BinaryOperator::isComparisonOp(), clang::BinaryOperator::isEqualityOp(), and clang::BinaryOperator::isLogicalOp().
|
static |
Definition at line 2388 of file SemaChecking.cpp.
References CheckNonNullExpr(), clang::Sema::DiagRuntimeBehavior(), clang::Stmt::getSourceRange(), and clang::Sema::PDiag().
Referenced by CheckNonNullArguments().
|
static |
Definition at line 2455 of file SemaChecking.cpp.
References CheckNonNullArgument(), clang::Sema::Context, E, clang::Type::getAs(), clang::FunctionProtoType::getParamTypes(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), I, isNonNullType(), clang::Sema::isValidPointerAttrType(), clang::NonNull, clang::Decl::specific_attrs(), and clang::ast_matchers::type.
Checks if a the given expression evaluates to null.
Returns true if the value evaluates to null.
Definition at line 2363 of file SemaChecking.cpp.
References clang::Sema::Context, clang::Expr::EvaluateAsBooleanCondition(), clang::Type::getAsUnionType(), clang::Type::getNullability(), clang::Expr::getType(), clang::Expr::IgnoreImplicit(), clang::Expr::isValueDependent(), and clang::NonNull.
Referenced by CheckNonNullArgument().
OpenCL C v2.0, s6.13.17.2 - Checks that the block parameters are all local void*, which is a requirement of device side enqueue.
Definition at line 269 of file SemaChecking.cpp.
References clang::Sema::Diag(), E, clang::Type::getAs(), clang::QualType::getCanonicalType(), clang::DeclaratorDecl::getLocStart(), clang::BlockDecl::getParamDecl(), clang::BlockPointerType::getPointeeType(), clang::Expr::getType(), I, and clang::LangAS::opencl_local.
Referenced by SemaOpenCLBuiltinEnqueueKernel(), and SemaOpenCLBuiltinKernelWorkGroupSize().
Diagnose integer type and any valid implicit conversion to it.
Diagnose integer type and any valid implicit convertion to it.
Definition at line 9667 of file SemaChecking.cpp.
References clang::Sema::Diag(), clang::Stmt::getLocStart(), clang::Expr::getType(), and clang::Type::isIntegerType().
Referenced by checkOpenCLEnqueueLocalSizeArgs().
|
static |
Definition at line 323 of file SemaChecking.cpp.
References checkOpenCLEnqueueIntType(), clang::Sema::Context, End, clang::CallExpr::getArg(), clang::ASTContext::getSizeType(), and I.
Referenced by checkOpenCLEnqueueVariadicArgs().
|
static |
OpenCL v2.0, s6.13.17.1 - Check that sizes are provided for all 'local void*' parameter of passed block.
Definition at line 334 of file SemaChecking.cpp.
References checkOpenCLEnqueueLocalSizeArgs(), clang::Sema::Diag(), clang::Type::getAs(), clang::QualType::getCanonicalType(), clang::CallExpr::getLocStart(), clang::CallExpr::getNumArgs(), clang::BlockPointerType::getPointeeType(), and clang::Expr::getType().
Referenced by SemaOpenCLBuiltinEnqueueKernel().
Returns true if pipe element type is different from the pointer.
Definition at line 506 of file SemaChecking.cpp.
References clang::Sema::Diag(), clang::CallExpr::getArg(), clang::FunctionDecl::getBuiltinID(), clang::CallExpr::getDirectCallee(), clang::Stmt::getLocStart(), clang::CallExpr::getLocStart(), getOpenCLArgAccess(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and clang::Type::isPipeType().
Referenced by SemaBuiltinCommitRWPipe(), SemaBuiltinReserveRWPipe(), and SemaBuiltinRWPipe().
Returns true if pipe element type is different from the pointer.
Definition at line 556 of file SemaChecking.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::CallExpr::getArg(), clang::Type::getAs(), clang::Type::getCanonicalTypeInternal(), clang::CallExpr::getDirectCallee(), clang::PipeType::getElementType(), clang::CallExpr::getLocStart(), clang::PointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and clang::ASTContext::hasSameType().
Referenced by SemaBuiltinRWPipe().
|
static |
CheckReturnStackAddr - Check if a return statement returns the address of a stack variable.
Definition at line 7513 of file SemaChecking.cpp.
References clang::Sema::Diag(), EvalAddr(), EvalVal(), clang::DeclRefExpr::getDecl(), clang::NamedDecl::getDeclName(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::Stmt::getLocStart(), clang::tooling::fixit::internal::getSourceRange(), clang::Stmt::getSourceRange(), clang::Type::isBlockPointerType(), clang::Type::isPointerType(), and clang::Type::isReferenceType().
|
static |
Definition at line 11315 of file SemaChecking.cpp.
References clang::Sema::CheckLiteralKind(), clang::Sema::Diag(), clang::Stmt::getSourceRange(), clang::Expr::IgnoreParenImpCasts(), clang::Sema::LK_None, and clang::Sema::LK_String.
Referenced by checkUnsafeAssignObject().
|
static |
Definition at line 11336 of file SemaChecking.cpp.
References clang::cast(), checkUnsafeAssignLiteral(), clang::Sema::Diag(), clang::Stmt::getSourceRange(), clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_Weak.
Referenced by clang::Sema::checkUnsafeAssigns(), and clang::Sema::checkUnsafeExprAssigns().
Check that the user is calling the appropriate va_start builtin for the target and calling convention.
Definition at line 3627 of file SemaChecking.cpp.
References clang::CC_C, clang::CC_Win64, clang::CC_X86_64SysV, clang::Sema::Context, clang::Sema::Diag(), clang::Sema::getCurFunctionDecl(), clang::Stmt::getLocStart(), clang::ASTContext::getTargetInfo(), and clang::TargetInfo::getTriple().
|
static |
Definition at line 3661 of file SemaChecking.cpp.
References clang::Sema::CurContext, clang::Sema::Diag(), and clang::Stmt::getLocStart().
Consider whether capturing the given variable can possibly lead to a retain cycle.
Definition at line 10887 of file SemaChecking.cpp.
References clang::QualType::getObjCLifetime(), clang::ValueDecl::getType(), and clang::Qualifiers::OCL_Strong.
Referenced by clang::Sema::checkRetainCycles(), and findRetainCycleOwner().
|
static |
Definition at line 5695 of file SemaChecking.cpp.
References clang::Sema::Context, clang::ast_matchers::decl, E, clang::IdentifierTable::get(), clang::Type::getAs(), clang::RecordType::getDecl(), clang::CXXRecordDecl::getDefinition(), I, clang::ASTContext::Idents, clang::Sema::LookupMemberName, clang::Sema::LookupQualifiedName(), and clang::LookupResult::suppressDiagnostics().
|
static |
Definition at line 10481 of file SemaChecking.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::ASTContext::getAsArrayType(), clang::ArrayType::getElementType(), clang::ArrayType::getSizeModifier(), clang::Type::isVariablyModifiedType(), and clang::ArrayType::Star.
Referenced by clang::Sema::CheckParmsForFunctionDef().
|
static |
Diagnose use of s directive in an NSString which is being passed as formatting string to formatting method.
Definition at line 2408 of file SemaChecking.cpp.
References clang::Sema::Diag(), clang::Sema::FormatStringHasSArg(), clang::NamedDecl::getDeclName(), clang::Expr::getExprLoc(), clang::Sema::GetFormatNSStringIdx(), clang::Decl::getLocation(), clang::NamedDecl::getObjCFStringFormattingFamily(), clang::StringLiteral::getString(), I, clang::Expr::IgnoreParenImpCasts(), clang::SFF_CFString, and clang::Decl::specific_attrs().
Definition at line 11068 of file SemaChecking.cpp.
References clang::Sema::Diag(), clang::Expr::getExprLoc(), and clang::Stmt::getSourceRange().
Referenced by clang::Sema::checkRetainCycles().
|
static |
Definition at line 6792 of file SemaChecking.cpp.
References clang::ASTContext::BuiltinInfo, clang::Sema::Context, clang::FixItHint::CreateReplacement(), clang::Sema::Diag(), clang::IdentifierTable::get(), getAbsoluteValueKind(), clang::FunctionDecl::getBuiltinID(), clang::Sema::getCurScope(), clang::Builtin::Context::getHeaderName(), clang::Sema::getLangOpts(), clang::Builtin::Context::getName(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::Sema::getStdNamespace(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSize(), I, clang::ASTContext::Idents, clang::Type::isAnyComplexType(), clang::Type::isIntegralOrEnumerationType(), clang::Type::isRealFloatingType(), clang::Sema::LookupAnyName, clang::Sema::LookupName(), and clang::Sema::LookupQualifiedName().
|
static |
EvalAddr - EvalAddr and EvalVal are mutually recursive functions that check if the expression in a return statement evaluates to an address to a location on the stack, a local block, an address of a label, or a reference to local temporary.
The recursion is used to traverse the AST of the return expression, with recursion backtracking when we encounter a subexpression that (1) clearly does not lead to one of the above problematic expressions (2) is something we cannot determine leads to a problematic expression based on such local checking.
Both EvalAddr and EvalVal follow through reference variables to evaluate the expression that they point to. Such variables are added to the 'refVars' vector so that we know what the reference variable "trail" was.
EvalAddr processes expressions that are pointers that are used as references (and not L-values). EvalVal handles all other values. At the base case of the recursion is a check for the above problematic expressions.
This implementation handles:
Definition at line 7611 of file SemaChecking.cpp.
References E, EvalVal(), clang::DeclRefExpr::getDecl(), clang::BinaryOperator::getLHS(), clang::ConditionalOperator::getLHS(), clang::UnaryOperator::getOpcode(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::ConditionalOperator::getRHS(), clang::Stmt::getStmtClass(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), clang::Expr::IgnoreParens(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), clang::Type::isObjCQualifiedIdType(), clang::Type::isPointerType(), clang::Expr::isTypeDependent(), clang::Type::isVoidType(), and clang::DeclRefExpr::refersToEnclosingVariableOrCapture().
Referenced by CheckReturnStackAddr(), and EvalVal().
|
static |
EvalVal - This function is complements EvalAddr in the mutual recursion.
See the comments for EvalAddr for more details.
Definition at line 7766 of file SemaChecking.cpp.
References E, EvalAddr(), clang::MemberExpr::getBase(), clang::DeclRefExpr::getDecl(), clang::ConditionalOperator::getLHS(), clang::MemberExpr::getMemberDecl(), clang::UnaryOperator::getOpcode(), clang::ConditionalOperator::getRHS(), clang::Stmt::getStmtClass(), clang::UnaryOperator::getSubExpr(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::getValueKind(), clang::Expr::IgnoreParens(), clang::MemberExpr::isArrow(), clang::Type::isReferenceType(), clang::Expr::isRValue(), clang::Expr::isTypeDependent(), clang::Type::isVoidType(), clang::DeclRefExpr::refersToEnclosingVariableOrCapture(), and clang::VK_LValue.
Referenced by CheckReturnStackAddr(), and EvalAddr().
Check whether the given argument is a block which captures a variable.
Definition at line 11033 of file SemaChecking.cpp.
References clang::BlockDecl::capturesVariable(), clang::Sema::Context, clang::CallExpr::getArg(), clang::BlockExpr::getBlockDecl(), clang::BlockDecl::getBody(), clang::CallExpr::getCalleeDecl(), clang::NamedDecl::getIdentifier(), clang::Selector::getNameForSlot(), clang::CallExpr::getNumArgs(), clang::Expr::IgnoreParenCasts(), clang::IdentifierInfo::isStr(), and clang::Selector::isUnarySelector().
Referenced by clang::Sema::checkRetainCycles().
Definition at line 10900 of file SemaChecking.cpp.
References clang::cast(), considerVariable(), clang::ObjCPropertyRefExpr::getBase(), clang::Sema::getCurMethodDecl(), clang::ObjCPropertyRefExpr::getExplicitProperty(), clang::ObjCPropertyRefExpr::getLocation(), clang::QualType::getObjCLifetime(), clang::ObjCMethodDecl::getSelfDecl(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::IgnoreParens(), clang::ObjCPropertyRefExpr::isImplicitProperty(), clang::ObjCPropertyRefExpr::isSuperReceiver(), and clang::Qualifiers::OCL_Strong.
Referenced by clang::Sema::checkRetainCycles().
|
static |
Definition at line 6635 of file SemaChecking.cpp.
References clang::ASTContext::GE_None, clang::Type::getAs(), clang::ASTContext::GetBuiltinType(), clang::FunctionProtoType::getNumParams(), and clang::FunctionProtoType::getParamType().
Referenced by getBestAbsFunction().
|
static |
Definition at line 6759 of file SemaChecking.cpp.
References clang::FunctionDecl::getBuiltinID(), and clang::NamedDecl::getIdentifier().
|
static |
Definition at line 6682 of file SemaChecking.cpp.
References AVK_Complex, AVK_Floating, AVK_Integer, clang::Type::isAnyComplexType(), clang::Type::isIntegralOrEnumerationType(), and clang::Type::isRealFloatingType().
Referenced by emitReplacement().
|
static |
Definition at line 6657 of file SemaChecking.cpp.
References getAbsoluteValueArgumentType(), getLargerAbsoluteValueFunction(), clang::ASTContext::getTypeSize(), and clang::ASTContext::hasSameType().
|
static |
Determine whether the given type is or contains a dynamic class type (e.g., whether it has a vtable).
Definition at line 7065 of file SemaChecking.cpp.
References clang::RecordDecl::fields(), clang::Type::getAsCXXRecordDecl(), clang::Type::getBaseElementTypeUnsafe(), clang::CXXRecordDecl::getDefinition(), clang::CXXRecordDecl::isDynamicClass(), and clang::Decl::isInvalidDecl().
|
static |
A helper function to get the alignment of a Decl referred to by DeclRefExpr or MemberExpr.
Definition at line 10585 of file SemaChecking.cpp.
References clang::DeclRefExpr::getDecl(), and clang::ASTContext::getDeclAlign().
Referenced by clang::Sema::CheckCastAlign(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenModule::EmitOMPThreadPrivateDecl(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), and clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl().
Definition at line 6585 of file SemaChecking.cpp.
Referenced by getBestAbsFunction().
|
static |
getNeonEltType - Return the QualType corresponding to the elements of the vector type specified by the NeonTypeFlags.
This is used to check the pointer arguments for Neon load/store intrinsics.
Definition at line 1179 of file SemaChecking.cpp.
References clang::ASTContext::DoubleTy, clang::NeonTypeFlags::Float16, clang::NeonTypeFlags::Float32, clang::NeonTypeFlags::Float64, clang::ASTContext::FloatTy, clang::NeonTypeFlags::getEltType(), clang::ASTContext::HalfTy, clang::NeonTypeFlags::Int16, clang::NeonTypeFlags::Int32, clang::NeonTypeFlags::Int64, clang::NeonTypeFlags::Int8, clang::ASTContext::IntTy, clang::NeonTypeFlags::isUnsigned(), clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, clang::NeonTypeFlags::Poly128, clang::NeonTypeFlags::Poly16, clang::NeonTypeFlags::Poly64, clang::NeonTypeFlags::Poly8, clang::ASTContext::ShortTy, clang::ASTContext::SignedCharTy, clang::ASTContext::UnsignedCharTy, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongLongTy, clang::ASTContext::UnsignedLongTy, and clang::ASTContext::UnsignedShortTy.
|
static |
Definition at line 11101 of file SemaChecking.cpp.
References clang::NSAPI::ClassId_NSMutableArray, clang::ObjCMessageExpr::getReceiverInterface(), clang::ObjCMessageExpr::getSelector(), clang::None, clang::Sema::NSAPIObj, clang::NSAPI::NSMutableArr_addObject, clang::NSAPI::NSMutableArr_insertObjectAtIndex, clang::NSAPI::NSMutableArr_replaceObjectAtIndex, and clang::NSAPI::NSMutableArr_setObjectAtIndexedSubscript.
|
static |
Definition at line 11136 of file SemaChecking.cpp.
References clang::NSAPI::ClassId_NSMutableDictionary, clang::ObjCMessageExpr::getReceiverInterface(), clang::ObjCMessageExpr::getSelector(), clang::None, clang::Sema::NSAPIObj, clang::NSAPI::NSMutableDict_setObjectForKey, clang::NSAPI::NSMutableDict_setObjectForKeyedSubscript, and clang::NSAPI::NSMutableDict_setValueForKey.
|
static |
Definition at line 11168 of file SemaChecking.cpp.
References clang::NSAPI::ClassId_NSMutableOrderedSet, clang::NSAPI::ClassId_NSMutableSet, clang::ObjCMessageExpr::getReceiverInterface(), clang::ObjCMessageExpr::getSelector(), clang::None, clang::Sema::NSAPIObj, clang::NSAPI::NSMutableSet_addObject, clang::NSAPI::NSOrderedSet_insertObjectAtIndex, clang::NSAPI::NSOrderedSet_replaceObjectAtIndexWithObject, clang::NSAPI::NSOrderedSet_setObjectAtIndex, and clang::NSAPI::NSOrderedSet_setObjectAtIndexedSubscript.
|
static |
Returns OpenCL access qual.
Definition at line 501 of file SemaChecking.cpp.
References clang::Decl::getAttr().
Referenced by checkOpenCLPipeArg().
If E is a sizeof expression, returns its argument type.
Definition at line 7106 of file SemaChecking.cpp.
References clang::UETT_SizeOf.
If E is a sizeof expression, returns its argument expression, otherwise returns NULL.
Definition at line 7096 of file SemaChecking.cpp.
References clang::Expr::IgnoreParenImpCasts(), and clang::UETT_SizeOf.
Definition at line 7406 of file SemaChecking.cpp.
References clang::FunctionDecl::getMemoryFunctionKind().
|
static |
Definition at line 7294 of file SemaChecking.cpp.
References clang::BinaryOperator::getLHS(), clang::BinaryOperator::getRHS(), clang::Expr::IgnoreParenCasts(), and clang::BinaryOperator::isAdditiveOp().
Definition at line 263 of file SemaChecking.cpp.
References clang::Expr::getType(), and clang::Type::isBlockPointerType().
Referenced by computeCopyInfoForBlockCapture(), inferARCWriteback(), SemaOpenCLBuiltinEnqueueKernel(), and SemaOpenCLBuiltinKernelWorkGroupSize().
|
static |
Definition at line 7316 of file SemaChecking.cpp.
References clang::ASTContext::getAsConstantArrayType(), and clang::Type::isVariableArrayType().
|
static |
Definition at line 9716 of file SemaChecking.cpp.
References clang::SourceManager::getImmediateMacroCallerLoc(), clang::SourceLocation::isInvalid(), clang::SourceManager::isMacroBodyExpansion(), and clang::SourceLocation::isMacroID().
Referenced by clang::Sema::DiagnoseAlwaysNonNullPointer().
|
static |
Determine whether the given type has a non-null nullability annotation.
Definition at line 2448 of file SemaChecking.cpp.
References clang::Type::getNullability(), and clang::NonNull.
Referenced by CheckNonNullArguments().
Check for a keyword selector that starts with the word 'add' or 'set'.
Definition at line 11081 of file SemaChecking.cpp.
References clang::Selector::getNameForSlot(), clang::Selector::getNumArgs(), clang::isLowercase(), and clang::Selector::isUnarySelector().
Referenced by clang::Sema::checkRetainCycles().
|
static |
Definition at line 6875 of file SemaChecking.cpp.
References clang::NamedDecl::getIdentifier(), clang::Decl::isInStdNamespace(), and clang::IdentifierInfo::isStr().
|
static |
Check whether this array fits the idiom of a size-one tail padded array member of a struct.
We avoid emitting out-of-bounds access warnings for such arrays as they are commonly used to emulate flexible arrays in C89 code.
Definition at line 10653 of file SemaChecking.cpp.
References clang::TypeLoc::getAs(), clang::Decl::getDeclContext(), clang::Expr::getExprLoc(), clang::Decl::getNextDeclInContext(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::TypedefNameDecl::getTypeSourceInfo(), clang::SourceLocation::isMacroID(), and clang::TagDecl::isUnion().
|
static |
Definition at line 2730 of file SemaChecking.cpp.
Check if two expressions refer to the same declaration.
Definition at line 7399 of file SemaChecking.cpp.
Definition at line 5967 of file SemaChecking.cpp.
References clang::Stmt::getStmtClass(), and clang::Expr::IgnoreImpCasts().
Definition at line 1146 of file SemaChecking.cpp.
References clang::NeonTypeFlags::Float16, clang::NeonTypeFlags::Float32, clang::NeonTypeFlags::Float64, clang::NeonTypeFlags::getEltType(), clang::NeonTypeFlags::Int16, clang::NeonTypeFlags::Int32, clang::NeonTypeFlags::Int64, clang::NeonTypeFlags::Int8, clang::NeonTypeFlags::isQuad(), clang::NeonTypeFlags::Poly128, clang::NeonTypeFlags::Poly16, clang::NeonTypeFlags::Poly64, and clang::NeonTypeFlags::Poly8.
Check that the argument to __builtin_addressof is a glvalue, and set the result type to the corresponding pointer type.
Definition at line 103 of file SemaChecking.cpp.
References clang::Sema::CheckAddressOfOperand(), checkArgCount(), clang::CallExpr::getArg(), clang::CallExpr::getLocStart(), clang::CallExpr::setArg(), and clang::Expr::setType().
Check that the first argument to __builtin_annotation is an integer and the second argument is a non-wide string literal.
Definition at line 75 of file SemaChecking.cpp.
References checkArgCount(), clang::Sema::Diag(), clang::CallExpr::getArg(), clang::Stmt::getLocStart(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Expr::IgnoreParenCasts(), clang::StringLiteral::isAscii(), clang::Type::isIntegerType(), and clang::Expr::setType().
Definition at line 178 of file SemaChecking.cpp.
References checkArgCount(), clang::Sema::Context, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::CallExpr::getArg(), clang::CallExpr::getCallee(), clang::ASTContext::getFunctionType(), clang::CallExpr::getLocStart(), clang::ASTContext::getPointerType(), clang::Stmt::getSourceRange(), clang::Stmt::getStmtClass(), clang::Expr::getType(), clang::Expr::IgnoreImpCasts(), clang::Sema::ImpCastExprToType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Type::isPointerType(), clang::CallExpr::setArg(), clang::CallExpr::setCallee(), clang::Expr::setObjectKind(), clang::Expr::setType(), clang::Expr::setValueKind(), and clang::Sema::UsualUnaryConversions().
Definition at line 658 of file SemaChecking.cpp.
References checkArgCount(), checkOpenCLPipeArg(), clang::Sema::Context, clang::Sema::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getDirectCallee(), clang::CallExpr::getLocStart(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isReserveIDT(), and clang::ASTContext::OCLReserveIDTy.
SemaBuiltinCpuSupports - Handle __builtin_cpu_supports(char *).
This checks that the target supports __builtin_cpu_supports and that the string argument is constant and valid.
Definition at line 1776 of file SemaChecking.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getLocStart(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::Expr::IgnoreParenImpCasts(), and clang::TargetInfo::validateCpuSupports().
|
static |
Definition at line 150 of file SemaChecking.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::Expr::EvaluateAsInt(), clang::CallExpr::getArg(), clang::NamedDecl::getIdentifier(), clang::CallExpr::getLocStart(), clang::CallExpr::getNumArgs(), and clang::Stmt::getSourceRange().
Definition at line 117 of file SemaChecking.cpp.
References checkArgCount(), clang::Sema::Diag(), clang::CallExpr::getArg(), clang::Type::getAs(), clang::Stmt::getLocStart(), clang::Stmt::getSourceRange(), clang::Expr::getType(), I, and clang::Type::isIntegerType().
Definition at line 681 of file SemaChecking.cpp.
References checkArgCount(), clang::Sema::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getDirectCallee(), clang::CallExpr::getLocStart(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and clang::Type::isPipeType().
Definition at line 634 of file SemaChecking.cpp.
References checkArgCount(), checkOpenCLPipeArg(), clang::Sema::Context, clang::Sema::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getDirectCallee(), clang::CallExpr::getLocStart(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isIntegerType(), clang::Type::isUnsignedIntegerType(), and clang::ASTContext::UnsignedIntTy.
Definition at line 579 of file SemaChecking.cpp.
References checkOpenCLPipeArg(), checkOpenCLPipePacketType(), clang::Sema::Context, clang::Sema::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getDirectCallee(), clang::CallExpr::getLocStart(), clang::CallExpr::getNumArgs(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isIntegerType(), clang::Type::isReserveIDT(), clang::Type::isUnsignedIntegerType(), clang::ASTContext::OCLReserveIDTy, and clang::ASTContext::UnsignedIntTy.
|
static |
Definition at line 241 of file SemaChecking.cpp.
References clang::Sema::Diag(), clang::CallExpr::getCallee(), clang::Sema::getCurScope(), clang::Expr::getExprLoc(), clang::Scope::getFlags(), clang::Scope::getParent(), clang::Expr::IgnoreParenCasts(), clang::Sema::inTemplateInstantiation(), clang::Scope::isSEHExceptScope(), and S.
OpenCL C v2.0, s6.13.17 - Enqueue kernel function contains four different overload formats specified in Table 6.13.17.1.
int enqueue_kernel(queue_t queue, kernel_enqueue_flags_t flags, const ndrange_t ndrange, void (^block)(void)) int enqueue_kernel(queue_t queue, kernel_enqueue_flags_t flags, const ndrange_t ndrange, uint num_events_in_wait_list, clk_event_t event_wait_list, clk_event_t *event_ret, void (^block)(void)) int enqueue_kernel(queue_t queue, kernel_enqueue_flags_t flags, const ndrange_t ndrange, void (^block)(local void, ...), uint size0, ...) int enqueue_kernel(queue_t queue, kernel_enqueue_flags_t flags, const ndrange_t ndrange, uint num_events_in_wait_list, clk_event_t event_wait_list, clk_event_t *event_ret, void (^block)(local void, ...), uint size0, ...)
Definition at line 382 of file SemaChecking.cpp.
References checkOpenCLBlockArgs(), checkOpenCLEnqueueVariadicArgs(), clang::Sema::Context, clang::Sema::Diag(), clang::CallExpr::getArg(), clang::Type::getAs(), clang::QualType::getAsString(), clang::QualType::getCanonicalType(), clang::CallExpr::getDirectCallee(), clang::Stmt::getLocStart(), clang::CallExpr::getLocStart(), clang::CallExpr::getNumArgs(), clang::Type::getPointeeOrArrayElementType(), clang::Type::getPointeeType(), clang::BlockPointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), isBlockPointer(), clang::Type::isClkEventT(), clang::Type::isIntegerType(), clang::Expr::isNullPointerConstant(), clang::Type::isPointerType(), clang::Type::isQueueT(), clang::Expr::NPC_ValueDependentIsNotNull, clang::ASTContext::OCLClkEventTy, and clang::ASTContext::OCLQueueTy.
OpenCL C v2.0, s6.13.17.6 - Check the argument to the get_kernel_work_group_size and get_kernel_preferred_work_group_size_multiple builtin functions.
Definition at line 305 of file SemaChecking.cpp.
References checkArgCount(), checkOpenCLBlockArgs(), clang::Sema::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getDirectCallee(), clang::Stmt::getLocStart(), and isBlockPointer().
Definition at line 699 of file SemaChecking.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getDirectCallee(), clang::CallExpr::getLocStart(), clang::CallExpr::getNumArgs(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::LangAS::opencl_constant, clang::LangAS::opencl_global, clang::LangAS::opencl_local, and clang::Expr::setType().
|
static |
Definition at line 6004 of file SemaChecking.cpp.
References clang::Type::getAs(), clang::ASTContext::IntTy, clang::QualType::isNull(), clang::ASTContext::LongTy, Name, clang::ASTContext::UnsignedIntTy, and clang::ASTContext::UnsignedLongTy.
|
static |
Definition at line 4519 of file SemaChecking.cpp.
References UINT_MAX.
Referenced by checkFormatStringExpr().
1.8.6