[cfe-commits] r152440 - in /cfe/trunk: include/clang/Frontend/AnalyzerOptions.h include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h lib/Frontend/CompilerInvocation.cpp lib/StaticAnalyzer/Core/CoreEngine.cpp lib/StaticAnalyzer/Core/ExprEngine.cpp lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
Jordan Rose
jediknil at belkadan.com
Fri Mar 9 13:50:56 PST 2012
On Mar 9, 2012, at 13:14, Anna Zaks wrote:
> Author: zaks
> Date: Fri Mar 9 15:14:01 2012
> New Revision: 152440
>
> URL: http://llvm.org/viewvc/llvm-project?rev=152440&view=rev
> Log:
> [analyzer] Add support for NoRedundancy inlining mode.
>
> We do not reanalyze a function, which has already been analyzed as an
> inlined callee. As per PRELIMINARY testing, this gives over
> 50% run time reduction on some benchmarks without decreasing of the
> number of bugs found.
I might be missing something, but isn't this straight-up incorrect? Example:
void doSomethingStupid(bool shouldCrash);
void analyzeMeFirst() {
doSomethingStupid(false);
}
void doSomethingStupid(bool shouldCrash) {
if (!shouldCrash) return;
void *p;
free(p); // this branch is pruned when doSomethingStupid is inlined
}
(Even if this particular example works, I feel like there's a similar problem here somewhere.)
More information about the cfe-commits
mailing list