| /llvm-project-15.0.7/clang/include/clang/AST/ |
| H A D | GlobalDecl.h | 116 assert(isa<VarDecl>(getDecl()) && in getDynamicInitKind() 124 getDecl()) && in getMultiVersionIndex() 126 !isa<CXXConstructorDecl>(getDecl()) && in getMultiVersionIndex() 127 !isa<CXXDestructorDecl>(getDecl()) && in getMultiVersionIndex() 133 assert(((isa<FunctionDecl>(getDecl()) && in getKernelReferenceKind() 170 assert(isa<CXXConstructorDecl>(getDecl())); in getWithCtorType() 177 assert(isa<CXXDestructorDecl>(getDecl())); in getWithDtorType() 184 assert(isa<FunctionDecl>(getDecl()) && in getWithMultiVersionIndex() 186 !isa<CXXConstructorDecl>(getDecl()) && in getWithMultiVersionIndex() 187 !isa<CXXDestructorDecl>(getDecl()) && in getWithMultiVersionIndex() [all …]
|
| H A D | DeclAccessPair.h | 41 NamedDecl *getDecl() const { in getDecl() function 52 set(getDecl(), AS); in setAccess() 58 operator NamedDecl*() const { return getDecl(); } 59 NamedDecl *operator->() const { return getDecl(); }
|
| H A D | UnresolvedSet.h | 50 NamedDecl *getDecl() const { return I->getDecl(); } in getDecl() function 56 NamedDecl *operator*() const { return getDecl(); } 104 if (I->getDecl() == Old) in replace()
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Core/ |
| H A D | MemRegion.cpp | 172 return getDecl()->getType(); in getValueType() 184 assert(getDecl() && in getValueType() 187 return getDecl()->getType(); in getValueType() 582 const ParmVarDecl *PVD = getDecl(); in dumpToStream() 615 os << getDecl()->getName(); in printPrettyAsExpr() 621 assert(getDecl() && in printPrettyAsExpr() 624 os << getDecl()->getName(); in printPrettyAsExpr() 632 os << getDecl()->getName(); in printPrettyAsExpr() 646 os << "." << getDecl()->getName(); in printPrettyAsExpr() 941 if (VR->getDecl() == VD) in getStackOrCaptureRegionForDeclContext() [all …]
|
| H A D | CallEvent.cpp | 120 if (!getDecl()) in hasNonNullArgumentsWithType() 154 const Decl *D = getDecl(); in getCalleeAnalysisDeclContext() 239 if (const Decl *callee = getDecl()) in invalidateRegions() 297 const Decl *D = getDecl(); in getProgramPoint() 336 if (const Decl *D = getDecl()) { in dump() 495 const FunctionDecl *D = getDecl(); in parameters() 502 const FunctionDecl *FD = getDecl(); in getRuntimeDefinition() 526 const Decl* Decl = AD->getDecl(); in getRuntimeDefinition() 568 const FunctionDecl *D = getDecl(); in argumentsMayEscape() 689 const Decl *D = getDecl(); in getRuntimeDefinition() [all …]
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | CheckSecuritySyntaxOnly.cpp | 247 const NamedDecl *ND = DR->getDecl(); in getIncrementedVar() 316 const VarDecl *vdInc = cast<VarDecl>(drInc->getDecl()); in checkLoopConditionForFloat() 327 os << "Variable '" << drCond->getDecl()->getName() in checkLoopConditionForFloat() 378 BR.EmitBasicReport(AC->getDecl(), filter.checkName_bcmp, in checkCall_bcmp() 420 BR.EmitBasicReport(AC->getDecl(), filter.checkName_bcopy, in checkCall_bcopy() 461 BR.EmitBasicReport(AC->getDecl(), filter.checkName_bzero, in checkCall_bzero() 499 BR.EmitBasicReport(AC->getDecl(), filter.checkName_gets, in checkCall_gets() 539 BR.EmitBasicReport(AC->getDecl(), filter.checkName_getpw, in checkCall_getpw() 814 BR.EmitBasicReport(AC->getDecl(), in checkDeprecatedOrUnsafeBufferHandling() 913 BR.EmitBasicReport(AC->getDecl(), filter.checkName_rand, in checkCall_random() [all …]
|
| H A D | IdenticalExprChecker.cpp | 71 BR.EmitBasicReport(AC->getDecl(), Checker, in reportIdenticalExpr() 120 BR.EmitBasicReport(AC->getDecl(), Checker, "Identical conditions", in VisitIfStmt() 143 BR.EmitBasicReport(AC->getDecl(), Checker, "Identical conditions", in VisitIfStmt() 173 BR.EmitBasicReport(AC->getDecl(), Checker, in VisitIfStmt() 232 if (DeclRef1->getDecl() == DeclRef2->getDecl()) { in checkComparisonOp() 264 BR.EmitBasicReport(AC->getDecl(), Checker, in checkComparisonOp() 286 AC->getDecl(), Checker, in VisitConditionalOperator() 464 return DeclRef1->getDecl() == DeclRef2->getDecl(); in isIdenticalStmt()
|
| H A D | ObjCSelfInitChecker.cpp | 174 C.getCurrentAnalysisDeclContext()->getDecl()))) in checkPostObjCMessage() 201 C.getCurrentAnalysisDeclContext()->getDecl()))) in checkPostStmt() 214 C.getCurrentAnalysisDeclContext()->getDecl()))) in checkPreStmt() 242 C.getCurrentAnalysisDeclContext()->getDecl()))) in checkPreCall() 271 C.getCurrentAnalysisDeclContext()->getDecl()))) in checkPostCall() 306 C.getCurrentAnalysisDeclContext()->getDecl()))) in checkLocation() 421 return (DR->getDecl() == analCtx->getSelfDecl()); in isSelfVar()
|
| H A D | DeadStoresChecker.cpp | 57 if (const VarDecl *D = dyn_cast<VarDecl>(DR->getDecl())) in VisitDeclRefExpr() 261 BR.EmitBasicReport(AC->getDecl(), Checker, BugType, categories::UnusedCode, in Report() 288 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) in CheckDeclRef() 305 if (DR->getDecl() == VD) in isIncrement() 309 if (DR->getDecl() == VD) in isIncrement() 330 if (VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) { in observeStmt() 348 if (VD == dyn_cast<VarDecl>(RhsDR->getDecl())) in observeStmt() 420 if (const VarDecl *VD = dyn_cast<VarDecl>(DRE->getDecl())) { in observeStmt() 500 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) in operator ()()
|
| H A D | CStringSyntaxChecker.cpp | 41 return D1->getDecl() == D2->getDecl(); in sameDecl() 74 return D->getDecl()->getName(); in getPrintableName() 168 const auto *LenArgVal = dyn_cast<VarDecl>(LenArgDRE->getDecl()); in containsBadStrlcpyStrlcatPattern() 171 assert(isa<EnumConstantDecl>(LenArgDRE->getDecl())); in containsBadStrlcpyStrlcatPattern()
|
| H A D | BoolAssignmentChecker.cpp | 52 return TT->getDecl()->getName() == "BOOL" || // Objective-C in isBooleanType() 53 TT->getDecl()->getName() == "_Bool" || // stdbool.h < C99 in isBooleanType() 54 TT->getDecl()->getName() == "Boolean"; // MacTypes.h in isBooleanType()
|
| H A D | SmartPtrModeling.cpp | 127 const auto *MethodDecl = dyn_cast_or_null<CXXMethodDecl>(Call.getDecl()); in isStdSmartPtrCall() 202 const auto *FD = dyn_cast_or_null<FunctionDecl>(Call.getDecl()); in getPointerTypeFromTemplateArg() 215 const auto *MethodDecl = dyn_cast_or_null<CXXMethodDecl>(Call.getDecl()); in getInnerPointerType() 237 const auto *CD = dyn_cast_or_null<CXXConversionDecl>(Call.getDecl()); in isBoolConversionMethod() 249 return Call.getDecl() && Call.getDecl()->getDeclContext()->isStdNamespace(); in isStdFunctionCall() 258 const FunctionDecl *FD = FC->getDecl(); in isStdOstreamOperatorCall() 375 if (CC->getDecl()->isCopyConstructor()) in evalCall() 384 if (CC->getDecl()->isMoveConstructor()) in evalCall() 454 const FunctionDecl *FD = FC->getDecl(); in handleComparisionOp() 645 QualType ThisType = cast<CXXMethodDecl>(Call.getDecl())->getThisType(); in handleRelease() [all …]
|
| /llvm-project-15.0.7/clang/lib/ExtractAPI/ |
| H A D | TypedefUnderlyingTypeResolver.cpp | 27 TypeDecl = TypedefTy->getDecl(); in getUnderlyingTypeDecl() 29 TypeDecl = TagTy->getDecl(); in getUnderlyingTypeDecl() 32 TypeDecl = ObjCITy->getDecl(); in getUnderlyingTypeDecl() 39 const TypedefNameDecl *TypedefDecl = TypedefTy->getDecl(); in getUnderlyingTypeDecl()
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/ |
| H A D | UninitializedPointee.cpp | 47 Out << getVariableName(getDecl()); in printNode() 51 if (getDecl()->getType()->isPointerType()) in printSeparator() 73 if (getDecl()->getType()->isIntegerType()) in printPrefix() 82 Out << getVariableName(getDecl()) << ')'; in printNode() 101 Out << getVariableName(getDecl()); in printNode() 141 assert((isDereferencableType(FR->getDecl()->getType()) || in isDereferencableUninit() 232 isVoidPointer(FR->getDecl()->getType()) || isa<nonloc::LocAsInteger>(V); in dereference()
|
| H A D | UninitializedObjectChecker.cpp | 67 Out << getVariableName(getDecl()); in printNode() 140 Context.getLocationContext()->getDecl()); in checkEndFunction() 190 Node->getLocationContext()->getDecl()); in checkEndFunction() 204 Node->getLocationContext()->getDecl()); in checkEndFunction() 208 PathDiagnosticLocation::create(Pair.first->getDecl(), in checkEndFunction() 244 assert((PointeeR || !isDereferencableType(FR->getDecl()->getType())) && in addFieldToUninits() 249 FR->getDecl()->getLocation())) in addFieldToUninits() 252 if (Opts.IgnoreGuardedFields && !hasUnguardedAccess(FR->getDecl(), State)) in addFieldToUninits() 482 const auto *OtherCtor = dyn_cast<CXXConstructorDecl>(LC->getDecl()); in willObjectBeAnalyzedLater()
|
| /llvm-project-15.0.7/clang/lib/AST/ |
| H A D | Type.cpp | 583 RecordDecl *RD = RT->getDecl(); in isStructureOrClassType() 644 if (RT->getDecl()->isStruct()) in getAsStructureType() 650 if (!RT->getDecl()->isStruct()) in getAsStructureType() 663 if (RT->getDecl()->isUnion()) in getAsUnionType() 669 if (!RT->getDecl()->isUnion()) in getAsUnionType() 1769 return TT->getDecl(); in getAsTagDecl() 1771 return Injected->getDecl(); in getAsTagDecl() 2027 if (ET->getDecl()->isComplete() && !ET->getDecl()->isScoped()) in isSignedIntegerType() 2077 if (ET->getDecl()->isComplete() && !ET->getDecl()->isScoped()) in isUnsignedIntegerType() 2148 return ET->getDecl()->isComplete() && !ET->getDecl()->isScoped(); in isRealType() [all …]
|
| H A D | CXXInheritance.cpp | 138 cast_or_null<CXXRecordDecl>(Ty->getDecl()->getDefinition()); in forallBases() 254 BaseRecord = cast<CXXRecordDecl>(RT->getDecl()); in lookupInBases() 271 BaseSpec.getType()->castAs<RecordType>()->getDecl()); in lookupInBases() 337 VBase = cast<CXXRecordDecl>(Record->getDecl()); in lookupInBases() 349 HidingClass = cast<CXXRecordDecl>(Record->getDecl()); in lookupInBases() 368 return Specifier->getType()->castAs<RecordType>()->getDecl() in FindBaseClass() 378 Specifier->getType()->castAs<RecordType>()->getDecl() in FindVirtualBaseClass() 420 return findOrdinaryMember(cast<CXXRecordDecl>(RT->getDecl()), Path, Name); in findOrdinaryMemberInDependentClasses() 522 const CXXRecordDecl *BaseDecl = cast<CXXRecordDecl>(RT->getDecl()); in Collect() 692 cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl()); in AddIndirectPrimaryBases() [all …]
|
| /llvm-project-15.0.7/clang/unittests/Tooling/ |
| H A D | LookupTest.cpp | 54 const ValueDecl *FD = Callee->getDecl(); in TEST() 203 if (Type.getDecl()->getQualifiedNameAsString() == "a::b::Foo") { in TEST() 204 EXPECT_EQ("x::Bar", replaceTypeLoc(Type.getDecl(), Type.getBeginLoc(), in TEST() 230 if (Type.getDecl()->getQualifiedNameAsString() == "x::y::Old") { in TEST() 232 replaceTypeLoc(Type.getDecl(), Type.getBeginLoc(), "::x::Foo")); in TEST()
|
| /llvm-project-15.0.7/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
| H A D | CallEvent.h | 126 const Decl *getDecl() { return D; } in getDecl() function 214 virtual const Decl *getDecl() const { in getDecl() function 253 const Decl *D = getDecl(); in isInSystemHeader() 496 const FunctionDecl *getDecl() const override { in getDecl() function 536 const FunctionDecl *getDecl() const override; 585 const BlockDecl *getDecl() const override { in getDecl() function 589 return BR->getDecl(); in getDecl() 593 const BlockDecl *BD = getDecl(); in isConversionFromLambda() 615 return RuntimeDefinition(getDecl()); in getRuntimeDefinition() 680 const FunctionDecl *getDecl() const override; [all …]
|
| /llvm-project-15.0.7/clang/include/clang/StaticAnalyzer/Checkers/ |
| H A D | SValExplainer.h | 96 if (auto D = dyn_cast<ParmVarDecl>(V->getDecl())) in VisitSymbolRegionValue() 188 const VarDecl *VD = R->getDecl(); in VisitNonParamVarRegion() 205 return "instance variable '" + R->getDecl()->getNameAsString() + "' of " + in VisitObjCIvarRegion() 210 return "field '" + R->getDecl()->getNameAsString() + "' of " + in VisitFieldRegion() 220 return "base object '" + R->getDecl()->getQualifiedNameAsString() + in VisitCXXBaseObjectRegion() 228 const ParmVarDecl *PVD = R->getDecl(); in VisitParamVarRegion() 237 const Decl *Parent = R->getStackFrame()->getDecl(); in VisitParamVarRegion()
|
| /llvm-project-15.0.7/clang/lib/Analysis/ |
| H A D | UninitializedValues.cpp | 230 const VarDecl *getDecl() const { return vd; } in getDecl() function in __anon812707660311::FindVarResult 254 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in findVar() 303 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in get() 319 if (DRE && DRE->getDecl() == VD) in getSelfInitExpr() 501 return ::findVar(ex, cast<DeclContext>(ac.getDecl())); in findVar() 750 reportUse(dr, cast<VarDecl>(dr->getDecl())); in VisitDeclRefExpr() 753 vals[cast<VarDecl>(dr->getDecl())] = Initialized; in VisitDeclRefExpr() 756 handler.handleSelfInit(cast<VarDecl>(dr->getDecl())); in VisitDeclRefExpr() 759 reportConstRefUse(dr, cast<VarDecl>(dr->getDecl())); in VisitDeclRefExpr() 767 if (const VarDecl *VD = Var.getDecl()) in VisitBinaryOperator() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/ |
| H A D | RenamerClangTidyCheck.cpp | 222 const NamedDecl *getDecl() const { in getDecl() function in clang::tidy::__anon04e9f6f50211::NameLookup 227 const NamedDecl *operator*() const { return getDecl(); } in operator *() 308 Decl = Ref.getDecl(); in check() 310 Decl = Ref.getDecl(); in check() 312 Decl = Ref.getDecl(); in check() 314 Decl = Ref.getDecl(); in check() 361 addUsage(DeclRef->getDecl(), Range, Result.SourceManager); in check() 416 addUsage(Typedef->getDecl(), Value->getSourceRange(), in check() 425 addUsage(Typedef->getDecl(), Value->getSourceRange(), in check() 430 addUsage(Typedef->getDecl(), Value->getSourceRange(), in check()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/fuchsia/ |
| H A D | MultipleInheritanceCheck.cpp | 76 const RecordDecl *D = Ty->getDecl()->getDefinition(); in isInterface() 105 const auto *Base = cast<CXXRecordDecl>(Ty->getDecl()->getDefinition()); in check() 114 const auto *Base = cast<CXXRecordDecl>(Ty->getDecl()->getDefinition()); in check()
|
| /llvm-project-15.0.7/clang/lib/Sema/ |
| H A D | ScopeInfo.cpp | 77 D = cast<DeclRefExpr>(E)->getDecl(); in getBaseInfo() 88 D = IE->getDecl(); in getBaseInfo() 141 : Base(nullptr, true), Property(DRE->getDecl()) { in WeakObjectProfileTy() 147 : Base(getBaseInfo(IvarE->getBase())), Property(IvarE->getDecl()) { in WeakObjectProfileTy() 194 if (isa<VarDecl>(DRE->getDecl())) in markSafeWeakUse()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/ |
| H A D | SignalHandlerCheck.cpp | 368 if (const auto *CallF = dyn_cast<FunctionDecl>((*Itr)->getDecl())) { in check() 436 << cast<FunctionDecl>(Callee->getDecl()) in reportHandlerChain() 437 << cast<FunctionDecl>(Caller->getDecl()); in reportHandlerChain() 443 << cast<FunctionDecl>(Caller->getDecl()) << HandlerRef->getSourceRange(); in reportHandlerChain()
|