| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/cppcoreguidelines/ |
| H A D | OwningMemoryCheck.cpp | 170 const auto &Nodes = Result.Nodes; in check() local 173 CheckExecuted |= handleDeletion(Nodes); in check() 174 CheckExecuted |= handleLegacyConsumers(Nodes); in check() 175 CheckExecuted |= handleExpectedOwner(Nodes); in check() 176 CheckExecuted |= handleAssignmentAndInit(Nodes); in check() 177 CheckExecuted |= handleAssignmentFromNewOwner(Nodes); in check() 178 CheckExecuted |= handleReturnValues(Nodes); in check() 179 CheckExecuted |= handleOwnerMembers(Nodes); in check() 190 Nodes.getNodeAs<DeclRefExpr>("deleted_variable"); in handleDeletion() 244 Nodes.getNodeAs<BinaryOperator>("owner_assignment"); in handleAssignmentAndInit() [all …]
|
| H A D | OwningMemoryCheck.h | 44 bool handleDeletion(const ast_matchers::BoundNodes &Nodes); 45 bool handleLegacyConsumers(const ast_matchers::BoundNodes &Nodes); 46 bool handleExpectedOwner(const ast_matchers::BoundNodes &Nodes); 47 bool handleAssignmentAndInit(const ast_matchers::BoundNodes &Nodes); 48 bool handleAssignmentFromNewOwner(const ast_matchers::BoundNodes &Nodes); 49 bool handleReturnValues(const ast_matchers::BoundNodes &Nodes); 50 bool handleOwnerMembers(const ast_matchers::BoundNodes &Nodes);
|
| /llvm-project-15.0.7/bolt/include/bolt/Passes/ |
| H A D | CallGraph.h | 105 assert(Id < Nodes.size()); in getNode() 106 return Nodes[Id]; in getNode() 109 assert(Id < Nodes.size()); in size() 110 return Nodes[Id].Size; in size() 113 assert(Id < Nodes.size()); in samples() 114 return Nodes[Id].Samples; in samples() 118 return Nodes[Id].Succs; in successors() 122 return Nodes[Id].Preds; in predecessors() 142 return double(Arcs.size()) / (Nodes.size() * Nodes.size()); in density() 159 std::vector<Node> Nodes; variable [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/ADT/ |
| H A D | DirectedGraph.h | 184 DirectedGraph(const DGraphType &G) : Nodes(G.Nodes) {} in DirectedGraph() 185 DirectedGraph(DGraphType &&RHS) : Nodes(std::move(RHS.Nodes)) {} in DirectedGraph() 187 Nodes = G.Nodes; 191 Nodes = std::move(G.Nodes); 208 return llvm::find_if(Nodes, in findNode() 220 Nodes.push_back(&N); in addNode() 229 for (auto *Node : Nodes) { in findIncomingEdgesToNode() 245 if (IT == Nodes.end()) in removeNode() 249 for (auto *Node : Nodes) { in removeNode() 258 Nodes.erase(IT); in removeNode() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Transforms/Utils/ |
| H A D | SampleProfileInference.cpp | 227 for (auto &Node : Nodes) { in findAugmentingPath() 258 if (Nodes[Src].Distance > Nodes[Target].Distance) in findAugmentingPath() 319 for (auto &Node : Nodes) { in findAugmentingDAG() 381 if (Edge.OnShortestPath && Nodes[Src].Taken && Nodes[Dst].Taken && in findAugmentingDAG() 382 Nodes[Dst].Finish < Nodes[Src].Finish) { in findAugmentingDAG() 400 Nodes[Src].FracFlow = 0; in augmentFlowAlongDAG() 401 Nodes[Src].IntFlow = 0; in augmentFlowAlongDAG() 500 if (Nodes[Src].Distance > Nodes[Target].Distance) in identifyShortestEdges() 507 Nodes[Dst].Distance <= Nodes[Target].Distance && in identifyShortestEdges() 508 Nodes[Dst].Distance == Nodes[Src].Distance + Edge.Cost && in identifyShortestEdges() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/ |
| H A D | SizeofExpressionCheck.cpp | 273 if (const auto *E = Result.Nodes.getNodeAs<Expr>("sizeof-constant")) { in check() 277 Result.Nodes.getNodeAs<Expr>("sizeof-integer-call")) { in check() 295 Result.Nodes.getNodeAs<Expr>("sizeof-comma-expr")) { in check() 298 Result.Nodes.getNodeAs<Expr>("sizeof-divide-expr")) { in check() 299 const auto *NumTy = Result.Nodes.getNodeAs<Type>("num-type"); in check() 300 const auto *DenomTy = Result.Nodes.getNodeAs<Type>("denom-type"); in check() 301 const auto *ElementTy = Result.Nodes.getNodeAs<Type>("elem-type"); in check() 329 Result.Nodes.getNodeAs<Expr>("sizeof-sizeof-expr")) { in check() 336 const auto *LPtrTy = Result.Nodes.getNodeAs<Type>("left-ptr-type"); in check() 337 const auto *RPtrTy = Result.Nodes.getNodeAs<Type>("right-ptr-type"); in check() [all …]
|
| H A D | NotNullTerminatedResultCheck.cpp | 50 Result.Nodes.getNodeAs<VariableArrayType>(DestArrayTyName)) in getDestCapacityExpr() 106 Result.Nodes.getNodeAs<CallExpr>(WrongLengthExprName)) in getStrlenExpr() 119 if (Result.Nodes.getNodeAs<Expr>(UnknownLengthName)) in getGivenLength() 170 return !Result.Nodes.getNodeAs<Expr>(UnknownDestName); in isKnownDest() 198 Result.Nodes.getNodeAs<CXXMemberCallExpr>(DestExprName); in isStringDataAndLength() 201 Result.Nodes.getNodeAs<CXXMemberCallExpr>(WrongLengthExprName); in isStringDataAndLength() 222 if (Result.Nodes.getNodeAs<Expr>(UnknownLengthName)) in isGivenLengthEqualToSrcLength() 249 if (Result.Nodes.getNodeAs<Expr>(UnknownLengthName)) in isCorrectGivenLength() 280 if (Result.Nodes.getNodeAs<IntegerLiteral>(WrongLengthExprName)) in isFixedGivenLengthAndUnknownSrc() 383 const auto *Dest = Result.Nodes.getNodeAs<Expr>(DestExprName); in isDestExprFix() [all …]
|
| H A D | StringConstructorCheck.cpp | 145 const auto *E = Result.Nodes.getNodeAs<CXXConstructExpr>("constructor"); in check() 149 if (Result.Nodes.getNodeAs<Expr>("swapped-parameter")) { in check() 156 } else if (Result.Nodes.getNodeAs<Expr>("empty-string")) { in check() 158 } else if (Result.Nodes.getNodeAs<Expr>("negative-length")) { in check() 160 } else if (Result.Nodes.getNodeAs<Expr>("large-length")) { in check() 163 } else if (Result.Nodes.getNodeAs<Expr>("literal-with-length")) { in check() 164 const auto *Str = Result.Nodes.getNodeAs<StringLiteral>("str"); in check() 165 const auto *Lit = Result.Nodes.getNodeAs<IntegerLiteral>("int"); in check() 169 } else if (const auto *Ptr = Result.Nodes.getNodeAs<Expr>("from-ptr")) { in check() 176 Result.Nodes.getNodeAs<CXXRecordDecl>("basic_string_view_decl")) { in check()
|
| H A D | SuspiciousStringCompareCheck.cpp | 164 const auto *Decl = Result.Nodes.getNodeAs<FunctionDecl>("decl"); in check() 165 const auto *Call = Result.Nodes.getNodeAs<CallExpr>("call"); in check() 168 if (Result.Nodes.getNodeAs<Stmt>("missing-comparison")) { in check() 178 if (const auto *E = Result.Nodes.getNodeAs<Expr>("logical-not-comparison")) { in check() 192 if (Result.Nodes.getNodeAs<Stmt>("invalid-comparison")) { in check() 199 Result.Nodes.getNodeAs<BinaryOperator>("suspicious-operator")) { in check() 204 if (Result.Nodes.getNodeAs<Stmt>("invalid-conversion")) { in check()
|
| H A D | RedundantBranchConditionCheck.cpp | 76 const auto *OuterIf = Result.Nodes.getNodeAs<IfStmt>(OuterIfStr); in check() 77 const auto *InnerIf = Result.Nodes.getNodeAs<IfStmt>(InnerIfStr); in check() 78 const auto *CondVar = Result.Nodes.getNodeAs<VarDecl>(CondVarStr); in check() 79 const auto *Func = Result.Nodes.getNodeAs<FunctionDecl>(FuncStr); in check() 82 if (const auto *Inner = Result.Nodes.getNodeAs<DeclRefExpr>(InnerIfVar1Str)) in check() 85 InnerIfVar = Result.Nodes.getNodeAs<DeclRefExpr>(InnerIfVar2Str); in check() 86 if (const auto *Outer = Result.Nodes.getNodeAs<DeclRefExpr>(OuterIfVar1Str)) in check() 89 OuterIfVar = Result.Nodes.getNodeAs<DeclRefExpr>(OuterIfVar2Str); in check()
|
| /llvm-project-15.0.7/llvm/test/Transforms/Inline/ML/ |
| H A D | enable-inline-advisor-printing-ml.ll | 26 ; CHECK: [MLInlineAdvisor] Nodes: 28 ; CHECK: [MLInlineAdvisor] Nodes: 30 ; CHECK: [MLInlineAdvisor] Nodes: 32 ; CHECK: [MLInlineAdvisor] Nodes: 34 ; CHECK-NOT: [MLInlineAdvisor] Nodes: 36 ; TWO: [MLInlineAdvisor] Nodes: 38 ; TWO: [MLInlineAdvisor] Nodes: 40 ; TWO-NOT: [MLInlineAdvisor] Nodes:
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | IntervalMap.cpp | 120 IdxPair distribute(unsigned Nodes, unsigned Elements, unsigned Capacity, in distribute() argument 123 assert(Elements + Grow <= Nodes * Capacity && "Not enough room for elements"); in distribute() 125 if (!Nodes) in distribute() 129 const unsigned PerNode = (Elements + Grow) / Nodes; in distribute() 130 const unsigned Extra = (Elements + Grow) % Nodes; in distribute() 131 IdxPair PosPair = IdxPair(Nodes, 0); in distribute() 133 for (unsigned n = 0; n != Nodes; ++n) { in distribute() 135 if (PosPair.first == Nodes && Sum > Position) in distribute() 142 assert(PosPair.first < Nodes && "Bad algebra"); in distribute() 149 for (unsigned n = 0; n != Nodes; ++n) { in distribute()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/ |
| H A D | StringCompareCheck.cpp | 51 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()
|
| H A D | ContainerSizeEmptyCheck.cpp | 81 Builder->removeBindings([ExprName](const BoundNodesMap &Nodes) { in AST_MATCHER() argument 82 return Nodes.getNode(ExprName).getNodeKind().isNone(); in AST_MATCHER() 177 const auto *MemberCall = Result.Nodes.getNodeAs<Expr>("SizeCallExpr"); in check() 179 Result.Nodes.getNodeAs<Expr>("MemberCallObject"); in check() 180 const auto *BinCmp = Result.Nodes.getNodeAs<CXXOperatorCallExpr>("BinCmp"); in check() 183 Result.Nodes.getNodeAs<CXXRewrittenBinaryOperator>("BinCmp"); in check() 185 const auto *Pointee = Result.Nodes.getNodeAs<Expr>("Pointee"); in check() 189 : (Pointee ? Pointee : Result.Nodes.getNodeAs<Expr>("STLObject")); in check() 288 Result.Nodes.getNodeAs<UnaryOperator>("NegOnSize")) in check() 313 const auto *Container = Result.Nodes.getNodeAs<NamedDecl>("container"); in check() [all …]
|
| H A D | RedundantSmartptrGetCheck.cpp | 125 if (Result.Nodes.getNodeAs<Decl>("duck_typing") == nullptr) in allReturnTypesMatch() 132 Result.Nodes.getNodeAs<Type>("op->Type")->getUnqualifiedDesugaredType(); in allReturnTypesMatch() 134 Result.Nodes.getNodeAs<Type>("op*Type")->getUnqualifiedDesugaredType(); in allReturnTypesMatch() 136 Result.Nodes.getNodeAs<Type>("getType")->getUnqualifiedDesugaredType(); in allReturnTypesMatch() 145 bool IsPtrToPtr = Result.Nodes.getNodeAs<Decl>("ptr_to_ptr") != nullptr; in check() 146 bool IsMemberExpr = Result.Nodes.getNodeAs<Expr>("memberExpr") != nullptr; in check() 147 const auto *GetCall = Result.Nodes.getNodeAs<Expr>("redundant_get"); in check() 151 const auto *Smartptr = Result.Nodes.getNodeAs<Expr>("smart_pointer"); in check()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/llvm/ |
| H A D | PreferIsaOrDynCastInConditionalsCheck.cpp | 72 if (const auto *MatchedDecl = Result.Nodes.getNodeAs<CallExpr>("assign")) { in check() 82 Result.Nodes.getNodeAs<CallExpr>("call")) { in check() 89 if (Result.Nodes.getNodeAs<NamedDecl>("dyn_cast")) in check() 95 Result.Nodes.getNodeAs<BinaryOperator>("and")) { in check() 96 const auto *LHS = Result.Nodes.getNodeAs<ImplicitCastExpr>("lhs"); in check() 97 const auto *RHS = Result.Nodes.getNodeAs<CallExpr>("rhs"); in check() 98 const auto *Arg = Result.Nodes.getNodeAs<Expr>("arg"); in check() 99 const auto *Func = Result.Nodes.getNodeAs<NamedDecl>("func"); in check()
|
| /llvm-project-15.0.7/llvm/include/llvm/Analysis/ |
| H A D | CallGraphSCCPass.h | 90 std::vector<CallGraphNode *> Nodes; variable 96 Nodes.assign(NewNodes.begin(), NewNodes.end()); in initialize() 99 bool isSingular() const { return Nodes.size() == 1; } in isSingular() 100 unsigned size() const { return Nodes.size(); } in size() 112 iterator begin() const { return Nodes.begin(); } in begin() 113 iterator end() const { return Nodes.end(); } in end()
|
| /llvm-project-15.0.7/clang/include/clang/AST/ |
| H A D | ASTImporter.h | 152 Nodes.push_back(D); in push() 157 if (Nodes.empty()) in pop() 159 --Aux[Nodes.back()]; in pop() 160 Nodes.pop_back(); in pop() 165 auto Pos = Aux.find(Nodes.back()); in hasCycleAtBack() 171 assert(Nodes.size() >= 2); in getCycleAtBack() 172 return Cycle(Nodes.rbegin(), in getCycleAtBack() 173 std::find(Nodes.rbegin() + 1, Nodes.rend(), Nodes.back()) + in getCycleAtBack() 185 VecTy Nodes;
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | NumberObjectConversionChecker.cpp | 66 (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 …]
|
| /llvm-project-15.0.7/clang/unittests/Tooling/ |
| H A D | SourceCodeBuildersTest.cpp | 90 EXPECT_EQ(Expected, Pred(*StmtMatch->Result.Nodes.getNodeAs<Expr>("expr"))) in testPredicate() 102 EXPECT_EQ(Expected, Pred(*StmtMatch->Result.Nodes.getNodeAs<Expr>("arg"))) in testPredicateOnArg() 152 isKnownPointerLikeType(*StmtMatch->Result.Nodes.getNodeAs<QualType>("ty"), in TEST() 163 isKnownPointerLikeType(*StmtMatch->Result.Nodes.getNodeAs<QualType>("ty"), in TEST() 195 EXPECT_THAT(Builder(*StmtMatch->Result.Nodes.getNodeAs<Expr>("expr"), in testBuilder() 204 EXPECT_THAT(buildAccess(*StmtMatch->Result.Nodes.getNodeAs<Expr>("expr"), in testBuildAccess() 258 EXPECT_THAT(buildAddressOf(*StmtMatch->Result.Nodes.getNodeAs<Expr>("expr"), in TEST() 383 EXPECT_THAT(buildAccess(*StmtMatch->Result.Nodes.getNodeAs<Expr>("expr"), in TEST() 398 EXPECT_THAT(buildAccess(*StmtMatch->Result.Nodes.getNodeAs<Expr>("expr"), in TEST() 416 EXPECT_THAT(buildAccess(*StmtMatch->Result.Nodes.getNodeAs<Expr>("expr"), in TEST() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/altera/ |
| H A D | IdDependentBackwardBranchCheck.cpp | 201 const auto *Variable = Result.Nodes.getNodeAs<VarDecl>("tid_dep_var"); in check() 202 const auto *Field = Result.Nodes.getNodeAs<FieldDecl>("tid_dep_field"); in check() 203 const auto *Statement = Result.Nodes.getNodeAs<Stmt>("straight_assignment"); in check() 204 const auto *RefExpr = Result.Nodes.getNodeAs<DeclRefExpr>("assign_ref_var"); in check() 205 const auto *MemExpr = Result.Nodes.getNodeAs<MemberExpr>("assign_ref_field"); in check() 206 const auto *PotentialVar = Result.Nodes.getNodeAs<VarDecl>("pot_tid_var"); in check() 208 Result.Nodes.getNodeAs<FieldDecl>("pot_tid_field"); in check() 228 const auto *CondExpr = Result.Nodes.getNodeAs<Expr>("cond_expr"); in check() 229 const auto *IDCall = Result.Nodes.getNodeAs<CallExpr>("id_call"); in check() 230 const auto *Loop = Result.Nodes.getNodeAs<Stmt>("backward_branch"); in check()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/ |
| H A D | LoopConvertCheck.cpp | 748 const auto *InitVar = Nodes.getNodeAs<VarDecl>(InitVarName); in getIteratorLoopQualifiers() 751 Nodes.getNodeAs<QualType>(DerefByValueResultName); in getIteratorLoopQualifiers() 761 Nodes.getNodeAs<QualType>(DerefByRefResultName)) { in getIteratorLoopQualifiers() 793 getIteratorLoopQualifiers(Context, Nodes, Descriptor); in determineRangeDescriptor() 813 const auto *InitVar = Nodes.getNodeAs<VarDecl>(InitVarName); in isConvertible() 843 const BoundNodes &Nodes = Result.Nodes; in check() local 851 if ((Loop = Nodes.getNodeAs<ForStmt>(LoopNameArray))) { in check() 858 Loop = Nodes.getNodeAs<ForStmt>(LoopNamePseudoArray); in check() 863 if (!isConvertible(Context, Nodes, Loop, FixerKind)) in check() 866 const auto *LoopVar = Nodes.getNodeAs<VarDecl>(InitVarName); in check() [all …]
|
| /llvm-project-15.0.7/clang/include/clang/ASTMatchers/ |
| H A D | ASTMatchFinder.h | 75 MatchResult(const BoundNodes &Nodes, clang::ASTContext *Context); 80 const BoundNodes Nodes; member 289 Nodes.push_back(Result.Nodes); in run() 296 SmallVector<BoundNodes, 1> Nodes; variable 307 return std::move(Callback.Nodes); in match() 323 return std::move(Callback.Nodes); in match() 333 return std::move(Callback.Nodes); in matchDynamic() 349 return std::move(Callback.Nodes); in matchDynamic()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/android/ |
| H A D | CloexecCheck.cpp | 55 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()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/performance/ |
| H A D | InefficientVectorOperationCheck.cpp | 190 Result.Nodes.getNodeAs<VarDecl>(VectorVarDeclName); in check() 191 const auto *ForLoop = Result.Nodes.getNodeAs<ForStmt>(LoopCounterName); in check() 193 Result.Nodes.getNodeAs<CXXForRangeStmt>(RangeLoopName); in check() 195 Result.Nodes.getNodeAs<CXXMemberCallExpr>(PushBackOrEmplaceBackCallName); in check() 196 const auto *ProtoVarDecl = Result.Nodes.getNodeAs<VarDecl>(ProtoVarDeclName); in check() 198 Result.Nodes.getNodeAs<CXXMemberCallExpr>(ProtoAddFieldCallName); in check() 199 const auto *LoopEndExpr = Result.Nodes.getNodeAs<Expr>(LoopEndExprName); in check() 200 const auto *LoopParent = Result.Nodes.getNodeAs<CompoundStmt>(LoopParentName); in check()
|