Skip to content

Commit ba6a2ce

Browse files
committed
Correct docs and comments
1 parent d57946b commit ba6a2ce

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,11 @@ ANALYZER_OPTION(
421421
"perform 'analyzer-max-loop' (= 4 by default) iterations in a loop. "
422422
"Note that functions that _definitely_ reach the loop limit on some "
423423
"execution path are currently marked as \"do not inline\" even if this "
424-
"option is disabled (but this may change in future versions). This option "
425-
"is a dumb and arbitrary restriction on inlining, but disabling it would "
426-
"significantly increase the analysis workload (and the time taken) "
427-
"compared to older clang versions because more top-level functions can "
428-
"use up their 'max-nodes' limit if inlining is not restricted.",
424+
"option is disabled. This option is an arbitrary restriction on inlining, "
425+
"but disabling this significantly increases the analysis workload (and "
426+
"the time taken) compared to older clang versions because more top-level "
427+
"functions can use up their 'max-nodes' budget if inlining is not "
428+
"restricted.",
429429
true)
430430

431431
//===----------------------------------------------------------------------===//

clang/lib/StaticAnalyzer/Core/ExprEngine.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2586,12 +2586,12 @@ void ExprEngine::processCFGBlockEntrance(const BlockEdge &L,
25862586

25872587
if (const LocationContext *LC = getInlinedLocationContext(Pred, G)) {
25882588
// FIXME: This will unconditionally prevent inlining this function (even
2589-
// from other entrypoints), which is not a reasonable heuristic: even if
2589+
// from other entry points), which is not a reasonable heuristic: even if
25902590
// we reached max block count on this particular execution path, there
25912591
// may be other execution paths (especially with other parametrizations)
25922592
// where the analyzer can reach the end of the function (so there is no
25932593
// natural reason to avoid inlining it). However, disabling this would
2594-
// significantly increase the analysis time (because more entrypoints
2594+
// significantly increase the analysis time (because more entry points
25952595
// would exhaust their allocated budget), so it must be compensated by a
25962596
// different (more reasonable) reduction of analysis scope.
25972597
Engine.FunctionSummaries->markShouldNotInline(
@@ -2876,14 +2876,14 @@ void ExprEngine::processBranch(
28762876
if (!SkipTrueBranch || AMgr.options.ShouldWidenLoops) {
28772877
Builder.generateNode(StTrue, true, PredN);
28782878
} else if (AMgr.options.LegacyInliningPrevention) {
2879-
// FIXME: There is an ancient and very arbitrary heuristic in
2879+
// FIXME: There is an ancient and arbitrary heuristic in
28802880
// `ExprEngine::processCFGBlockEntrance` which prevents all further
28812881
// inlining of a function if it finds an execution path within that
28822882
// function which reaches the `MaxBlockVisitOnPath` limit (a/k/a
28832883
// `analyzer-max-loop`, by default four iterations in a loop). Adding
28842884
// this "don't assume third iteration" logic significantly increased
28852885
// the analysis runtime on some inputs because less functions were
2886-
// arbitrarily excluded from being inlined, so more entrypoints used
2886+
// arbitrarily excluded from being inlined, so more entry points used
28872887
// up their full allocated budget. As a hacky compensation for this,
28882888
// here we apply the "should not inline" mark in cases when the loop
28892889
// could potentially reach the `MaxBlockVisitOnPath` limit without the

0 commit comments

Comments
 (0)