From da8a79ac8d25860f200079bbc2cbf4f199dfe5ab Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 18 Oct 2010 23:36:05 +0000 Subject: "Fix" bogus idempotent operations warning due to loop unrolling not unrolling enough loops to show that an invariant doesn't hold. This fix is to increase the loop unrolling count to 4, which experiments show doesn't typically impact analysis time. The real fix is to modify the IdempotentOperationsChecker to suppress warnings where an analysis point could be preceded by a point where we gave up due to loop unrolling. llvm-svn: 116769 --- clang/lib/Frontend/CompilerInvocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index fd9b6359972..70bdd5b99cb 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -830,7 +830,7 @@ static void ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, Args.hasArg(OPT_analyzer_experimental_internal_checks); Opts.TrimGraph = Args.hasArg(OPT_trim_egraph); Opts.MaxNodes = Args.getLastArgIntValue(OPT_analyzer_max_nodes, 150000,Diags); - Opts.MaxLoop = Args.getLastArgIntValue(OPT_analyzer_max_loop, 3, Diags); + Opts.MaxLoop = Args.getLastArgIntValue(OPT_analyzer_max_loop, 4, Diags); Opts.InlineCall = Args.hasArg(OPT_analyzer_inline_call); Opts.IdempotentOps = Args.hasArg(OPT_analysis_WarnIdempotentOps); } -- cgit v1.2.3