]> granicus.if.org Git - clang/commit
Fix a few things with -Winfinite-recursion. NFC
authorRichard Trieu <rtrieu@google.com>
Fri, 21 Aug 2015 03:43:09 +0000 (03:43 +0000)
committerRichard Trieu <rtrieu@google.com>
Fri, 21 Aug 2015 03:43:09 +0000 (03:43 +0000)
commit772a90ee5096e15998ff90025b87c5ca4ab796d5
tree95328d22682cf86cb86d1a4e5001c673f3f3c3a4
parent298fde465765d930b8bcd588c613343a1c7805b3
Fix a few things with -Winfinite-recursion.  NFC

Now that -Winfinite-recursion no longer uses recursive calls to before path
analysis, several bits of the code can be improved.  The main changes:

1) Early return when finding a path to the exit block without a recursive call
2) Moving the states vector into checkForRecursiveFunctionCall instead of
   passing it in by reference
3) Change checkForRecursiveFunctionCall to return a bool when the warning
   should be emitted.
4) Use the State vector instead of storing it in the Stack vector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245666 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/AnalysisBasedWarnings.cpp