Index: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp =================================================================== --- lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -2049,8 +2049,7 @@ } if (const auto *DRE = dyn_cast(Ex)) { - const bool IsVarDecl = isa(DRE->getDecl()); - if (IsVarDecl) { + if (isa(DRE->getDecl())) { const LocationContext *LCtx = N->getLocationContext(); const ProgramState *state = N->getState().get(); if (const MemRegion *R = state->getLValue(cast(DRE->getDecl()), @@ -2066,7 +2065,7 @@ } } Out << '\'' << DRE->getDecl()->getDeclName() << '\''; - return IsVarDecl; + return true; } if (const auto *IL = dyn_cast(Ex)) { @@ -2097,6 +2096,7 @@ CharSourceRange::getTokenRange(Ex->getSourceRange()), BRC.getSourceManager(), BRC.getASTContext().getLangOpts(), 0) << '\''; + return true; } return false; @@ -2107,6 +2107,7 @@ const bool tookTrue, BugReporterContext &BRC, BugReport &R, const ExplodedNode *N) { bool shouldInvert = false; + bool isVarLHS, isVarRHS; Optional shouldPrune; // Check if the field name of the MemberExprs is ambiguous. Example: @@ -2122,10 +2123,10 @@ SmallString<128> LhsString, RhsString; { llvm::raw_svector_ostream OutLHS(LhsString), OutRHS(RhsString); - const bool isVarLHS = patternMatch(BExpr->getLHS(), BExpr, OutLHS, BRC, R, - N, shouldPrune, IsSameFieldName); - const bool isVarRHS = patternMatch(BExpr->getRHS(), BExpr, OutRHS, BRC, R, - N, shouldPrune, IsSameFieldName); + isVarLHS = patternMatch(BExpr->getLHS(), BExpr, OutLHS, BRC, R, N, + shouldPrune, IsSameFieldName); + isVarRHS = patternMatch(BExpr->getRHS(), BExpr, OutRHS, BRC, R, N, + shouldPrune, IsSameFieldName); shouldInvert = !isVarLHS && isVarRHS; } @@ -2171,14 +2172,15 @@ case BO_GE: Op = BO_LT; break; default: return nullptr; - } + } + const bool IsBothVariable = isVarLHS && isVarRHS; switch (Op) { case BO_EQ: - Out << "equal to "; + Out << (IsBothVariable ? "equal to " : ""); break; case BO_NE: - Out << "not equal to "; + Out << (IsBothVariable ? "not equal to" : "not "); break; default: Out << BinaryOperator::getOpcodeStr(Op) << ' '; @@ -2307,7 +2309,7 @@ if (Ty->isBooleanType()) Out << (TookTrue ? "'true'" : "'false'"); else - Out << (TookTrue ? "not equal to '0'" : "'0'"); + Out << (TookTrue ? "not '0'" : "'0'"); } else { if (Ty->isBooleanType()) Out << (IntValue.getValue()->getBoolValue() ? "'true'" : "'false'"); Index: test/Analysis/Inputs/expected-plists/conditional-path-notes.c.plist =================================================================== --- test/Analysis/Inputs/expected-plists/conditional-path-notes.c.plist +++ test/Analysis/Inputs/expected-plists/conditional-path-notes.c.plist @@ -1195,9 +1195,9 @@ depth0 extended_message - Assuming 'a' is not equal to '0' + Assuming 'a' is not '0' message - Assuming 'a' is not equal to '0' + Assuming 'a' is not '0' kindcontrol @@ -1384,9 +1384,9 @@ depth0 extended_message - Assuming 'a' is not equal to '0' + Assuming 'a' is not '0' message - Assuming 'a' is not equal to '0' + Assuming 'a' is not '0' kindcontrol @@ -1447,9 +1447,9 @@ depth0 extended_message - Assuming 'b' is not equal to '0' + Assuming 'b' is not '0' message - Assuming 'b' is not equal to '0' + Assuming 'b' is not '0' kindcontrol Index: test/Analysis/Inputs/expected-plists/cxx-for-range.cpp.plist =================================================================== --- test/Analysis/Inputs/expected-plists/cxx-for-range.cpp.plist +++ test/Analysis/Inputs/expected-plists/cxx-for-range.cpp.plist @@ -199,9 +199,9 @@ depth0 extended_message - 'y' is not equal to '2' + 'y' is not '2' message - 'y' is not equal to '2' + 'y' is not '2' kindcontrol @@ -524,9 +524,9 @@ depth0 extended_message - 'y' is equal to '2' + 'y' is '2' message - 'y' is equal to '2' + 'y' is '2' kindcontrol @@ -1120,9 +1120,9 @@ depth0 extended_message - Assuming 'y' is equal to '2' + Assuming 'y' is '2' message - Assuming 'y' is equal to '2' + Assuming 'y' is '2' kindcontrol @@ -1570,9 +1570,9 @@ depth0 extended_message - Assuming 'y' is equal to '2' + Assuming 'y' is '2' message - Assuming 'y' is equal to '2' + Assuming 'y' is '2' kindcontrol Index: test/Analysis/Inputs/expected-plists/edges-new.mm.plist =================================================================== --- test/Analysis/Inputs/expected-plists/edges-new.mm.plist +++ test/Analysis/Inputs/expected-plists/edges-new.mm.plist @@ -1298,9 +1298,9 @@ depth0 extended_message - Assuming 'a' is not equal to '0' + Assuming 'a' is not '0' message - Assuming 'a' is not equal to '0' + Assuming 'a' is not '0' kindcontrol @@ -1395,9 +1395,9 @@ depth0 extended_message - Assuming 'b' is equal to '0' + Assuming 'b' is '0' message - Assuming 'b' is equal to '0' + Assuming 'b' is '0' kindcontrol @@ -2734,9 +2734,9 @@ depth0 extended_message - 'i' is not equal to '1' + 'i' is not '1' message - 'i' is not equal to '1' + 'i' is not '1' kindcontrol @@ -2957,9 +2957,9 @@ depth0 extended_message - 'i' is equal to '1' + 'i' is '1' message - 'i' is equal to '1' + 'i' is '1' kindcontrol @@ -3938,9 +3938,9 @@ depth0 extended_message - 'i' is equal to '0' + 'i' is '0' message - 'i' is equal to '0' + 'i' is '0' kindcontrol @@ -4195,9 +4195,9 @@ depth0 extended_message - 'i' is not equal to '0' + 'i' is not '0' message - 'i' is not equal to '0' + 'i' is not '0' kindcontrol @@ -4292,9 +4292,9 @@ depth0 extended_message - 'i' is equal to '1' + 'i' is '1' message - 'i' is equal to '1' + 'i' is '1' kindcontrol @@ -7626,9 +7626,9 @@ depth0 extended_message - Assuming 'coin' is not equal to '0' + Assuming 'coin' is not '0' message - Assuming 'coin' is not equal to '0' + Assuming 'coin' is not '0' kindcontrol @@ -8828,9 +8828,9 @@ depth0 extended_message - Assuming 'x' is not equal to '0' + Assuming 'x' is not '0' message - Assuming 'x' is not equal to '0' + Assuming 'x' is not '0' kindcontrol @@ -10954,9 +10954,9 @@ depth0 extended_message - Assuming 'coin' is not equal to '0' + Assuming 'coin' is not '0' message - Assuming 'coin' is not equal to '0' + Assuming 'coin' is not '0' kindcontrol @@ -22284,9 +22284,9 @@ depth0 extended_message - Field 'b' is equal to '2' + Field 'b' is '2' message - Field 'b' is equal to '2' + Field 'b' is '2' kindcontrol Index: test/Analysis/Inputs/expected-plists/inline-plist.c.plist =================================================================== --- test/Analysis/Inputs/expected-plists/inline-plist.c.plist +++ test/Analysis/Inputs/expected-plists/inline-plist.c.plist @@ -102,9 +102,9 @@ depth0 extended_message - Assuming 'x' is equal to '0' + Assuming 'x' is '0' message - Assuming 'x' is equal to '0' + Assuming 'x' is '0' kindcontrol @@ -556,9 +556,9 @@ depth0 extended_message - 'p' is equal to 'null' + 'p' is 'null' message - 'p' is equal to 'null' + 'p' is 'null' kindcontrol Index: test/Analysis/Inputs/expected-plists/malloc-plist.c.plist =================================================================== --- test/Analysis/Inputs/expected-plists/malloc-plist.c.plist +++ test/Analysis/Inputs/expected-plists/malloc-plist.c.plist @@ -3738,9 +3738,9 @@ depth1 extended_message - Assuming 'y' is not equal to '0' + Assuming 'y' is not '0' message - Assuming 'y' is not equal to '0' + Assuming 'y' is not '0' kindcontrol Index: test/Analysis/Inputs/expected-plists/objc-radar17039661.m.plist =================================================================== --- test/Analysis/Inputs/expected-plists/objc-radar17039661.m.plist +++ test/Analysis/Inputs/expected-plists/objc-radar17039661.m.plist @@ -400,9 +400,9 @@ depth3 extended_message - Assuming 'cond' is not equal to '0' + Assuming 'cond' is not '0' message - Assuming 'cond' is not equal to '0' + Assuming 'cond' is not '0' kindcontrol @@ -1080,9 +1080,9 @@ depth3 extended_message - Assuming 'cond' is not equal to '0' + Assuming 'cond' is not '0' message - Assuming 'cond' is not equal to '0' + Assuming 'cond' is not '0' kindcontrol Index: test/Analysis/Inputs/expected-plists/plist-macros.cpp.plist =================================================================== --- test/Analysis/Inputs/expected-plists/plist-macros.cpp.plist +++ test/Analysis/Inputs/expected-plists/plist-macros.cpp.plist @@ -367,9 +367,9 @@ depth0 extended_message - Assuming 'p' is equal to 'null' + Assuming 'p' is 'null' message - Assuming 'p' is equal to 'null' + Assuming 'p' is 'null' kindcontrol @@ -947,9 +947,9 @@ depth0 extended_message - Assuming 'p' is equal to 'null' + Assuming 'p' is 'null' message - Assuming 'p' is equal to 'null' + Assuming 'p' is 'null' kindcontrol Index: test/Analysis/Inputs/expected-plists/plist-output.m.plist =================================================================== --- test/Analysis/Inputs/expected-plists/plist-output.m.plist +++ test/Analysis/Inputs/expected-plists/plist-output.m.plist @@ -1298,9 +1298,9 @@ depth0 extended_message - Assuming 'a' is not equal to '0' + Assuming 'a' is not '0' message - Assuming 'a' is not equal to '0' + Assuming 'a' is not '0' kindcontrol @@ -1395,9 +1395,9 @@ depth0 extended_message - Assuming 'b' is equal to '0' + Assuming 'b' is '0' message - Assuming 'b' is equal to '0' + Assuming 'b' is '0' kindcontrol @@ -2520,9 +2520,9 @@ depth0 extended_message - 'i' is not equal to '1' + 'i' is not '1' message - 'i' is not equal to '1' + 'i' is not '1' kindcontrol @@ -2743,9 +2743,9 @@ depth0 extended_message - 'i' is equal to '1' + 'i' is '1' message - 'i' is equal to '1' + 'i' is '1' kindcontrol @@ -3563,9 +3563,9 @@ depth0 extended_message - 'i' is not equal to '1' + 'i' is not '1' message - 'i' is not equal to '1' + 'i' is not '1' kindcontrol @@ -3786,9 +3786,9 @@ depth0 extended_message - 'i' is equal to '1' + 'i' is '1' message - 'i' is equal to '1' + 'i' is '1' kindcontrol Index: test/Analysis/Inputs/expected-plists/retain-release-path-notes.m.plist =================================================================== --- test/Analysis/Inputs/expected-plists/retain-release-path-notes.m.plist +++ test/Analysis/Inputs/expected-plists/retain-release-path-notes.m.plist @@ -3707,9 +3707,9 @@ depth1 extended_message - Assuming 'Cond' is not equal to '0' + Assuming 'Cond' is not '0' message - Assuming 'Cond' is not equal to '0' + Assuming 'Cond' is not '0' kindcontrol Index: test/Analysis/Inputs/expected-plists/retain-release.m.objc.plist =================================================================== --- test/Analysis/Inputs/expected-plists/retain-release.m.objc.plist +++ test/Analysis/Inputs/expected-plists/retain-release.m.objc.plist @@ -19619,9 +19619,9 @@ depth0 extended_message - Assuming 'error_to_dump' is not equal to 'null' + Assuming 'error_to_dump' is not 'null' message - Assuming 'error_to_dump' is not equal to 'null' + Assuming 'error_to_dump' is not 'null' kindevent @@ -19842,9 +19842,9 @@ depth0 extended_message - Assuming 'info' is not equal to 'null' + Assuming 'info' is not 'null' message - Assuming 'info' is not equal to 'null' + Assuming 'info' is not 'null' kindcontrol @@ -24371,9 +24371,9 @@ depth1 extended_message - Assuming 'Cond' is not equal to '0' + Assuming 'Cond' is not '0' message - Assuming 'Cond' is not equal to '0' + Assuming 'Cond' is not '0' kindcontrol Index: test/Analysis/Inputs/expected-plists/retain-release.m.objcpp.plist =================================================================== --- test/Analysis/Inputs/expected-plists/retain-release.m.objcpp.plist +++ test/Analysis/Inputs/expected-plists/retain-release.m.objcpp.plist @@ -19688,9 +19688,9 @@ depth0 extended_message - Assuming 'error_to_dump' is not equal to 'null' + Assuming 'error_to_dump' is not 'null' message - Assuming 'error_to_dump' is not equal to 'null' + Assuming 'error_to_dump' is not 'null' kindevent @@ -19911,9 +19911,9 @@ depth0 extended_message - Assuming 'info' is not equal to 'null' + Assuming 'info' is not 'null' message - Assuming 'info' is not equal to 'null' + Assuming 'info' is not 'null' kindcontrol @@ -24440,9 +24440,9 @@ depth1 extended_message - Assuming 'Cond' is not equal to '0' + Assuming 'Cond' is not '0' message - Assuming 'Cond' is not equal to '0' + Assuming 'Cond' is not '0' kindcontrol Index: test/Analysis/Inputs/expected-plists/unix-fns.c.plist =================================================================== --- test/Analysis/Inputs/expected-plists/unix-fns.c.plist +++ test/Analysis/Inputs/expected-plists/unix-fns.c.plist @@ -102,9 +102,9 @@ depth0 extended_message - Assuming 'fd' is not equal to '0' + Assuming 'fd' is not '0' message - Assuming 'fd' is not equal to '0' + Assuming 'fd' is not '0' kindcontrol @@ -327,9 +327,9 @@ depth0 extended_message - Assuming 'fd' is not equal to '0' + Assuming 'fd' is not '0' message - Assuming 'fd' is not equal to '0' + Assuming 'fd' is not '0' kindcontrol Index: test/Analysis/conditional-path-notes.c =================================================================== --- test/Analysis/conditional-path-notes.c +++ test/Analysis/conditional-path-notes.c @@ -57,7 +57,7 @@ void testDiagnosableBranch(int a) { if (a) { - // expected-note@-1 {{Assuming 'a' is not equal to '0'}} + // expected-note@-1 {{Assuming 'a' is not '0'}} // expected-note@-2 {{Taking true branch}} *(volatile int *)0 = 1; // expected-warning{{Dereference of null pointer}} // expected-note@-1 {{Dereference of null pointer}} @@ -66,9 +66,9 @@ void testDiagnosableBranchLogical(int a, int b) { if (a && b) { - // expected-note@-1 {{Assuming 'a' is not equal to '0'}} + // expected-note@-1 {{Assuming 'a' is not '0'}} // expected-note@-2 {{Left side of '&&' is true}} - // expected-note@-3 {{Assuming 'b' is not equal to '0'}} + // expected-note@-3 {{Assuming 'b' is not '0'}} // expected-note@-4 {{Taking true branch}} *(volatile int *)0 = 1; // expected-warning{{Dereference of null pointer}} // expected-note@-1 {{Dereference of null pointer}} Index: test/Analysis/diagnostics/Inputs/expected-plists/undef-value-param.c.plist =================================================================== --- test/Analysis/diagnostics/Inputs/expected-plists/undef-value-param.c.plist +++ test/Analysis/diagnostics/Inputs/expected-plists/undef-value-param.c.plist @@ -208,9 +208,9 @@ depth1 extended_message - Assuming 'c' is not equal to '0' + Assuming 'c' is not '0' message - Assuming 'c' is not equal to '0' + Assuming 'c' is not '0' kindcontrol Index: test/Analysis/diagnostics/Inputs/expected-plists/undef-value-param.m.plist =================================================================== --- test/Analysis/diagnostics/Inputs/expected-plists/undef-value-param.m.plist +++ test/Analysis/diagnostics/Inputs/expected-plists/undef-value-param.m.plist @@ -213,9 +213,9 @@ depth1 extended_message - Assuming 'err' is not equal to '0' + Assuming 'err' is not '0' message - Assuming 'err' is not equal to '0' + Assuming 'err' is not '0' kindcontrol @@ -739,9 +739,9 @@ depth1 extended_message - Assuming 'err' is not equal to '0' + Assuming 'err' is not '0' message - Assuming 'err' is not equal to '0' + Assuming 'err' is not '0' kindcontrol Index: test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-diagnostic-test.c.sarif =================================================================== --- test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-diagnostic-test.c.sarif +++ test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-diagnostic-test.c.sarif @@ -224,7 +224,7 @@ "importance": "important", "location": { "message": { - "text": "Assuming 'i' is equal to '0'" + "text": "Assuming 'i' is '0'" }, "physicalLocation": { "fileLocation": { Index: test/Analysis/diagnostics/macros.cpp =================================================================== --- test/Analysis/diagnostics/macros.cpp +++ test/Analysis/diagnostics/macros.cpp @@ -4,7 +4,7 @@ #include "../Inputs/system-header-simulator-cxx.h" void testIntMacro(unsigned int i) { - if (i == UINT32_MAX) { // expected-note {{Assuming 'i' is equal to 'UINT32_MAX'}} + if (i == UINT32_MAX) { // expected-note {{Assuming 'i' is 'UINT32_MAX'}} // expected-note@-1 {{Taking true branch}} char *p = NULL; // expected-note {{'p' initialized to a null pointer value}} *p = 7; // expected-warning {{Dereference of null pointer (loaded from variable 'p')}} @@ -13,7 +13,7 @@ } void testNULLMacro(int *p) { - if (p == NULL) { // expected-note {{Assuming 'p' is equal to 'NULL'}} + if (p == NULL) { // expected-note {{Assuming 'p' is 'NULL'}} // expected-note@-1 {{Taking true branch}} *p = 7; // expected-warning {{Dereference of null pointer (loaded from variable 'p')}} // expected-note@-1 {{Dereference of null pointer (loaded from variable 'p')}} @@ -30,7 +30,7 @@ // There are no path notes on the comparison to float types. void testDoubleMacro(double d) { - if (d == DBL_MAX) { // expected-note {{Assuming 'd' is equal to 'DBL_MAX'}} + if (d == DBL_MAX) { // expected-note {{Assuming 'd' is 'DBL_MAX'}} // expected-note@-1 {{Taking true branch}} char *p = NULL; // expected-note {{'p' initialized to a null pointer value}} Index: test/Analysis/diagnostics/macros.m =================================================================== --- test/Analysis/diagnostics/macros.m +++ test/Analysis/diagnostics/macros.m @@ -12,7 +12,7 @@ @end void testBOOLMacro(BOOL b) { - if (b == YES) { // expected-note {{Assuming 'b' is equal to 'YES'}} + if (b == YES) { // expected-note {{Assuming 'b' is 'YES'}} // expected-note@-1 {{Taking true branch}} char *p = NULL;// expected-note {{'p' initialized to a null pointer value}} *p = 7; // expected-warning {{Dereference of null pointer (loaded from variable 'p')}} @@ -21,7 +21,7 @@ } void testNilMacro(NSMutableDictionary *d, NSObject *o) { - if (o == nil) // expected-note {{Assuming 'o' is equal to 'nil'}} + if (o == nil) // expected-note {{Assuming 'o' is 'nil'}} // expected-note@-1 {{Taking true branch}} [d setObject:o forKey:[o description]]; // expected-warning {{Key argument to 'setObject:forKey:' cannot be nil}} // expected-note@-1 {{'description' not called because the receiver is nil}} Index: test/Analysis/diagnostics/undef-value-param.c =================================================================== --- test/Analysis/diagnostics/undef-value-param.c +++ test/Analysis/diagnostics/undef-value-param.c @@ -10,7 +10,7 @@ } void foo(int c, int *x) { if (c) - //expected-note@-1{{Assuming 'c' is not equal to '0'}} + //expected-note@-1{{Assuming 'c' is not '0'}} //expected-note@-2{{Taking true branch}} return; // expected-note{{Returning without writing to '*x'}} *x = 5; Index: test/Analysis/diagnostics/undef-value-param.m =================================================================== --- test/Analysis/diagnostics/undef-value-param.m +++ test/Analysis/diagnostics/undef-value-param.m @@ -54,7 +54,7 @@ unsigned err = 0; SCDynamicStoreRef ref = anotherCreateRef(&err, x); if (err) { - //expected-note@-1{{Assuming 'err' is not equal to '0'}} + //expected-note@-1{{Assuming 'err' is not '0'}} //expected-note@-2{{Taking true branch}} CFRelease(ref); ref = 0; // expected-note{{nil object reference stored to 'ref'}} @@ -66,7 +66,7 @@ unsigned err = 0; SCDynamicStoreRef ref = anotherCreateRef(&err, x); if (err) { - //expected-note@-1{{Assuming 'err' is not equal to '0'}} + //expected-note@-1{{Assuming 'err' is not '0'}} //expected-note@-2{{Taking true branch}} CFRelease(ref); return; // expected-note{{Returning without writing to '*storeRef'}} Index: test/Analysis/inline-plist.c =================================================================== --- test/Analysis/inline-plist.c +++ test/Analysis/inline-plist.c @@ -11,7 +11,7 @@ int foo(int x, int y) { mmm(y); if (x != 0) { - // expected-note@-1 {{Assuming 'x' is equal to '0'}} + // expected-note@-1 {{Assuming 'x' is '0'}} // expected-note@-2 {{Taking false branch}} x++; } @@ -43,7 +43,7 @@ } if (p == 0) { - // expected-note@-1 {{'p' is equal to 'null'}} + // expected-note@-1 {{'p' is 'null'}} // expected-note@-2 {{Taking true branch}} triggers_bug(p); // expected-note@-1 {{Passing null pointer value via 1st parameter 'p'}} Index: test/Analysis/loop-widening-notes.cpp =================================================================== --- test/Analysis/loop-widening-notes.cpp +++ test/Analysis/loop-widening-notes.cpp @@ -4,7 +4,7 @@ int bar(); int flag_a; int test_for_bug_25609() { - if (p_a == 0) // expected-note {{Assuming 'p_a' is equal to 'null'}} + if (p_a == 0) // expected-note {{Assuming 'p_a' is 'null'}} // expected-note@-1 {{Taking true branch}} bar(); for (int i = 0; // expected-note {{Loop condition is true. Entering loop body}} @@ -47,7 +47,7 @@ num--; } while (flag_c-- > 0); //expected-note {{Value assigned to 'num'}} int local = 0; - if (num == 0) // expected-note {{Assuming 'num' is equal to '0'}} + if (num == 0) // expected-note {{Assuming 'num' is '0'}} // expected-note@-1 {{Taking true branch}} local = 10 / num; // no-crash expected-warning {{Division by zero}} // expected-note@-1 {{Division by zero}} @@ -64,7 +64,7 @@ ++i) { ++num; } - if (num == 0) // expected-note {{Assuming 'num' is equal to '0'}} + if (num == 0) // expected-note {{Assuming 'num' is '0'}} // expected-note@-1 {{Taking true branch}} flag_d += 10; return flag_d / num; // no-crash expected-warning {{Division by zero}} Index: test/Analysis/retain-release-path-notes.m =================================================================== --- test/Analysis/retain-release-path-notes.m +++ test/Analysis/retain-release-path-notes.m @@ -204,7 +204,7 @@ @implementation MyObj -(id)initX { - if (Cond) // expected-note {{Assuming 'Cond' is not equal to '0'}} + if (Cond) // expected-note {{Assuming 'Cond' is not '0'}} // expected-note@-1{{Taking true branch}} return 0; self = [super init]; Index: test/Analysis/test-after-div-zero.c =================================================================== --- test/Analysis/test-after-div-zero.c +++ test/Analysis/test-after-div-zero.c @@ -57,7 +57,7 @@ } // expected-note@-1 {{Value being compared against zero has already been used for division}} void err_orig_checker(int x) { - if (x != 0) // expected-note {{Assuming 'x' is equal to '0'}} expected-note {{Taking false branch}} + if (x != 0) // expected-note {{Assuming 'x' is '0'}} expected-note {{Taking false branch}} return; var = 77 / x; // expected-warning {{Division by zero}} expected-note {{Division by zero}} if (!x) {} // no-warning Index: test/Analysis/uninit-vals.c =================================================================== --- test/Analysis/uninit-vals.c +++ test/Analysis/uninit-vals.c @@ -63,7 +63,7 @@ void f6(int x) { int a[20]; - if (x == 25) {} // expected-note{{Assuming 'x' is equal to '25'}} + if (x == 25) {} // expected-note{{Assuming 'x' is '25'}} // expected-note@-1{{Taking true branch}} if (a[x] == 123) {} // expected-warning{{The left operand of '==' is a garbage value due to array index out of bounds}} // expected-note@-1{{The left operand of '==' is a garbage value due to array index out of bounds}} Index: test/Analysis/use-after-move.cpp =================================================================== --- test/Analysis/use-after-move.cpp +++ test/Analysis/use-after-move.cpp @@ -223,10 +223,10 @@ A a; if (i == 1) { #ifndef PEACEFUL - // expected-note@-2 {{Assuming 'i' is not equal to '1'}} + // expected-note@-2 {{Assuming 'i' is not '1'}} // expected-note@-3 {{Taking false branch}} // And the other report: - // expected-note@-5 {{Assuming 'i' is not equal to '1'}} + // expected-note@-5 {{Assuming 'i' is not '1'}} // expected-note@-6 {{Taking false branch}} #endif A b; @@ -235,10 +235,10 @@ } if (i == 2) { #ifndef PEACEFUL - // expected-note@-2 {{Assuming 'i' is not equal to '2'}} + // expected-note@-2 {{Assuming 'i' is not '2'}} // expected-note@-3 {{Taking false branch}} // And the other report: - // expected-note@-5 {{Assuming 'i' is not equal to '2'}} + // expected-note@-5 {{Assuming 'i' is not '2'}} // expected-note@-6 {{Taking false branch}} #endif a.foo(); // no-warning @@ -248,18 +248,18 @@ A a; if (i == 1) { #ifndef PEACEFUL - // expected-note@-2 {{'i' is not equal to '1'}} + // expected-note@-2 {{'i' is not '1'}} // expected-note@-3 {{Taking false branch}} - // expected-note@-4 {{'i' is not equal to '1'}} + // expected-note@-4 {{'i' is not '1'}} // expected-note@-5 {{Taking false branch}} #endif std::move(a); } if (i == 2) { #ifndef PEACEFUL - // expected-note@-2 {{'i' is not equal to '2'}} + // expected-note@-2 {{'i' is not '2'}} // expected-note@-3 {{Taking false branch}} - // expected-note@-4 {{'i' is not equal to '2'}} + // expected-note@-4 {{'i' is not '2'}} // expected-note@-5 {{Taking false branch}} #endif a = A();