Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit 169c91d

Browse files
author
George Karpenkov
committed
[analyzer] Switch the default exploration strategy to priority queue based on coverage
After the investigation it seems safe to flip the switch. Differential Revision: https://reviews.llvm.org/D43782 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326157 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent a58bc77 commit 169c91d

File tree

5 files changed

+4
-8
lines changed

5 files changed

+4
-8
lines changed

lib/StaticAnalyzer/Core/AnalyzerOptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ AnalyzerOptions::getExplorationStrategy() {
6060
if (ExplorationStrategy == ExplorationStrategyKind::NotSet) {
6161
StringRef StratStr =
6262
Config
63-
.insert(std::make_pair("exploration_strategy", "dfs"))
63+
.insert(std::make_pair("exploration_strategy", "unexplored_first_queue"))
6464
.first->second;
6565
ExplorationStrategy =
6666
llvm::StringSwitch<ExplorationStrategyKind>(StratStr)

test/Analysis/MisusedMovedObject.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,11 +475,7 @@ void differentBranchesTest(int i) {
475475
// A variation on the theme above.
476476
{
477477
A a;
478-
#ifdef DFS
479-
a.foo() > 0 ? a.foo() : A(std::move(a)).foo(); // expected-note {{Assuming the condition is false}} expected-note {{'?' condition is false}}
480-
#else
481478
a.foo() > 0 ? a.foo() : A(std::move(a)).foo(); // expected-note {{Assuming the condition is true}} expected-note {{'?' condition is true}}
482-
#endif
483479
}
484480
// Same thing, but with a switch statement.
485481
{

test/Analysis/analyzer-config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void foo() {
1717
// CHECK-NEXT: cfg-loopexit = false
1818
// CHECK-NEXT: cfg-rich-constructors = true
1919
// CHECK-NEXT: cfg-temporary-dtors = false
20-
// CHECK-NEXT: exploration_strategy = dfs
20+
// CHECK-NEXT: exploration_strategy = unexplored_first_queue
2121
// CHECK-NEXT: faux-bodies = true
2222
// CHECK-NEXT: graph-trim-interval = 1000
2323
// CHECK-NEXT: inline-lambdas = true

test/Analysis/analyzer-config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Foo {
3131
// CHECK-NEXT: cfg-loopexit = false
3232
// CHECK-NEXT: cfg-rich-constructors = true
3333
// CHECK-NEXT: cfg-temporary-dtors = false
34-
// CHECK-NEXT: exploration_strategy = dfs
34+
// CHECK-NEXT: exploration_strategy = unexplored_first_queue
3535
// CHECK-NEXT: faux-bodies = true
3636
// CHECK-NEXT: graph-trim-interval = 1000
3737
// CHECK-NEXT: inline-lambdas = true

test/Analysis/loop-unrolling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config unroll-loops=true,cfg-loopexit=true -verify -std=c++11 -analyzer-config exploration_strategy=unexplored_first_queue %s
1+
// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config unroll-loops=true,cfg-loopexit=true -verify -std=c++11 %s
22
// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config unroll-loops=true,cfg-loopexit=true,exploration_strategy=dfs -verify -std=c++11 -DDFS=1 %s
33

44
void clang_analyzer_numTimesReached();

0 commit comments

Comments
 (0)