Home
last modified time | relevance | path

Searched refs:CtorDecl (Results 1 – 7 of 7) sorted by relevance

/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DGTestChecker.cpp193 const CXXConstructorDecl *CtorDecl = CtorCall->getDecl(); in checkPostCall() local
194 const CXXRecordDecl *CtorParent = CtorDecl->getParent(); in checkPostCall()
198 unsigned ParamCount = CtorDecl->getNumParams(); in checkPostCall()
204 if (CtorDecl->isCopyConstructor() && ParamCount == 1) { in checkPostCall()
223 if (ParamCount == 1 && CtorDecl->getParamDecl(0)->getType() == BoolTy) { in checkPostCall()
229 auto *RefTy = CtorDecl->getParamDecl(0)->getType()->getAs<ReferenceType>(); in checkPostCall()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/
H A DUninitializedObjectChecker.cpp109 getConstructedRegion(const CXXConstructorDecl *CtorDecl,
139 const auto *CtorDecl = dyn_cast_or_null<CXXConstructorDecl>( in checkEndFunction() local
141 if (!CtorDecl) in checkEndFunction()
144 if (!CtorDecl->isUserProvided()) in checkEndFunction()
147 if (CtorDecl->getParent()->isUnion()) in checkEndFunction()
151 if (willObjectBeAnalyzedLater(CtorDecl, Context)) in checkEndFunction()
154 const TypedValueRegion *R = getConstructedRegion(CtorDecl, Context); in checkEndFunction()
456 getConstructedRegion(const CXXConstructorDecl *CtorDecl, in getConstructedRegion() argument
460 Context.getSValBuilder().getCXXThis(CtorDecl, Context.getStackFrame()); in getConstructedRegion()
/llvm-project-15.0.7/clang-tools-extra/clang-reorder-fields/
H A DReorderFieldsAction.cpp161 const CXXConstructorDecl *CtorDecl, ArrayRef<unsigned> NewFieldsOrder, in reorderFieldsInConstructor() argument
164 assert(CtorDecl && "Constructor declaration is null"); in reorderFieldsInConstructor()
165 if (CtorDecl->isImplicit() || CtorDecl->getNumCtorInitializers() <= 1) in reorderFieldsInConstructor()
171 assert(CtorDecl->isThisDeclarationADefinition() && "Not a definition"); in reorderFieldsInConstructor()
179 for (const auto *Initializer : CtorDecl->inits()) { in reorderFieldsInConstructor()
/llvm-project-15.0.7/clang/lib/Tooling/Refactoring/Rename/
H A DUSRFindingAction.cpp46 if (const auto *CtorDecl = dyn_cast<CXXConstructorDecl>(FoundDecl)) in getCanonicalSymbolDeclaration() local
47 FoundDecl = CtorDecl->getParent(); in getCanonicalSymbolDeclaration()
165 for (const auto *CtorDecl : RecordDecl->ctors()) in addUSRsOfCtorDtors() local
166 USRSet.insert(getUSRForDecl(CtorDecl)); in addUSRsOfCtorDtors()
/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/
H A DQualityTests.cpp374 const NamedDecl *CtorDecl = &findDecl(AST, [](const NamedDecl &ND) { in TEST() local
379 Ctor.merge(CodeCompletionResult(CtorDecl, /*Priority=*/0)); in TEST()
437 const NamedDecl *CtorDecl = &findDecl(AST, [](const NamedDecl &ND) { in TEST() local
447 CtorQ.merge(CodeCompletionResult(CtorDecl, /*Priority=*/0)); in TEST()
/llvm-project-15.0.7/clang/unittests/ASTMatchers/Dynamic/
H A DRegistryTest.cpp331 Matcher<Decl> CtorDecl = constructMatcher( in TEST_F() local
338 EXPECT_TRUE(matches("struct Foo { Foo() : foo(1) {} int foo; };", CtorDecl)); in TEST_F()
339 EXPECT_FALSE(matches("struct Foo { Foo() {} int foo; };", CtorDecl)); in TEST_F()
340 EXPECT_FALSE(matches("struct Foo { Foo() : bar(1) {} int bar; };", CtorDecl)); in TEST_F()
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaInit.cpp539 CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function); in PerformEmptyInit() local
540 CXXRecordDecl *R = CtorDecl->getParent(); in PerformEmptyInit()
542 if (CtorDecl->getMinRequiredArguments() == 0 && in PerformEmptyInit()
543 CtorDecl->isExplicit() && R->getDeclName() && in PerformEmptyInit()
544 SemaRef.SourceMgr.isInSystemHeader(CtorDecl->getLocation())) { in PerformEmptyInit()
566 SemaRef.Diag(CtorDecl->getLocation(), in PerformEmptyInit()
4201 CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function); in TryConstructorInitialization() local
4214 if (!CtorDecl->getParent()->allowConstDefaultInit()) { in TryConstructorInitialization()
4224 if (IsListInit && !Kind.AllowExplicit() && CtorDecl->isExplicit()) { in TryConstructorInitialization()
4244 Best->FoundDecl, CtorDecl, DestArrayType, HadMultipleCandidates, in TryConstructorInitialization()
[all …]