diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp b/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp index 0d7667c..035598d 100644 --- a/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp @@ -151,10 +151,12 @@ constexpr unsigned SmallSCCSize = 32; using CallStackTy = llvm::SmallVector<CallGraphNode::CallRecord, SmallCallStackSize>; +} // namespace + // In given SCC, find *some* call stack that will be cyclic. // This will only find *one* such stack, it might not be the smallest one, // and there may be other loops. -CallStackTy pathfindSomeCycle(ArrayRef<CallGraphNode *> SCC) { +static CallStackTy pathfindSomeCycle(ArrayRef<CallGraphNode *> SCC) { // We'll need to be able to performantly look up whether some CallGraphNode // is in SCC or not, so cache all the SCC elements in a set. const ImmutableSmallSet<CallGraphNode *, SmallSCCSize> SCCElts(SCC); @@ -190,8 +192,6 @@ CallStackTy pathfindSomeCycle(ArrayRef<CallGraphNode *> SCC) { return CallStack; } -} // namespace - void NoRecursionCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher(translationUnitDecl().bind("TUDecl"), this); } |