Home
last modified time | relevance | path

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

/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DGTestChecker.cpp192 const CXXConstructorDecl *CtorDecl = CtorCall->getDecl(); in checkPostCall() local
193 const CXXRecordDecl *CtorParent = CtorDecl->getParent(); in checkPostCall()
197 unsigned ParamCount = CtorDecl->getNumParams(); in checkPostCall()
203 if (CtorDecl->isCopyConstructor() && ParamCount == 1) { in checkPostCall()
222 if (ParamCount == 1 && CtorDecl->getParamDecl(0)->getType() == BoolTy) { in checkPostCall()
228 auto *RefTy = CtorDecl->getParamDecl(0)->getType()->getAs<ReferenceType>(); in checkPostCall()
/llvm-project/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/
H A DUninitializedObjectChecker.cpp106 getConstructedRegion(const CXXConstructorDecl *CtorDecl,
136 const auto *CtorDecl = dyn_cast_or_null<CXXConstructorDecl>( in checkEndFunction() local
138 if (!CtorDecl) in checkEndFunction()
141 if (!CtorDecl->isUserProvided()) in checkEndFunction()
144 if (CtorDecl->getParent()->isUnion()) in checkEndFunction()
148 if (willObjectBeAnalyzedLater(CtorDecl, Context)) in checkEndFunction()
151 const TypedValueRegion *R = getConstructedRegion(CtorDecl, Context); in checkEndFunction()
453 getConstructedRegion(const CXXConstructorDecl *CtorDecl, in getConstructedRegion() argument
457 Context.getSValBuilder().getCXXThis(CtorDecl, Context.getStackFrame()); in getConstructedRegion()
/llvm-project/clang-tools-extra/clang-reorder-fields/
H A DReorderFieldsAction.cpp233 const CXXConstructorDecl *CtorDecl, ArrayRef<unsigned> NewFieldsOrder, in reorderFieldsInInitListExpr()
236 assert(CtorDecl && "Constructor declaration is null"); in reorderFieldsInInitListExpr()
237 if (CtorDecl->isImplicit() || CtorDecl->getNumCtorInitializers() <= 1) in reorderFieldsInInitListExpr()
243 assert(CtorDecl->isThisDeclarationADefinition() && "Not a definition"); in reorderFieldsInInitListExpr()
251 for (const auto *Initializer : CtorDecl->inits()) {
161 reorderFieldsInConstructor(const CXXConstructorDecl * CtorDecl,ArrayRef<unsigned> NewFieldsOrder,ASTContext & Context,std::map<std::string,tooling::Replacements> & Replacements) reorderFieldsInConstructor() argument
/llvm-project/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/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/clang/unittests/ASTMatchers/Dynamic/
H A DRegistryTest.cpp332 Matcher<Decl> CtorDecl = constructMatcher( in TEST_F() local
339 EXPECT_TRUE(matches("struct Foo { Foo() : foo(1) {} int foo; };", CtorDecl)); in TEST_F()
340 EXPECT_FALSE(matches("struct Foo { Foo() {} int foo; };", CtorDecl)); in TEST_F()
341 EXPECT_FALSE(matches("struct Foo { Foo() : bar(1) {} int bar; };", CtorDecl)); in TEST_F()
/llvm-project/clang/lib/Analysis/FlowSensitive/
H A DASTOps.cpp283 if (const auto *CtorDecl = dyn_cast<CXXConstructorDecl>(&FD)) in getReferencedDecls()
284 Visitor.traverseConstructorInits(CtorDecl); in getReferencedDecls()
274 if (const auto *CtorDecl = dyn_cast<CXXConstructorDecl>(&FD)) getReferencedDecls() local
/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/
H A DPtrTypesSemantics.cpp376 if (auto *CtorDecl = dyn_cast<CXXConstructorDecl>(D)) { in VisitConditionalOperator()
377 for (auto *CtorInit : CtorDecl->inits()) { in VisitConditionalOperator()
285 if (auto *CtorDecl = dyn_cast<CXXConstructorDecl>(D)) { IsFunctionTrivial() local
/llvm-project/clang/lib/Sema/
H A DSemaInit.cpp619 CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function); in PerformEmptyInit()
620 CXXRecordDecl *R = CtorDecl->getParent(); in PerformEmptyInit()
622 if (CtorDecl->getMinRequiredArguments() == 0 && in PerformEmptyInit()
623 CtorDecl->isExplicit() && R->getDeclName() && in PerformEmptyInit()
624 SemaRef.SourceMgr.isInSystemHeader(CtorDecl->getLocation())) { in PerformEmptyInit()
646 SemaRef.Diag(CtorDecl->getLocation(), in PerformEmptyInit()
4574 CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function); in TryReferenceListInitialization()
4595 if (!CtorDecl->getParent()->allowConstDefaultInit()) { in TryReferenceListInitialization()
4605 if (IsListInit && !Kind.AllowExplicit() && CtorDecl->isExplicit()) { in TryReferenceListInitialization()
4625 Best->FoundDecl, CtorDecl, DestArrayTyp in TryReferenceListInitialization()
617 CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function); PerformEmptyInit() local
4464 CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function); TryConstructorInitialization() local
9041 CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function); Diagnose() local
[all...]
/llvm-project/clang/lib/StaticAnalyzer/Core/
H A DBugReporterVisitors.cpp1362 const auto *CtorDecl = CE->getConstructor(); in showBRDiagnostics()
1364 return CtorDecl->isCopyOrMoveConstructor() && CtorDecl->isTrivial(); in showBRDiagnostics()
1451 const auto *CtorDecl = CE->getConstructor(); isTrivialCopyOrMoveCtor() local