diff options
| author | Richard Trieu <rtrieu@google.com> | 2013-12-21 02:33:43 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2013-12-21 02:33:43 +0000 |
| commit | 7510c83c6e5bfdfee9a4740be8471efd75520617 (patch) | |
| tree | 01b37d2d5f5a52ca9fb61b84358ed50ec4b5d648 /examples/PrintFunctionNames/PrintFunctionNames.cpp | |
| parent | 4ba94238989e21a8cce1aea03662c8d82267f81c (diff) | |
| download | clang-7510c83c6e5bfdfee9a4740be8471efd75520617.tar.gz clang-7510c83c6e5bfdfee9a4740be8471efd75520617.tar.bz2 clang-7510c83c6e5bfdfee9a4740be8471efd75520617.tar.xz | |
Add -Winfinite-recursion to Clang
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples/PrintFunctionNames/PrintFunctionNames.cpp')
0 files changed, 0 insertions, 0 deletions
