Index: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def =================================================================== --- clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def +++ clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def @@ -294,7 +294,7 @@ ANALYZER_OPTION(bool, ShouldTrackConditions, "track-conditions", "Whether to track conditions that are a control dependency of " "an already tracked variable.", - false) + true) ANALYZER_OPTION(bool, ShouldTrackConditionsDebug, "track-conditions-debug", "Whether to place an event at each tracked condition.", Index: clang/test/Analysis/analyzer-config.c =================================================================== --- clang/test/Analysis/analyzer-config.c +++ clang/test/Analysis/analyzer-config.c @@ -86,7 +86,7 @@ // CHECK-NEXT: suppress-c++-stdlib = true // CHECK-NEXT: suppress-inlined-defensive-checks = true // CHECK-NEXT: suppress-null-return-paths = true -// CHECK-NEXT: track-conditions = false +// CHECK-NEXT: track-conditions = true // CHECK-NEXT: track-conditions-debug = false // CHECK-NEXT: unix.DynamicMemoryModeling:Optimistic = false // CHECK-NEXT: unroll-loops = false Index: clang/test/Analysis/diagnostics/no-store-func-path-notes.m =================================================================== --- clang/test/Analysis/diagnostics/no-store-func-path-notes.m +++ clang/test/Analysis/diagnostics/no-store-func-path-notes.m @@ -16,6 +16,7 @@ return 0; } return 1; // expected-note{{Returning without writing to '*var'}} + // expected-note@-1{{Returning the value 1, which will be (a part of a) condition}} } @end Index: clang/test/Analysis/return-value-guaranteed.cpp =================================================================== --- clang/test/Analysis/return-value-guaranteed.cpp +++ clang/test/Analysis/return-value-guaranteed.cpp @@ -24,6 +24,7 @@ // class-note@-1 {{The value 0 is assigned to 'F.Field'}} return !MCAsmParser::Error(); // class-note@-1 {{'MCAsmParser::Error' returns true}} + // class-note@-2 {{Returning zero, which will be (a part of a) condition}} } bool parseFile() { @@ -57,6 +58,7 @@ struct MCAsmParser { static bool Error() { return false; // class-note {{'MCAsmParser::Error' returns false}} + // class-note@-1 {{Returning zero, which will be (a part of a) condition}} } }; @@ -72,6 +74,7 @@ return MCAsmParser::Error(); // class-note@-1 {{Calling 'MCAsmParser::Error'}} // class-note@-2 {{Returning from 'MCAsmParser::Error'}} + // class-note@-3 {{Returning zero, which will be (a part of a) condition}} } bool parseFile() { Index: clang/test/Analysis/track-control-dependency-conditions.cpp =================================================================== --- clang/test/Analysis/track-control-dependency-conditions.cpp +++ clang/test/Analysis/track-control-dependency-conditions.cpp @@ -6,6 +6,7 @@ // RUN: not %clang_analyze_cc1 -verify %s \ // RUN: -analyzer-checker=core \ +// RUN: -analyzer-config track-conditions=false \ // RUN: -analyzer-config track-conditions-debug=true \ // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID-DEBUG @@ -22,6 +23,7 @@ // RUN: %clang_analyze_cc1 %s -verify \ // RUN: -analyzer-output=text \ +// RUN: -analyzer-config track-conditions=false \ // RUN: -analyzer-checker=core namespace example_1 {