Home
last modified time | relevance | path

Searched refs:castExpr (Results 1 – 25 of 39) sorted by relevance

12

/external/llvm-project/clang-tools-extra/clang-tidy/readability/
DDeleteNullPointerCheck.cpp23 cxxDeleteExpr(has(castExpr(has(declRefExpr( in registerMatchers()
28 cxxDeleteExpr(has(castExpr(has(memberExpr(hasDeclaration( in registerMatchers()
36 const auto PointerCondition = castExpr(hasCastKind(CK_PointerToBoolean), in registerMatchers()
39 hasOperands(castExpr(hasCastKind(CK_NullToPointer)), PointerExpr)); in registerMatchers()
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/
DJavaParserTest.java180 CastExpr castExpr = returnStmt.getExpression().get().asCastExpr(); in rangeOfIntersectionType() local
181 Type type = castExpr.getType(); in rangeOfIntersectionType()
194 CastExpr castExpr = returnStmt.getExpression().get().asCastExpr(); in rangeOfCast() local
195 assertEquals(range(3, 12, 3, 101), castExpr.getRange().get()); in rangeOfCast()
207 CastExpr castExpr = returnStmt.getExpression().get().asCastExpr(); in rangeOfCastNonIntersection() local
208 assertEquals(range(3, 12, 3, 101), castExpr.getRange().get()); in rangeOfCastNonIntersection()
220 CastExpr castExpr = returnStmt.getExpression().get().asCastExpr(); in rangeOfLambda() local
221 LambdaExpr lambdaExpr = castExpr.getExpression().asLambdaExpr(); in rangeOfLambda()
236 CastExpr castExpr = returnStmt.getExpression().get().asCastExpr(); in rangeOfLambdaBody() local
237 LambdaExpr lambdaExpr = castExpr.getExpression().asLambdaExpr(); in rangeOfLambdaBody()
/external/clang/lib/Sema/
DSemaExprObjC.cpp3377 Expr *castExpr, in addFixitForObjCARCConversion() argument
3408 Expr *castedE = castExpr; in addFixitForObjCARCConversion()
3454 Expr *castedE = castExpr->IgnoreImpCasts(); in addFixitForObjCARCConversion()
3498 Expr *castExpr, Expr *realCast, in diagnoseObjCARCConversion() argument
3502 (castRange.isValid() ? castRange.getBegin() : castExpr->getExprLoc()); in diagnoseObjCARCConversion()
3508 QualType castExprType = castExpr->getType(); in diagnoseObjCARCConversion()
3547 << castExpr->getSourceRange(); in diagnoseObjCARCConversion()
3550 ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr); in diagnoseObjCARCConversion()
3559 castType, castExpr, realCast, "__bridge ", in diagnoseObjCARCConversion()
3567 S.Diag(br ? castExpr->getExprLoc() : noteLoc, in diagnoseObjCARCConversion()
[all …]
DSemaCast.cpp88 ExprResult complete(CastExpr *castExpr) { in complete()
92 castExpr = ImplicitCastExpr::Create(Self.Context, in complete()
94 CK_Dependent, castExpr, nullptr, in complete()
95 castExpr->getValueKind()); in complete()
97 return castExpr; in complete()
/external/llvm-project/clang/lib/Sema/
DSemaExprObjC.cpp3752 SourceLocation afterLParen, QualType castType, Expr *castExpr, in addFixitForObjCARCConversion() argument
3782 Expr *castedE = castExpr; in addFixitForObjCARCConversion()
3828 Expr *castedE = castExpr->IgnoreImpCasts(); in addFixitForObjCARCConversion()
3872 Expr *castExpr, Expr *realCast, in diagnoseObjCARCConversion() argument
3876 (castRange.isValid() ? castRange.getBegin() : castExpr->getExprLoc()); in diagnoseObjCARCConversion()
3882 QualType castExprType = castExpr->getType(); in diagnoseObjCARCConversion()
3923 << castExpr->getSourceRange(); in diagnoseObjCARCConversion()
3926 ARCCastChecker(S.Context, exprACTC, castACTC, true).Visit(castExpr); in diagnoseObjCARCConversion()
3935 castType, castExpr, realCast, "__bridge ", in diagnoseObjCARCConversion()
3943 : S.Diag(br ? castExpr->getExprLoc() : noteLoc, in diagnoseObjCARCConversion()
[all …]
DSemaCast.cpp104 ExprResult complete(CastExpr *castExpr) { in complete()
108 castExpr = ImplicitCastExpr::Create( in complete()
110 castExpr, nullptr, castExpr->getValueKind(), in complete()
113 updatePartOfExplicitCastFlags(castExpr); in complete()
114 return castExpr; in complete()
/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
DMisplacedPointerArithmeticInAllocCheck.cpp40 hasLHS(anyOf(AllocCall, castExpr(hasSourceExpression(AllocCall)))), in registerMatchers()
48 hasLHS(anyOf(New, castExpr(New))), in registerMatchers()
56 hasLHS(anyOf(ArrayNew, castExpr(ArrayNew))), in registerMatchers()
DIntegerDivisionCheck.cpp37 hasAncestor(castExpr(hasCastKind(CK_IntegralToFloating)) in registerMatchers()
41 hasAncestor(castExpr(equalsBoundNode("FloatCast"))))))) in registerMatchers()
DSizeofExpressionCheck.cpp145 castExpr(hasSourceExpression(ArrayExpr)))); in registerMatchers()
DNotNullTerminatedResultCheck.cpp782 unless(hasAncestor(castExpr(unless(implicitCastExpr()))))) in registerMatchers()
786 castExpr(allOf(unless(implicitCastExpr()), in registerMatchers()
/external/llvm-project/clang/lib/ARCMigrate/
DTransUnbridgedCasts.cpp94 Expr *castExpr = E->getSubExpr(); in VisitCastExpr() local
95 QualType castExprType = castExpr->getType(); in VisitCastExpr()
104 if (castExpr->isNullPointerConstant(Pass.Ctx, in VisitCastExpr()
108 SourceLocation loc = castExpr->getExprLoc(); in VisitCastExpr()
/external/clang/lib/ARCMigrate/
DTransUnbridgedCasts.cpp95 Expr *castExpr = E->getSubExpr(); in VisitCastExpr() local
96 QualType castExprType = castExpr->getType(); in VisitCastExpr()
105 if (castExpr->isNullPointerConstant(Pass.Ctx, in VisitCastExpr()
109 SourceLocation loc = castExpr->getExprLoc(); in VisitCastExpr()
/external/clang/unittests/ASTMatchers/
DASTMatchersNodeTest.cpp859 EXPECT_TRUE(matches("char *p = reinterpret_cast<char *>(&p);",castExpr())); in TEST()
860 EXPECT_TRUE(matches("void *p = (void *)(&p);", castExpr())); in TEST()
861 EXPECT_TRUE(matches("char q, *p = const_cast<char *>(&q);", castExpr())); in TEST()
862 EXPECT_TRUE(matches("char c = char(0);", castExpr())); in TEST()
866 EXPECT_TRUE(matches("char c = 0;", castExpr())); in TEST()
868 EXPECT_TRUE(matches("char c = 0, d = c;", castExpr())); in TEST()
872 EXPECT_TRUE(notMatches("char c = '0';", castExpr())); in TEST()
873 EXPECT_TRUE(notMatches("char c, &q = c;", castExpr())); in TEST()
874 EXPECT_TRUE(notMatches("int i = (0);", castExpr())); in TEST()
875 EXPECT_TRUE(notMatches("int i = 0;", castExpr())); in TEST()
/external/llvm-project/clang-tools-extra/clang-tidy/performance/
DNoIntToPtrCheck.cpp20 Finder->addMatcher(castExpr(hasCastKind(CK_IntegralToPointer), in registerMatchers()
/external/javaparser/javaparser-core/src/main/javacc-support/com/github/javaparser/
DGeneratedJavaParserBase.java271 CastExpr castExpr = (CastExpr) ret; in generateLambda() local
272 Expression inner = generateLambda(castExpr.getExpression(), lambdaBody); in generateLambda()
273 castExpr.setExpression(inner); in generateLambda()
/external/llvm-project/clang/unittests/ASTMatchers/
DASTMatchersNodeTest.cpp1168 EXPECT_TRUE(matches("void *p = (void *)(&p);", castExpr())); in TEST_P()
1175 EXPECT_TRUE(matches("char *p = reinterpret_cast<char *>(&p);", castExpr())); in TEST_P()
1176 EXPECT_TRUE(matches("char q, *p = const_cast<char *>(&q);", castExpr())); in TEST_P()
1177 EXPECT_TRUE(matches("char c = char(0);", castExpr())); in TEST_P()
1183 matches("char c = 0;", traverse(ast_type_traits::TK_AsIs, castExpr()))); in TEST_P()
1186 traverse(ast_type_traits::TK_AsIs, castExpr()))); in TEST_P()
1194 EXPECT_TRUE(notMatches("char c = '0';", castExpr())); in TEST_P()
1196 EXPECT_TRUE(notMatches("int i = (0);", castExpr())); in TEST_P()
1197 EXPECT_TRUE(notMatches("int i = 0;", castExpr())); in TEST_P()
1204 EXPECT_TRUE(notMatches("char c, &q = c;", castExpr())); in TEST_P()
/external/llvm-project/clang/lib/Analysis/
DExprMutationAnalyzer.cpp305 castExpr(hasCastKind(CK_ArrayToPointerDecay), in findDirectMutation()
411 stmt(castExpr(hasSourceExpression(canResolveToExpr(equalsNode(Exp))), in findCastMutation()
423 expr(castExpr(hasSourceExpression(canResolveToExpr(equalsNode(Exp))), in findCastMutation()
/external/javaparser/javaparser-core-testing-bdd/src/test/java/com/github/javaparser/steps/
DParsingSteps.java160 CastExpr castExpr = methodCallExpr.getArgument(0).asCastExpr(); in thenLambdaInMethodCallInStatementInMethodInClassBody() local
161 LambdaExpr lambdaExpr = castExpr.getExpression().asLambdaExpr(); in thenLambdaInMethodCallInStatementInMethodInClassBody()
/external/llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines/
DOwningMemoryCheck.cpp57 castExpr(hasSourceExpression(CreatesLegacyOwner)); in registerMatchers()
DNarrowingConversionsCheck.cpp56 unless(hasParent(castExpr())), in registerMatchers()
/external/llvm-project/clang-tools-extra/clang-tidy/modernize/
DUseNullptrCheck.cpp46 castExpr(anyOf(ImplicitCastToNull, in makeCastSequenceMatcher()
/external/clang/lib/CodeGen/
DCGDecl.cpp608 while (auto castExpr = dyn_cast<CastExpr>(init->IgnoreParens())) { in tryEmitARCCopyWeakInit() local
609 switch (castExpr->getCastKind()) { in tryEmitARCCopyWeakInit()
620 const Expr *srcExpr = castExpr->getSubExpr(); in tryEmitARCCopyWeakInit()
649 init = castExpr->getSubExpr(); in tryEmitARCCopyWeakInit()
/external/clang/lib/Frontend/Rewrite/
DRewriteObjC.cpp3048 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, DerefExpr->getType(), in RewriteObjCProtocolExpr() local
3051 ReplaceStmt(Exp, castExpr); in RewriteObjCProtocolExpr()
3054 return castExpr; in RewriteObjCProtocolExpr()
4422 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, Context->VoidPtrTy, in SynthBlockInitExpr() local
4424 InitExprs.push_back(castExpr); in SynthBlockInitExpr()
5835 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, castT, in RewriteObjCIvarRefExpr() local
5841 castExpr); in RewriteObjCIvarRefExpr()
5875 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, castT, in RewriteObjCIvarRefExpr() local
5880 IV->getBase()->getLocEnd(), castExpr); in RewriteObjCIvarRefExpr()
/external/llvm-project/clang/lib/Frontend/Rewrite/
DRewriteObjC.cpp3061 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, DerefExpr->getType(), in RewriteObjCProtocolExpr() local
3064 ReplaceStmt(Exp, castExpr); in RewriteObjCProtocolExpr()
3067 return castExpr; in RewriteObjCProtocolExpr()
4433 CastExpr *castExpr = in SynthBlockInitExpr() local
4435 InitExprs.push_back(castExpr); in SynthBlockInitExpr()
5841 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, castT, in RewriteObjCIvarRefExpr() local
5847 castExpr); in RewriteObjCIvarRefExpr()
5882 CastExpr *castExpr = NoTypeInfoCStyleCastExpr(Context, castT, in RewriteObjCIvarRefExpr() local
5887 IV->getBase()->getBeginLoc(), IV->getBase()->getEndLoc(), castExpr); in RewriteObjCIvarRefExpr()
/external/llvm-project/clang/lib/CodeGen/
DCGDecl.cpp683 while (auto castExpr = dyn_cast<CastExpr>(init->IgnoreParens())) { in tryEmitARCCopyWeakInit() local
684 switch (castExpr->getCastKind()) { in tryEmitARCCopyWeakInit()
695 const Expr *srcExpr = castExpr->getSubExpr(); in tryEmitARCCopyWeakInit()
724 init = castExpr->getSubExpr(); in tryEmitARCCopyWeakInit()

12