aboutsummaryrefslogtreecommitdiff
path: root/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2013-12-21 02:33:43 +0000
committerRichard Trieu <rtrieu@google.com>2013-12-21 02:33:43 +0000
commit2f024f432d62a6a7c3a9dac016f69babd31d6788 (patch)
tree444c956a089120980d9f2a18c2f8c177b48ce35d /clang/examples/PrintFunctionNames/PrintFunctionNames.cpp
parent38b8c938e8b75333d1efa47e4128bed3cd569110 (diff)
downloadllvm-2f024f432d62a6a7c3a9dac016f69babd31d6788.zip
llvm-2f024f432d62a6a7c3a9dac016f69babd31d6788.tar.gz
llvm-2f024f432d62a6a7c3a9dac016f69babd31d6788.tar.bz2
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. llvm-svn: 197853
Diffstat (limited to 'clang/examples/PrintFunctionNames/PrintFunctionNames.cpp')
0 files changed, 0 insertions, 0 deletions