/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
D | GTestChecker.cpp | 193 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()
|
/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/ |
D | UninitializedObjectChecker.cpp | 111 getConstructedRegion(const CXXConstructorDecl *CtorDecl, 141 const auto *CtorDecl = dyn_cast_or_null<CXXConstructorDecl>( in checkEndFunction() local 143 if (!CtorDecl) in checkEndFunction() 146 if (!CtorDecl->isUserProvided()) in checkEndFunction() 149 if (CtorDecl->getParent()->isUnion()) in checkEndFunction() 153 if (willObjectBeAnalyzedLater(CtorDecl, Context)) in checkEndFunction() 156 const TypedValueRegion *R = getConstructedRegion(CtorDecl, Context); in checkEndFunction() 458 getConstructedRegion(const CXXConstructorDecl *CtorDecl, in getConstructedRegion() argument 462 Context.getSValBuilder().getCXXThis(CtorDecl, Context.getStackFrame()); in getConstructedRegion()
|
/external/llvm-project/clang-tools-extra/clang-reorder-fields/ |
D | ReorderFieldsAction.cpp | 161 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()
|
/external/llvm-project/clang/lib/Tooling/Refactoring/Rename/ |
D | USRFindingAction.cpp | 46 if (const auto *CtorDecl = dyn_cast<CXXConstructorDecl>(FoundDecl)) in getCanonicalSymbolDeclaration() local 47 FoundDecl = CtorDecl->getParent(); in getCanonicalSymbolDeclaration() 167 for (const auto *CtorDecl : RecordDecl->ctors()) in addUSRsOfCtorDtors() local 168 USRSet.insert(getUSRForDecl(CtorDecl)); in addUSRsOfCtorDtors()
|
/external/llvm-project/clang-tools-extra/clangd/unittests/ |
D | QualityTests.cpp | 371 const NamedDecl *CtorDecl = &findDecl(AST, [](const NamedDecl &ND) { in TEST() local 376 Ctor.merge(CodeCompletionResult(CtorDecl, /*Priority=*/0)); in TEST() 434 const NamedDecl *CtorDecl = &findDecl(AST, [](const NamedDecl &ND) { in TEST() local 444 CtorQ.merge(CodeCompletionResult(CtorDecl, /*Priority=*/0)); in TEST()
|
/external/clang/unittests/ASTMatchers/Dynamic/ |
D | RegistryTest.cpp | 302 Matcher<Decl> CtorDecl = constructMatcher( in TEST_F() local 309 EXPECT_TRUE(matches("struct Foo { Foo() : foo(1) {} int foo; };", CtorDecl)); in TEST_F() 310 EXPECT_FALSE(matches("struct Foo { Foo() {} int foo; };", CtorDecl)); in TEST_F() 311 EXPECT_FALSE(matches("struct Foo { Foo() : bar(1) {} int bar; };", CtorDecl)); in TEST_F()
|
/external/llvm-project/clang/unittests/ASTMatchers/Dynamic/ |
D | RegistryTest.cpp | 301 Matcher<Decl> CtorDecl = constructMatcher( in TEST_F() local 308 EXPECT_TRUE(matches("struct Foo { Foo() : foo(1) {} int foo; };", CtorDecl)); in TEST_F() 309 EXPECT_FALSE(matches("struct Foo { Foo() {} int foo; };", CtorDecl)); in TEST_F() 310 EXPECT_FALSE(matches("struct Foo { Foo() : bar(1) {} int bar; };", CtorDecl)); in TEST_F()
|
/external/clang/lib/Sema/ |
D | SemaInit.cpp | 428 CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function); in PerformEmptyInit() local 429 CXXRecordDecl *R = CtorDecl->getParent(); in PerformEmptyInit() 431 if (CtorDecl->getMinRequiredArguments() == 0 && in PerformEmptyInit() 432 CtorDecl->isExplicit() && R->getDeclName() && in PerformEmptyInit() 433 SemaRef.SourceMgr.isInSystemHeader(CtorDecl->getLocation())) { in PerformEmptyInit() 455 SemaRef.Diag(CtorDecl->getLocation(), in PerformEmptyInit() 3605 CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function); in TryConstructorInitialization() local 3608 if (!CtorDecl->getParent()->allowConstDefaultInit()) { in TryConstructorInitialization() 3618 if (IsListInit && !Kind.AllowExplicit() && CtorDecl->isExplicit()) { in TryConstructorInitialization() 3627 Best->FoundDecl, CtorDecl, DestType, HadMultipleCandidates, in TryConstructorInitialization() [all …]
|
/external/llvm-project/clang/lib/Sema/ |
D | SemaInit.cpp | 537 CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function); in PerformEmptyInit() local 538 CXXRecordDecl *R = CtorDecl->getParent(); in PerformEmptyInit() 540 if (CtorDecl->getMinRequiredArguments() == 0 && in PerformEmptyInit() 541 CtorDecl->isExplicit() && R->getDeclName() && in PerformEmptyInit() 542 SemaRef.SourceMgr.isInSystemHeader(CtorDecl->getLocation())) { in PerformEmptyInit() 564 SemaRef.Diag(CtorDecl->getLocation(), in PerformEmptyInit() 4151 CXXConstructorDecl *CtorDecl = cast<CXXConstructorDecl>(Best->Function); in TryConstructorInitialization() local 4154 if (!CtorDecl->getParent()->allowConstDefaultInit()) { in TryConstructorInitialization() 4164 if (IsListInit && !Kind.AllowExplicit() && CtorDecl->isExplicit()) { in TryConstructorInitialization() 4172 Best->FoundDecl, CtorDecl, DestArrayType, HadMultipleCandidates, in TryConstructorInitialization() [all …]
|