Home
last modified time | relevance | path

Searched refs:FDecl (Results 1 – 25 of 35) sorted by relevance

12

/external/clang/lib/StaticAnalyzer/Checkers/
DGenericTaintChecker.cpp97 bool checkTaintedBufferSize(const CallExpr *CE, const FunctionDecl *FDecl,
144 getTaintPropagationRule(const FunctionDecl *FDecl,
199 const FunctionDecl *FDecl, in REGISTER_SET_WITH_PROGRAMSTATE()
233 if ( (BId = FDecl->getMemoryFunctionKind()) ) in REGISTER_SET_WITH_PROGRAMSTATE()
252 if (C.isCLibraryFunction(FDecl, "snprintf") || in REGISTER_SET_WITH_PROGRAMSTATE()
253 C.isCLibraryFunction(FDecl, "sprintf")) in REGISTER_SET_WITH_PROGRAMSTATE()
255 else if (C.isCLibraryFunction(FDecl, "strcpy") || in REGISTER_SET_WITH_PROGRAMSTATE()
256 C.isCLibraryFunction(FDecl, "stpcpy") || in REGISTER_SET_WITH_PROGRAMSTATE()
257 C.isCLibraryFunction(FDecl, "strcat")) in REGISTER_SET_WITH_PROGRAMSTATE()
259 else if (C.isCLibraryFunction(FDecl, "bcopy")) in REGISTER_SET_WITH_PROGRAMSTATE()
[all …]
DCStringChecker.cpp2016 const FunctionDecl *FDecl = C.getCalleeDecl(CE); in evalCall() local
2018 if (!FDecl) in evalCall()
2023 if (C.isCLibraryFunction(FDecl, "memcpy")) in evalCall()
2025 else if (C.isCLibraryFunction(FDecl, "mempcpy")) in evalCall()
2027 else if (C.isCLibraryFunction(FDecl, "memcmp")) in evalCall()
2029 else if (C.isCLibraryFunction(FDecl, "memmove")) in evalCall()
2031 else if (C.isCLibraryFunction(FDecl, "strcpy")) in evalCall()
2033 else if (C.isCLibraryFunction(FDecl, "strncpy")) in evalCall()
2035 else if (C.isCLibraryFunction(FDecl, "stpcpy")) in evalCall()
2037 else if (C.isCLibraryFunction(FDecl, "strcat")) in evalCall()
[all …]
/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/
DGenericTaintChecker.cpp116 const FunctionDecl *FDecl = Call.getDecl()->getAsFunction(); in create() local
117 if (!FDecl || (FDecl->getKind() != Decl::Function && in create()
118 FDecl->getKind() != Decl::CXXMethod)) in create()
121 StringRef Name = C.getCalleeName(FDecl); in create()
122 std::string FullName = FDecl->getQualifiedNameAsString(); in create()
126 return FunctionData{FDecl, Name, FullName}; in create()
133 const FunctionDecl *const FDecl; member
468 assert(FData.FDecl); in getTaintPropagationRule()
472 const FunctionDecl *FDecl = FData.FDecl; in getTaintPropagationRule() local
474 if ((BId = FDecl->getMemoryFunctionKind())) { in getTaintPropagationRule()
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/readability/
DRedundantStringInitCheck.cpp141 if (const auto *FDecl = Result.Nodes.getNodeAs<FieldDecl>("fieldDecl")) { in check() local
144 SourceRange ReplaceRange(FDecl->getLocation(), FDecl->getEndLoc()); in check()
145 diag(FDecl->getLocation(), "redundant string initialization") in check()
146 << FixItHint::CreateReplacement(ReplaceRange, FDecl->getName()); in check()
DIdentifierNamingCheck.cpp345 const auto *FDecl = in isParamInMainLikeFunction() local
347 if (!FDecl) in isParamInMainLikeFunction()
349 if (FDecl->isMain()) in isParamInMainLikeFunction()
353 if (FDecl->getAccess() != AS_public && FDecl->getAccess() != AS_none) in isParamInMainLikeFunction()
378 if (!IsIntType(FDecl->getReturnType())) in isParamInMainLikeFunction()
380 if (FDecl->getNumParams() < 2 || FDecl->getNumParams() > 3) in isParamInMainLikeFunction()
382 if (!IsIntType(FDecl->parameters()[0]->getType())) in isParamInMainLikeFunction()
384 MainType Type = IsCharPtrPtr(FDecl->parameters()[1]->getType()); in isParamInMainLikeFunction()
387 if (FDecl->getNumParams() == 3 && in isParamInMainLikeFunction()
388 IsCharPtrPtr(FDecl->parameters()[2]->getType()) != Type) in isParamInMainLikeFunction()
[all …]
/external/llvm-project/llvm/unittests/Analysis/
DTargetLibraryInfoTest.cpp43 ::testing::AssertionResult isLibFunc(const Function *FDecl, in isLibFunc() argument
47 if (!FDecl) in isLibFunc()
51 if (!TLI.getLibFunc(*FDecl, F)) in isLibFunc()
/external/llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines/
DProTypeVarargCheck.cpp91 const auto *FDecl = dyn_cast<FunctionDecl>(C->getCalleeDecl()); in hasSingleVariadicArgumentWithValue() local
92 if (!FDecl) in hasSingleVariadicArgumentWithValue()
95 auto N = FDecl->getNumParams(); // Number of parameters without '...' in hasSingleVariadicArgumentWithValue()
/external/llvm/include/llvm/Analysis/
DTargetLibraryInfo.h123 bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const;
221 bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const { in getLibFunc() argument
222 return Impl->getLibFunc(FDecl, F); in getLibFunc()
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Analysis/
DTargetLibraryInfo.h115 bool getLibFunc(const Function &FDecl, LibFunc &F) const;
271 bool getLibFunc(const Function &FDecl, LibFunc &F) const { in getLibFunc() argument
272 return Impl->getLibFunc(FDecl, F); in getLibFunc()
/external/clang/lib/Sema/
DSemaChecking.cpp151 static void SemaBuiltinMemChkCall(Sema &S, FunctionDecl *FDecl, in SemaBuiltinMemChkCall() argument
172 IdentifierInfo *FnName = FDecl->getIdentifier(); in SemaBuiltinMemChkCall()
718 Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, in CheckBuiltinFunctionCall() argument
980 SemaBuiltinMemChkCall(*this, FDecl, TheCall, 2, 3); in CheckBuiltinFunctionCall()
983 SemaBuiltinMemChkCall(*this, FDecl, TheCall, 3, 4); in CheckBuiltinFunctionCall()
987 SemaBuiltinMemChkCall(*this, FDecl, TheCall, 1, 3); in CheckBuiltinFunctionCall()
1011 Context.getExceptionObjectType(FDecl->getParamDecl(0)->getType()), in CheckBuiltinFunctionCall()
1943 const NamedDecl *FDecl, in DiagnoseCStringFormatDirectiveInCFAPI() argument
1948 ObjCStringFormatFamily SFFamily = FDecl->getObjCFStringFormattingFamily(); in DiagnoseCStringFormatDirectiveInCFAPI()
1954 for (const auto *I : FDecl->specific_attrs<FormatAttr>()) { in DiagnoseCStringFormatDirectiveInCFAPI()
[all …]
DSemaExpr.cpp946 FunctionDecl *FDecl) { in DefaultVariadicArgumentPromotion() argument
951 (FDecl && FDecl->hasAttr<CFAuditedTransferAttr>()))) { in DefaultVariadicArgumentPromotion()
2764 FunctionDecl *FDecl = cast<FunctionDecl>(D); in UseArgumentDependentLookup() local
2767 if (FDecl->getBuiltinID() && FDecl->isImplicit()) in UseArgumentDependentLookup()
4600 Sema::getVariadicCallType(FunctionDecl *FDecl, const FunctionProtoType *Proto, in getVariadicCallType() argument
4603 if (dyn_cast_or_null<CXXConstructorDecl>(FDecl)) in getVariadicCallType()
4607 else if (FDecl) { in getVariadicCallType()
4608 if (CXXMethodDecl *Method = dyn_cast_or_null<CXXMethodDecl>(FDecl)) in getVariadicCallType()
4641 FunctionDecl *FDecl, in TryTypoCorrectionForCall() argument
4644 DeclarationName FuncName = FDecl->getDeclName(); in TryTypoCorrectionForCall()
[all …]
DSemaCodeComplete.cpp2962 FunctionDecl *FDecl = getFunction(); in CreateSignatureString() local
2965 if (!FDecl && !Proto) { in CreateSignatureString()
2977 if (FDecl) { in CreateSignatureString()
2978 if (IncludeBriefComments && CurrentArg < FDecl->getNumParams()) in CreateSignatureString()
2980 FDecl->getParamDecl(CurrentArg))) in CreateSignatureString()
2982 AddResultTypeChunk(S.Context, Policy, FDecl, QualType(), Result); in CreateSignatureString()
2984 Result.getAllocator().CopyString(FDecl->getNameAsString())); in CreateSignatureString()
2992 AddOverloadParameterChunks(S.getASTContext(), Policy, FDecl, Proto, Result, in CreateSignatureString()
/external/llvm-project/llvm/include/llvm/Analysis/
DTargetLibraryInfo.h116 bool getLibFunc(const Function &FDecl, LibFunc &F) const;
287 bool getLibFunc(const Function &FDecl, LibFunc &F) const { in getLibFunc() argument
288 return Impl->getLibFunc(FDecl, F); in getLibFunc()
/external/llvm-project/clang/lib/Sema/
DSemaExpr.cpp965 FunctionDecl *FDecl) { in DefaultVariadicArgumentPromotion() argument
970 (FDecl && FDecl->hasAttr<CFAuditedTransferAttr>()))) { in DefaultVariadicArgumentPromotion()
3108 FunctionDecl *FDecl = cast<FunctionDecl>(D); in UseArgumentDependentLookup() local
3111 if (FDecl->getBuiltinID() && FDecl->isImplicit()) in UseArgumentDependentLookup()
5656 Sema::getVariadicCallType(FunctionDecl *FDecl, const FunctionProtoType *Proto, in getVariadicCallType() argument
5659 if (dyn_cast_or_null<CXXConstructorDecl>(FDecl)) in getVariadicCallType()
5663 else if (FDecl) { in getVariadicCallType()
5664 if (CXXMethodDecl *Method = dyn_cast_or_null<CXXMethodDecl>(FDecl)) in getVariadicCallType()
5701 FunctionDecl *FDecl, in TryTypoCorrectionForCall() argument
5704 DeclarationName FuncName = FDecl->getDeclName(); in TryTypoCorrectionForCall()
[all …]
DSemaChecking.cpp1434 Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, in CheckBuiltinFunctionCall() argument
1863 Context.getExceptionObjectType(FDecl->getParamDecl(0)->getType()), in CheckBuiltinFunctionCall()
4305 const NamedDecl *FDecl, in DiagnoseCStringFormatDirectiveInCFAPI() argument
4310 ObjCStringFormatFamily SFFamily = FDecl->getObjCFStringFormattingFamily(); in DiagnoseCStringFormatDirectiveInCFAPI()
4316 for (const auto *I : FDecl->specific_attrs<FormatAttr>()) { in DiagnoseCStringFormatDirectiveInCFAPI()
4338 S.Diag(FDecl->getLocation(), diag::note_entity_declared_at) in DiagnoseCStringFormatDirectiveInCFAPI()
4339 << FDecl->getDeclName(); in DiagnoseCStringFormatDirectiveInCFAPI()
4352 const NamedDecl *FDecl, in CheckNonNullArguments() argument
4356 assert((FDecl || Proto) && "Need a function declaration or prototype"); in CheckNonNullArguments()
4363 if (FDecl) { in CheckNonNullArguments()
[all …]
DSemaCodeComplete.cpp3630 auto FDecl = Result.getFunction(); in getParameterComment() local
3631 if (!FDecl) in getParameterComment()
3633 if (ArgIndex < FDecl->getNumParams()) in getParameterComment()
3634 return Ctx.getRawCommentForAnyRedecl(FDecl->getParamDecl(ArgIndex)); in getParameterComment()
3720 FunctionDecl *FDecl = getFunction(); in CreateSignatureString() local
3723 if (!FDecl && !Proto) { in CreateSignatureString()
3735 if (FDecl) { in CreateSignatureString()
3740 AddResultTypeChunk(S.Context, Policy, FDecl, QualType(), Result); in CreateSignatureString()
3744 FDecl->getDeclName().print(OS, Policy); in CreateSignatureString()
3752 AddOverloadParameterChunks(S.getASTContext(), Policy, FDecl, Proto, Result, in CreateSignatureString()
/external/llvm-project/clang/lib/Analysis/
DReachableCode.cpp63 if (const auto *FDecl = dyn_cast<FunctionDecl>(DRE->getDecl())) in isBuiltinUnreachable() local
64 return FDecl->getIdentifier() && in isBuiltinUnreachable()
65 FDecl->getBuiltinID() == Builtin::BI__builtin_unreachable; in isBuiltinUnreachable()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DTargetLibraryInfo.cpp1480 bool TargetLibraryInfoImpl::getLibFunc(const Function &FDecl, in getLibFunc() argument
1485 if (FDecl.isIntrinsic()) return false; in getLibFunc()
1488 FDecl.getParent() ? &FDecl.getParent()->getDataLayout() : nullptr; in getLibFunc()
1489 return getLibFunc(FDecl.getName(), F) && in getLibFunc()
1490 isValidProtoForLibFunc(*FDecl.getFunctionType(), F, DL); in getLibFunc()
/external/llvm-project/llvm/lib/Analysis/
DTargetLibraryInfo.cpp1512 bool TargetLibraryInfoImpl::getLibFunc(const Function &FDecl, in getLibFunc() argument
1517 if (FDecl.isIntrinsic()) return false; in getLibFunc()
1520 FDecl.getParent() ? &FDecl.getParent()->getDataLayout() : nullptr; in getLibFunc()
1521 return getLibFunc(FDecl.getName(), F) && in getLibFunc()
1522 isValidProtoForLibFunc(*FDecl.getFunctionType(), F, DL); in getLibFunc()
/external/llvm/lib/Analysis/
DTargetLibraryInfo.cpp994 bool TargetLibraryInfoImpl::getLibFunc(const Function &FDecl, in getLibFunc() argument
997 FDecl.getParent() ? &FDecl.getParent()->getDataLayout() : nullptr; in getLibFunc()
998 return getLibFunc(FDecl.getName(), F) && in getLibFunc()
999 isValidProtoForLibFunc(*FDecl.getFunctionType(), F, DL); in getLibFunc()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/IPO/
DLowerTypeTests.cpp1067 Function *FDecl; in importFunction() local
1071 FDecl = Function::Create(F->getFunctionType(), GlobalValue::ExternalLinkage, in importFunction()
1073 FDecl->setVisibility(GlobalValue::HiddenVisibility); in importFunction()
1077 FDecl = Function::Create(F->getFunctionType(), GlobalValue::ExternalLinkage, in importFunction()
1079 FDecl->setVisibility(Visibility); in importFunction()
1098 replaceWeakDeclarationWithJumpTablePtr(F, FDecl, isJumpTableCanonical); in importFunction()
1100 replaceCfiUses(F, FDecl, isJumpTableCanonical); in importFunction()
/external/llvm-project/llvm/lib/Transforms/IPO/
DLowerTypeTests.cpp1080 Function *FDecl; in importFunction() local
1084 FDecl = Function::Create(F->getFunctionType(), GlobalValue::ExternalLinkage, in importFunction()
1086 FDecl->setVisibility(GlobalValue::HiddenVisibility); in importFunction()
1090 FDecl = Function::Create(F->getFunctionType(), GlobalValue::ExternalLinkage, in importFunction()
1092 FDecl->setVisibility(Visibility); in importFunction()
1111 replaceWeakDeclarationWithJumpTablePtr(F, FDecl, isJumpTableCanonical); in importFunction()
1113 replaceCfiUses(F, FDecl, isJumpTableCanonical); in importFunction()
/external/bcc/src/cc/frontends/clang/
Db_frontend_action.h78 int64_t getFieldValue(clang::VarDecl *Decl, clang::FieldDecl *FDecl,
Db_frontend_action.cc1083 int64_t BTypeVisitor::getFieldValue(VarDecl *Decl, FieldDecl *FDecl, int64_t OrigFValue) { in getFieldValue() argument
1084 unsigned idx = FDecl->getFieldIndex(); in getFieldValue()
/external/clang/lib/AST/
DExpr.cpp1256 const FunctionDecl *FDecl = dyn_cast<FunctionDecl>(DRE->getDecl()); in getBuiltinCallee() local
1257 if (!FDecl) in getBuiltinCallee()
1260 if (!FDecl->getIdentifier()) in getBuiltinCallee()
1263 return FDecl->getBuiltinID(); in getBuiltinCallee()

12