summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-infinite-recursion.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Improve -Winfinite-recursionRobert Widmann2018-03-221-2/+14
| | | | | | | | | | | | | | Summary: Rewrites -Winfinite-recursion to remove the state dictionary and explore paths in loops - especially infinite loops. The new check now detects recursion in loop bodies dominated by a recursive call. Reviewers: rsmith, rtrieu Reviewed By: rtrieu Subscribers: lebedev.ri, cfe-commits Differential Revision: https://reviews.llvm.org/D43737 llvm-svn: 328173
* Ignore qualified templated functions for -Winfinite-recursion. This treatsRichard Trieu2014-01-041-0/+23
| | | | | | functions like Foo<5>::run() the same way as run<5>() for this warning. llvm-svn: 198470
* Add -Winfinite-recursion to ClangRichard Trieu2013-12-211-0/+129
This new warning detects when a function will recursively call itself on every code path though that function. This catches simple recursive cases such as: void foo() { foo(); } As well as more complex functions like: void bar() { if (test()) { bar(); return; } else { bar(); } return; } This warning uses the CFG. As with other CFG-based warnings, this is off by default. Due to false positives, this warning is also disabled for templated functions. llvm-svn: 197853
OpenPOWER on IntegriCloud