Home
last modified time | relevance | path

Searched refs:getNodeAs (Results 1 – 25 of 331) sorted by relevance

12345678910>>...14

/external/llvm-project/clang/unittests/AST/
DASTTraverserTest.cpp137 return Result[0].getNodeAs<FunctionDecl>("fn"); in getFunctionNode()
259 auto Templ = Result[0].getNodeAs<ClassTemplateSpecializationDecl>("fn"); in TEST()
357 EXPECT_EQ(dumpASTString(TK_AsIs, FN[0].getNodeAs<Decl>("fn")), in TEST()
384 FN[0].getNodeAs<Decl>("fn")), in TEST()
404 EXPECT_EQ(dumpASTString(TK_AsIs, FN[0].getNodeAs<Decl>("fn")), in TEST()
425 FN[0].getNodeAs<Decl>("fn")), in TEST()
445 EXPECT_EQ(dumpASTString(TK_AsIs, FN[0].getNodeAs<Decl>("var")), in TEST()
461 FN[0].getNodeAs<Decl>("var")), in TEST()
476 EXPECT_EQ(dumpASTString(TK_AsIs, FN[1].getNodeAs<Decl>("staticAssert")), in TEST()
487 FN[1].getNodeAs<Decl>("staticAssert")), in TEST()
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
DSizeofExpressionCheck.cpp284 if (const auto *E = Result.Nodes.getNodeAs<Expr>("sizeof-constant")) { in check()
288 Result.Nodes.getNodeAs<Expr>("sizeof-integer-call")) { in check()
291 } else if (const auto *E = Result.Nodes.getNodeAs<Expr>("sizeof-this")) { in check()
294 } else if (const auto *E = Result.Nodes.getNodeAs<Expr>("sizeof-charp")) { in check()
298 Result.Nodes.getNodeAs<Expr>("sizeof-pointer-to-aggregate")) { in check()
302 Result.Nodes.getNodeAs<Expr>("sizeof-compare-constant")) { in check()
306 Result.Nodes.getNodeAs<Expr>("sizeof-comma-expr")) { in check()
309 Result.Nodes.getNodeAs<Expr>("sizeof-divide-expr")) { in check()
310 const auto *NumTy = Result.Nodes.getNodeAs<Type>("num-type"); in check()
311 const auto *DenomTy = Result.Nodes.getNodeAs<Type>("denom-type"); in check()
[all …]
DNotNullTerminatedResultCheck.cpp46 if (const auto *DestMalloc = Result.Nodes.getNodeAs<Expr>(DestMallocExprName)) in getDestCapacityExpr()
50 Result.Nodes.getNodeAs<VariableArrayType>(DestArrayTyName)) in getDestCapacityExpr()
53 if (const auto *DestVD = Result.Nodes.getNodeAs<VarDecl>(DestVarDeclName)) in getDestCapacityExpr()
106 Result.Nodes.getNodeAs<CallExpr>(WrongLengthExprName)) in getStrlenExpr()
119 if (Result.Nodes.getNodeAs<Expr>(UnknownLengthName)) in getGivenLength()
123 getLength(Result.Nodes.getNodeAs<Expr>(WrongLengthExprName), Result)) in getGivenLength()
127 getLength(Result.Nodes.getNodeAs<Expr>(LengthExprName), Result)) in getGivenLength()
170 return !Result.Nodes.getNodeAs<Expr>(UnknownDestName); in isKnownDest()
179 exprToStr(Result.Nodes.getNodeAs<Expr>(LengthExprName), Result).trim(); in isDestBasedOnGivenLength()
187 if (const auto *DestDRE = Result.Nodes.getNodeAs<DeclRefExpr>(DestExprName)) in isDestAndSrcEquals()
[all …]
DStringConstructorCheck.cpp140 const auto *E = Result.Nodes.getNodeAs<CXXConstructExpr>("constructor"); in check()
144 if (Result.Nodes.getNodeAs<Expr>("swapped-parameter")) { in check()
151 } else if (Result.Nodes.getNodeAs<Expr>("empty-string")) { in check()
153 } else if (Result.Nodes.getNodeAs<Expr>("negative-length")) { in check()
155 } else if (Result.Nodes.getNodeAs<Expr>("large-length")) { in check()
158 } else if (Result.Nodes.getNodeAs<Expr>("literal-with-length")) { in check()
159 const auto *Str = Result.Nodes.getNodeAs<StringLiteral>("str"); in check()
160 const auto *Lit = Result.Nodes.getNodeAs<IntegerLiteral>("int"); in check()
164 } else if (const auto *Ptr = Result.Nodes.getNodeAs<Expr>("from-ptr")) { in check()
DSuspiciousStringCompareCheck.cpp169 const auto *Decl = Result.Nodes.getNodeAs<FunctionDecl>("decl"); in check()
170 const auto *Call = Result.Nodes.getNodeAs<CallExpr>("call"); in check()
173 if (Result.Nodes.getNodeAs<Stmt>("missing-comparison")) { in check()
183 if (const auto *E = Result.Nodes.getNodeAs<Expr>("logical-not-comparison")) { in check()
197 if (Result.Nodes.getNodeAs<Stmt>("invalid-comparison")) { in check()
204 Result.Nodes.getNodeAs<BinaryOperator>("suspicious-operator")) { in check()
209 if (Result.Nodes.getNodeAs<Stmt>("invalid-conversion")) { in check()
DSuspiciousEnumUsageCheck.cpp173 Result.Nodes.getNodeAs<BinaryOperator>("diffEnumOp")) { in check()
174 const auto *EnumDec = Result.Nodes.getNodeAs<EnumDecl>("enumDecl"); in check()
176 Result.Nodes.getNodeAs<EnumDecl>("otherEnumDecl"); in check()
194 const auto *EnumDec = Result.Nodes.getNodeAs<EnumDecl>("enumDecl"); in check()
201 if (const auto *EnumExpr = Result.Nodes.getNodeAs<Expr>("enumExpr")) { in check()
208 const auto *LhsExpr = Result.Nodes.getNodeAs<Expr>("lhsExpr"); in check()
211 const auto *RhsExpr = Result.Nodes.getNodeAs<Expr>("rhsExpr"); in check()
DPosixReturnCheck.cpp24 (Result.Nodes.getNodeAs<BinaryOperator>(BindingStr))->getLHS()); in getFunctionSpelling()
64 Result.Nodes.getNodeAs<BinaryOperator>("ltzop")) { in check()
73 Result.Nodes.getNodeAs<BinaryOperator>("atop")) { in check()
80 const auto *BinOp = Result.Nodes.getNodeAs<BinaryOperator>("binop"); in check()
/external/llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines/
DOwningMemoryCheck.cpp202 const auto *DeleteStmt = Nodes.getNodeAs<CXXDeleteExpr>("delete_expr"); in handleDeletion()
204 Nodes.getNodeAs<DeclRefExpr>("deleted_variable"); in handleDeletion()
227 const auto *LegacyConsumer = Nodes.getNodeAs<CallExpr>("legacy_consumer"); in handleLegacyConsumers()
243 const auto *ExpectedOwner = Nodes.getNodeAs<Expr>("expected_owner_argument"); in handleExpectedOwner()
258 Nodes.getNodeAs<BinaryOperator>("owner_assignment"); in handleAssignmentAndInit()
260 Nodes.getNodeAs<VarDecl>("owner_initialization"); in handleAssignmentAndInit()
262 Nodes.getNodeAs<CXXCtorInitializer>("owner_member_initializer"); in handleAssignmentAndInit()
300 Nodes.getNodeAs<BinaryOperator>("bad_owner_creation_assignment"); in handleAssignmentFromNewOwner()
302 Nodes.getNodeAs<VarDecl>("bad_owner_creation_variable"); in handleAssignmentFromNewOwner()
305 Nodes.getNodeAs<Expr>("bad_owner_creation_argument"); in handleAssignmentFromNewOwner()
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/readability/
DStringCompareCheck.cpp51 if (const auto *Matched = Result.Nodes.getNodeAs<Stmt>("match1")) { in check()
56 if (const auto *Matched = Result.Nodes.getNodeAs<Stmt>("match2")) { in check()
59 if (const auto *Zero = Result.Nodes.getNodeAs<Stmt>("zero")) { in check()
60 const auto *Str1 = Result.Nodes.getNodeAs<MemberExpr>("str1"); in check()
61 const auto *Str2 = Result.Nodes.getNodeAs<Stmt>("str2"); in check()
62 const auto *Compare = Result.Nodes.getNodeAs<Stmt>("compare"); in check()
DRedundantSmartptrGetCheck.cpp108 if (Result.Nodes.getNodeAs<Decl>("duck_typing") == nullptr) in allReturnTypesMatch()
115 Result.Nodes.getNodeAs<Type>("op->Type")->getUnqualifiedDesugaredType(); in allReturnTypesMatch()
117 Result.Nodes.getNodeAs<Type>("op*Type")->getUnqualifiedDesugaredType(); in allReturnTypesMatch()
119 Result.Nodes.getNodeAs<Type>("getType")->getUnqualifiedDesugaredType(); in allReturnTypesMatch()
128 bool IsPtrToPtr = Result.Nodes.getNodeAs<Decl>("ptr_to_ptr") != nullptr; in check()
129 bool IsMemberExpr = Result.Nodes.getNodeAs<Expr>("memberExpr") != nullptr; in check()
130 const auto *GetCall = Result.Nodes.getNodeAs<Expr>("redundant_get"); in check()
134 const auto *Smartptr = Result.Nodes.getNodeAs<Expr>("smart_pointer"); in check()
DContainerSizeEmptyCheck.cpp101 Result.Nodes.getNodeAs<CXXMemberCallExpr>("SizeCallExpr"); in check()
102 const auto *BinCmp = Result.Nodes.getNodeAs<CXXOperatorCallExpr>("BinCmp"); in check()
103 const auto *BinaryOp = Result.Nodes.getNodeAs<BinaryOperator>("SizeBinaryOp"); in check()
104 const auto *Pointee = Result.Nodes.getNodeAs<Expr>("Pointee"); in check()
108 : (Pointee ? Pointee : Result.Nodes.getNodeAs<Expr>("STLObject")); in check()
190 Result.Nodes.getNodeAs<UnaryOperator>("NegOnSize")) in check()
210 const auto *Container = Result.Nodes.getNodeAs<NamedDecl>("container"); in check()
219 const auto *Empty = Result.Nodes.getNodeAs<FunctionDecl>("empty"); in check()
/external/llvm-project/clang-tools-extra/clang-tidy/llvm/
DPreferIsaOrDynCastInConditionalsCheck.cpp71 if (const auto *MatchedDecl = Result.Nodes.getNodeAs<CallExpr>("assign")) { in check()
81 Result.Nodes.getNodeAs<CallExpr>("call")) { in check()
88 if (Result.Nodes.getNodeAs<NamedDecl>("dyn_cast")) in check()
94 Result.Nodes.getNodeAs<BinaryOperator>("and")) { in check()
95 const auto *LHS = Result.Nodes.getNodeAs<ImplicitCastExpr>("lhs"); in check()
96 const auto *RHS = Result.Nodes.getNodeAs<CallExpr>("rhs"); in check()
97 const auto *Arg = Result.Nodes.getNodeAs<Expr>("arg"); in check()
98 const auto *Func = Result.Nodes.getNodeAs<NamedDecl>("func"); in check()
/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/
DNumberObjectConversionChecker.cpp66 (Result.Nodes.getNodeAs<Stmt>("pedantic") != nullptr); in run()
73 Result.Nodes.getNodeAs<Expr>("check_if_null")) { in run()
102 const Stmt *Conv = Result.Nodes.getNodeAs<Stmt>("conv"); in run()
105 const Expr *ConvertedCObject = Result.Nodes.getNodeAs<Expr>("c_object"); in run()
106 const Expr *ConvertedCppObject = Result.Nodes.getNodeAs<Expr>("cpp_object"); in run()
107 const Expr *ConvertedObjCObject = Result.Nodes.getNodeAs<Expr>("objc_object"); in run()
116 (Result.Nodes.getNodeAs<Stmt>("comparison") != nullptr); in run()
119 (Result.Nodes.getNodeAs<Decl>("osnumber") != nullptr); in run()
122 (Result.Nodes.getNodeAs<QualType>("int_type") != nullptr); in run()
124 (Result.Nodes.getNodeAs<QualType>("objc_bool_type") != nullptr); in run()
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/misc/
DUniqueptrResetReleaseCheck.cpp42 Result.Nodes.getNodeAs<ClassTemplateSpecializationDecl>(ID); in getDeleterForUniquePtr()
94 const auto *ResetMember = Result.Nodes.getNodeAs<MemberExpr>("reset_member"); in check()
96 Result.Nodes.getNodeAs<MemberExpr>("release_member"); in check()
97 const auto *Right = Result.Nodes.getNodeAs<Expr>("right"); in check()
98 const auto *Left = Result.Nodes.getNodeAs<Expr>("left"); in check()
100 Result.Nodes.getNodeAs<CXXMemberCallExpr>("reset_call"); in check()
DStaticAssertCheck.cpp78 const auto *CondStmt = Result.Nodes.getNodeAs<Stmt>("condStmt"); in check()
79 const auto *Condition = Result.Nodes.getNodeAs<Expr>("condition"); in check()
80 const auto *IsAlwaysFalse = Result.Nodes.getNodeAs<Expr>("isAlwaysFalse"); in check()
81 const auto *AssertMSG = Result.Nodes.getNodeAs<StringLiteral>("assertMSG"); in check()
83 Result.Nodes.getNodeAs<BinaryOperator>("assertExprRoot"); in check()
84 const auto *CastExpr = Result.Nodes.getNodeAs<CStyleCastExpr>("castExpr"); in check()
/external/llvm-project/clang-tools-extra/clang-tidy/performance/
DUnnecessaryCopyInitialization.cpp97 const auto *NewVar = Result.Nodes.getNodeAs<VarDecl>("newVarDecl"); in check()
98 const auto *OldVar = Result.Nodes.getNodeAs<VarDecl>("oldVarDecl"); in check()
99 const auto *ObjectArg = Result.Nodes.getNodeAs<VarDecl>("objectArg"); in check()
100 const auto *BlockStmt = Result.Nodes.getNodeAs<Stmt>("blockStmt"); in check()
101 const auto *CtorCall = Result.Nodes.getNodeAs<CXXConstructExpr>("ctorCall"); in check()
103 Result.Nodes.getNodeAs<CallExpr>("initFunctionCall"); in check()
110 Result.Nodes.getNodeAs<DeclStmt>("declStmt")->isSingleDecl() && in check()
DInefficientVectorOperationCheck.cpp184 Result.Nodes.getNodeAs<VarDecl>(VectorVarDeclName); in check()
185 const auto *ForLoop = Result.Nodes.getNodeAs<ForStmt>(LoopCounterName); in check()
187 Result.Nodes.getNodeAs<CXXForRangeStmt>(RangeLoopName); in check()
189 Result.Nodes.getNodeAs<CXXMemberCallExpr>(PushBackOrEmplaceBackCallName); in check()
190 const auto *ProtoVarDecl = Result.Nodes.getNodeAs<VarDecl>(ProtoVarDeclName); in check()
192 Result.Nodes.getNodeAs<CXXMemberCallExpr>(ProtoAddFieldCallName); in check()
193 const auto *LoopEndExpr = Result.Nodes.getNodeAs<Expr>(LoopEndExprName); in check()
194 const auto *LoopParent = Result.Nodes.getNodeAs<CompoundStmt>(LoopParentName); in check()
/external/llvm-project/clang-tools-extra/clang-tidy/android/
DCloexecCheck.cpp55 const auto *MatchedCall = Result.Nodes.getNodeAs<CallExpr>(FuncBindingStr); in insertMacroFlag()
57 const auto *FD = Result.Nodes.getNodeAs<FunctionDecl>(FuncDeclBindingStr); in insertMacroFlag()
76 const auto *MatchedCall = Result.Nodes.getNodeAs<CallExpr>(FuncBindingStr); in replaceFunc()
84 const auto *MatchedCall = Result.Nodes.getNodeAs<CallExpr>(FuncBindingStr); in insertStringFlag()
85 const auto *FD = Result.Nodes.getNodeAs<FunctionDecl>(FuncDeclBindingStr); in insertStringFlag()
104 const auto *MatchedCall = Result.Nodes.getNodeAs<CallExpr>(FuncBindingStr); in getSpellingArg()
/external/llvm-project/clang-tools-extra/clang-tidy/abseil/
DDurationUnnecessaryConversionCheck.cpp78 const auto *OuterCall = Result.Nodes.getNodeAs<Expr>("call"); in check()
84 if (const auto *Binop = Result.Nodes.getNodeAs<BinaryOperator>("binop")) { in check()
85 const auto *Arg = Result.Nodes.getNodeAs<Expr>("arg"); in check()
86 const auto *InnerCall = Result.Nodes.getNodeAs<Expr>("inner_call"); in check()
106 } else if (const auto *Arg = Result.Nodes.getNodeAs<Expr>("arg")) { in check()
/external/llvm-project/clang-tools-extra/clang-tidy/modernize/
DRedundantVoidArgCheck.cpp75 if (const auto *Function = Nodes.getNodeAs<FunctionDecl>(FunctionId)) { in check()
78 Nodes.getNodeAs<TypedefNameDecl>(TypedefId)) { in check()
80 } else if (const auto *Member = Nodes.getNodeAs<FieldDecl>(FieldId)) { in check()
82 } else if (const auto *Var = Nodes.getNodeAs<VarDecl>(VarId)) { in check()
85 Nodes.getNodeAs<CXXNamedCastExpr>(NamedCastId)) { in check()
88 Nodes.getNodeAs<CStyleCastExpr>(CStyleCastId)) { in check()
91 Nodes.getNodeAs<ExplicitCastExpr>(ExplicitCastId)) { in check()
93 } else if (const auto *Lambda = Nodes.getNodeAs<LambdaExpr>(LambdaId)) { in check()
DUseUncaughtExceptionsCheck.cpp54 const CallExpr *C = Result.Nodes.getNodeAs<CallExpr>("init_call_expr"); in check()
60 } else if (const auto *E = Result.Nodes.getNodeAs<CallExpr>("call_expr")) { in check()
64 Result.Nodes.getNodeAs<DeclRefExpr>("decl_ref_expr")) { in check()
69 const auto *U = Result.Nodes.getNodeAs<UsingDecl>("using_decl"); in check()
/external/llvm-project/clang-tools-extra/clang-tidy/hicpp/
DMultiwayPathsCoveredCheck.cpp94 Result.Nodes.getNodeAs<IfStmt>("else-if")) { in check()
99 const auto *Switch = Result.Nodes.getNodeAs<SwitchStmt>("switch"); in check()
145 assert(!Result.Nodes.getNodeAs<DeclRefExpr>("enum-condition") && in handleSwitchWithoutDefault()
159 Result.Nodes.getNodeAs<DeclRefExpr>("non-enum-condition")) { in handleSwitchWithoutDefault()
164 Result.Nodes.getNodeAs<FieldDecl>("bitfield")) { in handleSwitchWithoutDefault()
DSignedBitwiseCheck.cpp78 const auto *SignedOperand = N.getNodeAs<Expr>("signed-operand"); in check()
85 if (const auto *UnaryOp = N.getNodeAs<UnaryOperator>("unary-signed")) { in check()
90 N.getNodeAs<BinaryOperator>("binary-no-sign-interference")) in check()
93 N.getNodeAs<BinaryOperator>("binary-sign-interference")) in check()
/external/llvm-project/clang-tools-extra/clang-tidy/google/
DUpgradeGoogletestCaseCheck.cpp240 const auto *Class = Result.Nodes.getNodeAs<CXXRecordDecl>("class"); in derivedTypeHasReplacementMethod()
251 if (const auto *Using = Result.Nodes.getNodeAs<UsingDecl>("using")) { in getAliasNameRange()
256 Result.Nodes.getNodeAs<TypeLoc>("typeloc")->getSourceRange()); in getAliasNameRange()
262 if (const auto *Method = Result.Nodes.getNodeAs<CXXMethodDecl>("method")) { in check()
268 if (const auto *Call = Result.Nodes.getNodeAs<CXXMemberCallExpr>("call")) { in check()
274 } else if (const auto *Ref = Result.Nodes.getNodeAs<DeclRefExpr>("ref")) { in check()
279 } else if (const auto *Using = Result.Nodes.getNodeAs<UsingDecl>("using")) { in check()
324 assert(Result.Nodes.getNodeAs<TypeAliasDecl>("test-case") != nullptr); in check()
/external/llvm-project/clang-tools-extra/clang-change-namespace/
DChangeNamespace.cpp526 if (const auto *Using = Result.Nodes.getNodeAs<UsingDecl>("using")) { in run()
529 Result.Nodes.getNodeAs<UsingDirectiveDecl>( in run()
533 Result.Nodes.getNodeAs<NamespaceAliasDecl>( in run()
537 Result.Nodes.getNodeAs<NamespaceDecl>("old_ns")) { in run()
540 Result.Nodes.getNodeAs<CXXRecordDecl>("class_fwd_decl")) { in run()
543 Result.Nodes.getNodeAs<ClassTemplateDecl>( in run()
547 Result.Nodes.getNodeAs<UsingDecl>("using_with_shadow")) { in run()
550 Result.Nodes.getNodeAs<NestedNameSpecifierLoc>( in run()
556 Result.Nodes.getNodeAs<CXXCtorInitializer>( in run()
560 } else if (const auto *TLoc = Result.Nodes.getNodeAs<TypeLoc>("type")) { in run()
[all …]

12345678910>>...14