Index: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp =================================================================== --- lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -1820,15 +1820,6 @@ ConditionBRVisitor::VisitNodeImpl(const ExplodedNode *N, BugReporterContext &BRC, BugReport &BR) { ProgramPoint progPoint = N->getLocation(); - ProgramStateRef CurrentState = N->getState(); - ProgramStateRef PrevState = N->getFirstPred()->getState(); - - // Compare the GDMs of the state, because that is where constraints - // are managed. Note that ensure that we only look at nodes that - // were generated by the analyzer engine proper, not checkers. - if (CurrentState->getGDM().getRoot() == - PrevState->getGDM().getRoot()) - return nullptr; // If an assumption was made on a branch, it should be caught // here by looking at the state transition. @@ -1845,11 +1836,9 @@ const ProgramPointTag *tag = PS->getTag(); if (tag == tags.first) - return VisitTrueTest(cast(PS->getStmt()), true, - BRC, BR, N); + return VisitTrueTest(cast(PS->getStmt()), true, BRC, BR, N); if (tag == tags.second) - return VisitTrueTest(cast(PS->getStmt()), false, - BRC, BR, N); + return VisitTrueTest(cast(PS->getStmt()), false, BRC, BR, N); return nullptr; } Index: test/Analysis/Inputs/expected-plists/NewDelete-path-notes.cpp.plist =================================================================== --- test/Analysis/Inputs/expected-plists/NewDelete-path-notes.cpp.plist +++ test/Analysis/Inputs/expected-plists/NewDelete-path-notes.cpp.plist @@ -93,12 +93,75 @@ end - line11 + line9 + col7 + file0 + + + line9 + col7 + file0 + + + + + + + kindevent + location + + line9 + col7 + file0 + + ranges + + + + line9 + col7 + file0 + + + line9 + col7 + file0 + + + + depth0 + extended_message + Assuming 'p' is non-null + message + Assuming 'p' is non-null + + + kindcontrol + edges + + + start + + + line9 + col7 + file0 + + + line9 + col7 + file0 + + + end + + + line12 col5 file0 - line11 + line12 col10 file0 @@ -110,7 +173,7 @@ kindevent location - line11 + line12 col5 file0 @@ -118,12 +181,12 @@ - line11 + line12 col5 file0 - line11 + line12 col12 file0 @@ -143,12 +206,12 @@ start - line11 + line12 col5 file0 - line11 + line12 col10 file0 @@ -156,12 +219,12 @@ end - line14 + line15 col3 file0 - line14 + line15 col8 file0 @@ -173,7 +236,7 @@ kindevent location - line14 + line15 col3 file0 @@ -181,12 +244,12 @@ - line14 + line15 col3 file0 - line14 + line15 col10 file0 @@ -207,10 +270,10 @@ issue_hash_content_of_line_in_contextbd8e324d09c70b9e2be6f824a4942e5a issue_context_kindfunction issue_contexttest - issue_hash_function_offset8 + issue_hash_function_offset9 location - line14 + line15 col3 file0 @@ -221,8 +284,8 @@ 6 7 9 - 11 - 14 + 12 + 15 @@ -233,7 +296,7 @@ kindevent location - line25 + line26 col2 file0 @@ -241,12 +304,12 @@ - line25 + line26 col2 file0 - line25 + line26 col12 file0 @@ -262,7 +325,7 @@ kindevent location - line19 + line20 col2 file0 @@ -280,12 +343,12 @@ start - line19 + line20 col2 file0 - line19 + line20 col5 file0 @@ -293,12 +356,12 @@ end - line20 + line21 col3 file0 - line20 + line21 col8 file0 @@ -310,7 +373,7 @@ kindevent location - line20 + line21 col3 file0 @@ -318,12 +381,12 @@ - line20 + line21 col3 file0 - line20 + line21 col13 file0 @@ -339,7 +402,7 @@ kindevent location - line25 + line26 col2 file0 @@ -347,12 +410,12 @@ - line25 + line26 col2 file0 - line25 + line26 col12 file0 @@ -372,12 +435,12 @@ start - line25 + line26 col2 file0 - line25 + line26 col4 file0 @@ -385,12 +448,12 @@ end - line27 + line28 col2 file0 - line27 + line28 col7 file0 @@ -402,7 +465,7 @@ kindevent location - line27 + line28 col2 file0 @@ -410,12 +473,12 @@ - line27 + line28 col2 file0 - line27 + line28 col11 file0 @@ -439,7 +502,7 @@ issue_hash_function_offset3 location - line27 + line28 col2 file0 @@ -447,11 +510,11 @@ 0 - 19 20 - 24 + 21 25 - 27 + 26 + 28 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 @@ -548,6 +548,35 @@ Assuming 'p' is null + kindevent + location + + line25 + col11 + file0 + + ranges + + + + line25 + col11 + file0 + + + line25 + col12 + file0 + + + + depth0 + extended_message + Assuming 'p' is null + message + Assuming 'p' is null + + kindcontrol edges @@ -646,12 +675,12 @@ start - line33 + line34 col3 file0 - line33 + line34 col5 file0 @@ -659,12 +688,12 @@ end - line33 + line34 col11 file0 - line33 + line34 col11 file0 @@ -676,7 +705,7 @@ kindevent location - line33 + line34 col11 file0 @@ -684,12 +713,12 @@ - line33 + line34 col11 file0 - line33 + line34 col11 file0 @@ -709,12 +738,12 @@ start - line33 + line34 col11 file0 - line33 + line34 col11 file0 @@ -722,12 +751,12 @@ end - line33 + line34 col19 file0 - line33 + line34 col19 file0 @@ -739,7 +768,7 @@ kindevent location - line33 + line34 col19 file0 @@ -747,12 +776,12 @@ - line33 + line34 col20 file0 - line33 + line34 col20 file0 @@ -776,7 +805,7 @@ issue_hash_function_offset1 location - line33 + line34 col19 file0 @@ -784,8 +813,8 @@ 0 - 32 33 + 34 @@ -796,7 +825,7 @@ kindevent location - line41 + line42 col3 file0 @@ -804,12 +833,12 @@ - line41 + line42 col3 file0 - line41 + line42 col8 file0 @@ -829,12 +858,12 @@ start - line41 + line42 col3 file0 - line41 + line42 col5 file0 @@ -842,12 +871,12 @@ end - line44 + line45 col3 file0 - line44 + line45 col3 file0 @@ -863,12 +892,12 @@ start - line44 + line45 col3 file0 - line44 + line45 col3 file0 @@ -876,12 +905,12 @@ end - line44 + line45 col6 file0 - line44 + line45 col6 file0 @@ -893,7 +922,7 @@ kindevent location - line44 + line45 col6 file0 @@ -901,12 +930,12 @@ - line44 + line45 col4 file0 - line44 + line45 col4 file0 @@ -930,7 +959,7 @@ issue_hash_function_offset4 location - line44 + line45 col6 file0 @@ -938,9 +967,9 @@ 0 - 40 41 - 44 + 42 + 45 @@ -955,12 +984,12 @@ start - line49 + line50 col3 file0 - line49 + line50 col4 file0 @@ -968,12 +997,12 @@ end - line49 + line50 col7 file0 - line49 + line50 col7 file0 @@ -985,7 +1014,7 @@ kindevent location - line49 + line50 col7 file0 @@ -993,12 +1022,12 @@ - line49 + line50 col7 file0 - line49 + line50 col7 file0 @@ -1018,12 +1047,12 @@ start - line49 + line50 col7 file0 - line49 + line50 col7 file0 @@ -1031,12 +1060,12 @@ end - line53 + line54 col3 file0 - line53 + line54 col5 file0 @@ -1052,12 +1081,12 @@ start - line53 + line54 col3 file0 - line53 + line54 col5 file0 @@ -1065,12 +1094,12 @@ end - line53 + line54 col11 file0 - line53 + line54 col11 file0 @@ -1082,7 +1111,7 @@ kindevent location - line53 + line54 col11 file0 @@ -1090,12 +1119,12 @@ - line53 + line54 col12 file0 - line53 + line54 col12 file0 @@ -1119,7 +1148,7 @@ issue_hash_function_offset5 location - line53 + line54 col11 file0 @@ -1127,9 +1156,9 @@ 0 - 48 49 - 53 + 50 + 54 @@ -1144,12 +1173,12 @@ start - line59 + line60 col3 file0 - line59 + line60 col4 file0 @@ -1157,12 +1186,12 @@ end - line59 + line60 col7 file0 - line59 + line60 col7 file0 @@ -1174,7 +1203,7 @@ kindevent location - line59 + line60 col7 file0 @@ -1182,12 +1211,12 @@ - line59 + line60 col7 file0 - line59 + line60 col7 file0 @@ -1207,12 +1236,12 @@ start - line59 + line60 col7 file0 - line59 + line60 col7 file0 @@ -1220,12 +1249,12 @@ end - line62 + line63 col5 file0 - line62 + line63 col5 file0 @@ -1241,12 +1270,12 @@ start - line62 + line63 col5 file0 - line62 + line63 col5 file0 @@ -1254,12 +1283,12 @@ end - line62 + line63 col24 file0 - line62 + line63 col24 file0 @@ -1271,7 +1300,7 @@ kindevent location - line62 + line63 col24 file0 @@ -1279,12 +1308,12 @@ - line62 + line63 col5 file0 - line62 + line63 col26 file0 @@ -1308,7 +1337,7 @@ issue_hash_function_offset4 location - line62 + line63 col24 file0 @@ -1316,9 +1345,9 @@ 0 - 58 59 - 62 + 60 + 63 @@ -1333,12 +1362,12 @@ start - line68 + line69 col3 file0 - line68 + line69 col4 file0 @@ -1346,12 +1375,12 @@ end - line68 + line69 col7 file0 - line68 + line69 col7 file0 @@ -1363,7 +1392,7 @@ kindevent location - line68 + line69 col7 file0 @@ -1371,12 +1400,12 @@ - line68 + line69 col7 file0 - line68 + line69 col7 file0 @@ -1396,12 +1425,12 @@ start - line68 + line69 col7 file0 - line68 + line69 col7 file0 @@ -1409,12 +1438,12 @@ end - line68 + line69 col12 file0 - line68 + line69 col12 file0 @@ -1426,7 +1455,7 @@ kindevent location - line68 + line69 col12 file0 @@ -1434,12 +1463,12 @@ - line68 + line69 col12 file0 - line68 + line69 col12 file0 @@ -1459,12 +1488,12 @@ start - line68 + line69 col12 file0 - line68 + line69 col12 file0 @@ -1472,12 +1501,12 @@ end - line73 + line74 col5 file0 - line73 + line74 col5 file0 @@ -1493,12 +1522,12 @@ start - line73 + line74 col5 file0 - line73 + line74 col5 file0 @@ -1506,12 +1535,12 @@ end - line73 + line74 col24 file0 - line73 + line74 col24 file0 @@ -1523,7 +1552,7 @@ kindevent location - line73 + line74 col24 file0 @@ -1531,12 +1560,12 @@ - line73 + line74 col5 file0 - line73 + line74 col26 file0 @@ -1560,7 +1589,7 @@ issue_hash_function_offset6 location - line73 + line74 col24 file0 @@ -1568,9 +1597,9 @@ 0 - 67 68 - 73 + 69 + 74 @@ -1585,12 +1614,12 @@ start - line79 + line80 col3 file0 - line79 + line80 col4 file0 @@ -1598,12 +1627,12 @@ end - line79 + line80 col7 file0 - line79 + line80 col7 file0 @@ -1615,7 +1644,7 @@ kindevent location - line79 + line80 col7 file0 @@ -1623,12 +1652,12 @@ - line79 + line80 col7 file0 - line79 + line80 col11 file0 @@ -1648,12 +1677,12 @@ start - line79 + line80 col7 file0 - line79 + line80 col7 file0 @@ -1661,12 +1690,12 @@ end - line82 + line83 col5 file0 - line82 + line83 col5 file0 @@ -1682,12 +1711,12 @@ start - line82 + line83 col5 file0 - line82 + line83 col5 file0 @@ -1695,12 +1724,12 @@ end - line82 + line83 col24 file0 - line82 + line83 col24 file0 @@ -1712,7 +1741,7 @@ kindevent location - line82 + line83 col24 file0 @@ -1720,12 +1749,12 @@ - line82 + line83 col5 file0 - line82 + line83 col26 file0 @@ -1749,7 +1778,7 @@ issue_hash_function_offset4 location - line82 + line83 col24 file0 @@ -1757,9 +1786,9 @@ 0 - 78 79 - 82 + 80 + 83 @@ -1769,4 +1798,4 @@ /clang/test/Analysis/conditional-path-notes.c - + \ No newline at end of file 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 @@ -161,6 +161,69 @@ end + line11 + col9 + file0 + + + line11 + col9 + file0 + + + + + + + kindevent + location + + line11 + col9 + file0 + + ranges + + + + line11 + col9 + file0 + + + line11 + col14 + file0 + + + + depth0 + extended_message + Assuming 'y' is not equal to 2 + message + Assuming 'y' is not equal to 2 + + + kindcontrol + edges + + + start + + + line11 + col9 + file0 + + + line11 + col9 + file0 + + + end + + line13 col5 file0 @@ -421,6 +484,69 @@ end + + + line11 + col9 + file0 + + + line11 + col9 + file0 + + + + + + + kindevent + location + + line11 + col9 + file0 + + ranges + + + + line11 + col9 + file0 + + + line11 + col14 + file0 + + + + depth0 + extended_message + Assuming 'y' is equal to 2 + message + Assuming 'y' is equal to 2 + + + kindcontrol + edges + + + start + + + line11 + col9 + file0 + + + line11 + col9 + file0 + + + end line12 @@ -666,6 +792,69 @@ end + + + line32 + col7 + file0 + + + line32 + col10 + file0 + + + + + + + kindevent + location + + line32 + col7 + file0 + + ranges + + + + line32 + col7 + file0 + + + line32 + col10 + file0 + + + + depth1 + extended_message + Assuming 'fail' is not equal to 0 + message + Assuming 'fail' is not equal to 0 + + + kindcontrol + edges + + + start + + + line32 + col7 + file0 + + + line32 + col10 + file0 + + + end line33 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 @@ -672,6 +672,35 @@ Assuming 'p' is null + kindevent + location + + line70 + col7 + file0 + + ranges + + + + line70 + col7 + file0 + + + line70 + col8 + file0 + + + + depth0 + extended_message + Assuming 'p' is null + message + Assuming 'p' is null + + kindcontrol edges @@ -2711,6 +2740,35 @@ + kindevent + location + + line146 + col8 + file0 + + ranges + + + + line146 + col8 + file0 + + + line146 + col13 + file0 + + + + depth0 + extended_message + Assuming 'i' is not equal to 1 + message + Assuming 'i' is not equal to 1 + + kindcontrol edges @@ -2891,6 +2949,69 @@ end + line146 + col8 + file0 + + + line146 + col8 + file0 + + + + + + + kindevent + location + + line146 + col8 + file0 + + ranges + + + + line146 + col8 + file0 + + + line146 + col13 + file0 + + + + depth0 + extended_message + Assuming 'i' is equal to 1 + message + Assuming 'i' is equal to 1 + + + kindcontrol + edges + + + start + + + line146 + col8 + file0 + + + line146 + col8 + file0 + + + end + + line147 col5 file0 @@ -3809,6 +3930,69 @@ end + line178 + col9 + file0 + + + line178 + col9 + file0 + + + + + + + kindevent + location + + line178 + col9 + file0 + + ranges + + + + line178 + col9 + file0 + + + line178 + col14 + file0 + + + + depth0 + extended_message + Assuming 'i' is equal to 0 + message + Assuming 'i' is equal to 0 + + + kindcontrol + edges + + + start + + + line178 + col9 + file0 + + + line178 + col9 + file0 + + + end + + line179 col7 file0 @@ -4003,13 +4187,13 @@ end - line181 - col5 + line178 + col9 file0 - line181 - col6 + line178 + col9 file0 @@ -4017,6 +4201,35 @@ + kindevent + location + + line178 + col9 + file0 + + ranges + + + + line178 + col9 + file0 + + + line178 + col14 + file0 + + + + depth0 + extended_message + Assuming 'i' is not equal to 0 + message + Assuming 'i' is not equal to 0 + + kindcontrol edges @@ -4024,26 +4237,26 @@ start - line181 - col5 + line178 + col9 file0 - line181 - col6 + line178 + col9 file0 end - line183 - col7 + line181 + col5 file0 - line183 - col11 + line181 + col6 file0 @@ -4058,26 +4271,26 @@ start - line183 - col7 + line181 + col5 file0 - line183 - col11 + line181 + col6 file0 end - line186 - col3 + line181 + col9 file0 - line186 - col3 + line181 + col9 file0 @@ -4085,29 +4298,126 @@ - kindcontrol - edges - - - start - - - line186 - col3 - file0 - - - line186 - col3 - file0 - - - end - - - line186 - col6 - file0 + kindevent + location + + line181 + col9 + file0 + + ranges + + + + line181 + col9 + file0 + + + line181 + col14 + file0 + + + + depth0 + extended_message + Assuming 'i' is equal to 1 + message + Assuming 'i' is equal to 1 + + + kindcontrol + edges + + + start + + + line181 + col9 + file0 + + + line181 + col9 + file0 + + + end + + + line183 + col7 + file0 + + + line183 + col11 + file0 + + + + + + + kindcontrol + edges + + + start + + + line183 + col7 + file0 + + + line183 + col11 + file0 + + + end + + + line186 + col3 + file0 + + + line186 + col3 + file0 + + + + + + + kindcontrol + edges + + + start + + + line186 + col3 + file0 + + + line186 + col3 + file0 + + + end + + + line186 + col6 + file0 line186 @@ -6417,6 +6727,35 @@ + kindevent + location + + line240 + col7 + file0 + + ranges + + + + line240 + col7 + file0 + + + line240 + col7 + file0 + + + + depth0 + extended_message + Assuming the condition is true + message + Assuming the condition is true + + kindcontrol edges @@ -6451,6 +6790,35 @@ + kindevent + location + + line240 + col12 + file0 + + ranges + + + + line240 + col12 + file0 + + + line240 + col12 + file0 + + + + depth0 + extended_message + Assuming the condition is true + message + Assuming the condition is true + + kindcontrol edges @@ -6675,6 +7043,35 @@ + kindevent + location + + line247 + col7 + file0 + + ranges + + + + line247 + col7 + file0 + + + line247 + col7 + file0 + + + + depth0 + extended_message + Assuming the condition is false + message + Assuming the condition is false + + kindcontrol edges @@ -6709,6 +7106,35 @@ + kindevent + location + + line247 + col12 + file0 + + ranges + + + + line247 + col12 + file0 + + + line247 + col12 + file0 + + + + depth0 + extended_message + Assuming the condition is true + message + Assuming the condition is true + + kindcontrol edges @@ -6933,6 +7359,35 @@ + kindevent + location + + line255 + col12 + file0 + + ranges + + + + line255 + col12 + file0 + + + line255 + col12 + file0 + + + + depth0 + extended_message + Assuming the condition is false + message + Assuming the condition is false + + kindcontrol edges @@ -7254,14 +7709,43 @@ - kindcontrol - edges - - - start - - - line263 + kindevent + location + + line263 + col8 + file0 + + ranges + + + + line263 + col8 + file0 + + + line263 + col8 + file0 + + + + depth0 + extended_message + Assuming the condition is false + message + Assuming the condition is false + + + kindcontrol + edges + + + start + + + line263 col8 file0 @@ -7309,6 +7793,69 @@ line263 + col7 + file0 + + + line263 + col7 + file0 + + + + + + + kindevent + location + + line263 + col7 + file0 + + ranges + + + + line263 + col7 + file0 + + + line263 + col14 + file0 + + + + depth0 + extended_message + Assuming the condition is false + message + Assuming the condition is false + + + kindcontrol + edges + + + start + + + line263 + col7 + file0 + + + line263 + col7 + file0 + + + end + + + line263 col19 file0 @@ -7575,6 +8122,35 @@ + kindevent + location + + line263 + col8 + file0 + + ranges + + + + line263 + col8 + file0 + + + line263 + col8 + file0 + + + + depth0 + extended_message + Assuming the condition is false + message + Assuming the condition is false + + kindcontrol edges @@ -7630,6 +8206,69 @@ line263 + col7 + file0 + + + line263 + col7 + file0 + + + + + + + kindevent + location + + line263 + col7 + file0 + + ranges + + + + line263 + col7 + file0 + + + line263 + col14 + file0 + + + + depth0 + extended_message + Assuming the condition is false + message + Assuming the condition is false + + + kindcontrol + edges + + + start + + + line263 + col7 + file0 + + + line263 + col7 + file0 + + + end + + + line263 col19 file0 @@ -7740,6 +8379,35 @@ + kindevent + location + + line267 + col7 + file0 + + ranges + + + + line267 + col7 + file0 + + + line267 + col7 + file0 + + + + depth0 + extended_message + Assuming the condition is false + message + Assuming the condition is false + + kindcontrol edges @@ -7774,6 +8442,35 @@ + kindevent + location + + line267 + col13 + file0 + + ranges + + + + line267 + col13 + file0 + + + line267 + col13 + file0 + + + + depth0 + extended_message + Assuming the condition is false + message + Assuming the condition is false + + kindcontrol edges @@ -7808,6 +8505,35 @@ + kindevent + location + + line267 + col18 + file0 + + ranges + + + + line267 + col18 + file0 + + + line267 + col22 + file0 + + + + depth0 + extended_message + Assuming 'coin' is 0 + message + Assuming 'coin' is 0 + + kindcontrol edges @@ -8033,6 +8759,35 @@ + kindevent + location + + line276 + col8 + file0 + + ranges + + + + line276 + col8 + file0 + + + line276 + col8 + file0 + + + + depth0 + extended_message + Assuming the condition is false + message + Assuming the condition is false + + kindcontrol edges @@ -8067,6 +8822,35 @@ + kindevent + location + + line276 + col14 + file0 + + ranges + + + + line276 + col14 + file0 + + + line276 + col14 + file0 + + + + depth0 + extended_message + Assuming the condition is true + message + Assuming the condition is true + + kindcontrol edges @@ -8109,12 +8893,138 @@ line276 - col19 + col19 + file0 + + + line276 + col19 + file0 + + + end + + + line276 + col7 + file0 + + + line276 + col7 + file0 + + + + + + + kindevent + location + + line276 + col7 + file0 + + ranges + + + + line276 + col7 + file0 + + + line276 + col21 + file0 + + + + depth0 + extended_message + Assuming the condition is false + message + Assuming the condition is false + + + kindcontrol + edges + + + start + + + line276 + col7 + file0 + + + line276 + col7 + file0 + + + end + + + line276 + col30 + file0 + + + line276 + col30 + file0 + + + + + + + kindevent + location + + line276 + col31 + file0 + + ranges + + + + line276 + col31 + file0 + + + line276 + col31 + file0 + + + + depth0 + extended_message + Assuming the condition is false + message + Assuming the condition is false + + + kindcontrol + edges + + + start + + + line276 + col31 file0 line276 - col19 + col31 file0 @@ -8122,12 +9032,12 @@ line276 - col30 + col36 file0 line276 - col30 + col36 file0 @@ -8143,12 +9053,12 @@ line276 - col31 + col36 file0 line276 - col31 + col36 file0 @@ -8156,12 +9066,12 @@ line276 - col36 + col30 file0 line276 - col36 + col30 file0 @@ -8169,6 +9079,35 @@ + kindevent + location + + line276 + col30 + file0 + + ranges + + + + line276 + col30 + file0 + + + line276 + col37 + file0 + + + + depth0 + extended_message + Assuming the condition is true + message + Assuming the condition is true + + kindcontrol edges @@ -8177,12 +9116,12 @@ line276 - col36 + col30 file0 line276 - col36 + col30 file0 @@ -8203,6 +9142,35 @@ + kindevent + location + + line276 + col46 + file0 + + ranges + + + + line276 + col46 + file0 + + + line276 + col46 + file0 + + + + depth0 + extended_message + Assuming the condition is true + message + Assuming the condition is true + + kindcontrol edges @@ -8660,6 +9628,35 @@ + kindevent + location + + line285 + col12 + file0 + + ranges + + + + line285 + col12 + file0 + + + line285 + col12 + file0 + + + + depth0 + extended_message + Assuming 'z' is 0 + message + Assuming 'z' is 0 + + kindcontrol edges @@ -9001,6 +9998,69 @@ end + line294 + col7 + file0 + + + line294 + col7 + file0 + + + + + + + kindevent + location + + line294 + col7 + file0 + + ranges + + + + line294 + col7 + file0 + + + line294 + col7 + file0 + + + + depth0 + extended_message + Assuming 'y' is null + message + Assuming 'y' is null + + + kindcontrol + edges + + + start + + + line294 + col7 + file0 + + + line294 + col7 + file0 + + + end + + line297 col3 file0 @@ -11589,6 +12649,69 @@ end + line457 + col9 + file0 + + + line457 + col9 + file0 + + + + + + + kindevent + location + + line457 + col9 + file0 + + ranges + + + + line457 + col9 + file0 + + + line457 + col14 + file0 + + + + depth0 + extended_message + Assuming 'first' is not equal to 0 + message + Assuming 'first' is not equal to 0 + + + kindcontrol + edges + + + start + + + line457 + col9 + file0 + + + line457 + col9 + file0 + + + end + + line459 col5 file0 @@ -11712,21 +12835,55 @@ file0 - line453 - col4 + line453 + col4 + file0 + + + end + + + line454 + col5 + file0 + + + line454 + col8 + file0 + + + + + + + kindcontrol + edges + + + start + + + line454 + col5 + file0 + + + line454 + col8 file0 end - line454 + line457 col5 file0 - line454 - col8 + line457 + col6 file0 @@ -11741,13 +12898,13 @@ start - line454 + line457 col5 file0 - line454 - col8 + line457 + col6 file0 @@ -11755,12 +12912,12 @@ line457 - col5 + col9 file0 line457 - col6 + col9 file0 @@ -11768,6 +12925,35 @@ + kindevent + location + + line457 + col9 + file0 + + ranges + + + + line457 + col9 + file0 + + + line457 + col14 + file0 + + + + depth0 + extended_message + Assuming 'first' is 0 + message + Assuming 'first' is 0 + + kindcontrol edges @@ -11776,12 +12962,12 @@ line457 - col5 + col9 file0 line457 - col6 + col9 file0 @@ -12053,6 +13239,69 @@ end + line457 + col9 + file0 + + + line457 + col9 + file0 + + + + + + + kindevent + location + + line457 + col9 + file0 + + ranges + + + + line457 + col9 + file0 + + + line457 + col14 + file0 + + + + depth0 + extended_message + Assuming 'first' is not equal to 0 + message + Assuming 'first' is not equal to 0 + + + kindcontrol + edges + + + start + + + line457 + col9 + file0 + + + line457 + col9 + file0 + + + end + + line459 col5 file0 @@ -12548,6 +13797,69 @@ end + line457 + col9 + file0 + + + line457 + col9 + file0 + + + + + + + kindevent + location + + line457 + col9 + file0 + + ranges + + + + line457 + col9 + file0 + + + line457 + col14 + file0 + + + + depth0 + extended_message + Assuming 'first' is not equal to 0 + message + Assuming 'first' is not equal to 0 + + + kindcontrol + edges + + + start + + + line457 + col9 + file0 + + + line457 + col9 + file0 + + + end + + line459 col5 file0 @@ -13110,6 +14422,69 @@ end + line457 + col9 + file0 + + + line457 + col9 + file0 + + + + + + + kindevent + location + + line457 + col9 + file0 + + ranges + + + + line457 + col9 + file0 + + + line457 + col14 + file0 + + + + depth0 + extended_message + Assuming 'first' is not equal to 0 + message + Assuming 'first' is not equal to 0 + + + kindcontrol + edges + + + start + + + line457 + col9 + file0 + + + line457 + col9 + file0 + + + end + + line459 col5 file0 @@ -14515,21 +15890,55 @@ file0 - line452 - col5 + line452 + col5 + file0 + + + end + + + line454 + col5 + file0 + + + line454 + col8 + file0 + + + + + + + kindcontrol + edges + + + start + + + line454 + col5 + file0 + + + line454 + col8 file0 end - line454 + line457 col5 file0 - line454 - col8 + line457 + col6 file0 @@ -14544,13 +15953,13 @@ start - line454 + line457 col5 file0 - line454 - col8 + line457 + col6 file0 @@ -14558,12 +15967,12 @@ line457 - col5 + col9 file0 line457 - col6 + col9 file0 @@ -14571,6 +15980,35 @@ + kindevent + location + + line457 + col9 + file0 + + ranges + + + + line457 + col9 + file0 + + + line457 + col14 + file0 + + + + depth0 + extended_message + Assuming 'first' is not equal to 0 + message + Assuming 'first' is not equal to 0 + + kindcontrol edges @@ -14579,12 +16017,12 @@ line457 - col5 + col9 file0 line457 - col6 + col9 file0 @@ -16199,6 +17637,69 @@ end + line457 + col9 + file0 + + + line457 + col9 + file0 + + + + + + + kindevent + location + + line457 + col9 + file0 + + ranges + + + + line457 + col9 + file0 + + + line457 + col14 + file0 + + + + depth0 + extended_message + Assuming 'first' is not equal to 0 + message + Assuming 'first' is not equal to 0 + + + kindcontrol + edges + + + start + + + line457 + col9 + file0 + + + line457 + col9 + file0 + + + end + + line459 col5 file0 @@ -18032,6 +19533,69 @@ end + line457 + col9 + file0 + + + line457 + col9 + file0 + + + + + + + kindevent + location + + line457 + col9 + file0 + + ranges + + + + line457 + col9 + file0 + + + line457 + col14 + file0 + + + + depth0 + extended_message + Assuming 'first' is not equal to 0 + message + Assuming 'first' is not equal to 0 + + + kindcontrol + edges + + + start + + + line457 + col9 + file0 + + + line457 + col9 + file0 + + + end + + line459 col5 file0 @@ -20031,6 +21595,35 @@ Reallocation failed + kindevent + location + + line532 + col7 + file0 + + ranges + + + + line532 + col7 + file0 + + + line532 + col10 + file0 + + + + depth0 + extended_message + Assuming 'tmp' is null + message + Assuming 'tmp' is null + + kindcontrol edges @@ -21341,6 +22934,69 @@ end + line587 + col11 + file0 + + + line587 + col11 + file0 + + + + + + + kindevent + location + + line587 + col11 + file0 + + ranges + + + + line587 + col11 + file0 + + + line587 + col16 + file0 + + + + depth0 + extended_message + Assuming the condition is true + message + Assuming the condition is true + + + kindcontrol + edges + + + start + + + line587 + col11 + file0 + + + line587 + col11 + file0 + + + end + + line588 col9 file0 @@ -21449,4 +23105,4 @@ /clang/test/Analysis/edges-new.mm - + \ No newline at end of file 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 @@ -518,12 +518,75 @@ end - line47 + line45 + col7 + file0 + + + line45 + col7 + file0 + + + + + + + kindevent + location + + line45 + col7 + file0 + + ranges + + + + line45 + col7 + file0 + + + line45 + col12 + file0 + + + + depth0 + extended_message + Assuming 'p' is equal to null + message + Assuming 'p' is equal to null + + + kindcontrol + edges + + + start + + + line45 + col7 + file0 + + + line45 + col7 + file0 + + + end + + + line48 col5 file0 - line47 + line48 col16 file0 @@ -535,7 +598,7 @@ kindevent location - line47 + line48 col18 file0 @@ -543,12 +606,12 @@ - line47 + line48 col18 file0 - line47 + line48 col18 file0 @@ -564,7 +627,7 @@ kindevent location - line47 + line48 col5 file0 @@ -572,12 +635,12 @@ - line47 + line48 col5 file0 - line47 + line48 col19 file0 @@ -725,7 +788,7 @@ 38 39 45 - 47 + 48 @@ -736,7 +799,7 @@ kindevent location - line58 + line59 col3 file0 @@ -744,12 +807,12 @@ - line58 + line59 col3 file0 - line58 + line59 col8 file0 @@ -769,12 +832,12 @@ start - line58 + line59 col3 file0 - line58 + line59 col5 file0 @@ -782,12 +845,12 @@ end - line59 + line60 col3 file0 - line59 + line60 col3 file0 @@ -799,7 +862,7 @@ kindevent location - line59 + line60 col3 file0 @@ -807,12 +870,12 @@ - line59 + line60 col3 file0 - line61 + line62 col5 file0 @@ -828,7 +891,7 @@ kindevent location - line59 + line60 col3 file0 @@ -846,12 +909,12 @@ start - line59 + line60 col3 file0 - line59 + line60 col3 file0 @@ -859,12 +922,12 @@ end - line60 + line61 col5 file0 - line60 + line61 col5 file0 @@ -880,12 +943,12 @@ start - line60 + line61 col5 file0 - line60 + line61 col5 file0 @@ -893,12 +956,12 @@ end - line60 + line61 col8 file0 - line60 + line61 col8 file0 @@ -910,7 +973,7 @@ kindevent location - line60 + line61 col8 file0 @@ -918,12 +981,12 @@ - line60 + line61 col6 file0 - line60 + line61 col6 file0 @@ -944,7 +1007,7 @@ issue_hash_content_of_line_in_contexta2e7504f29818834127c44ba841f4da8 location - line60 + line61 col8 file0 @@ -952,10 +1015,10 @@ 0 - 57 58 59 60 + 61 @@ -970,12 +1033,12 @@ start - line66 + line67 col3 file0 - line66 + line67 col5 file0 @@ -983,12 +1046,12 @@ end - line66 + line67 col12 file0 - line66 + line67 col12 file0 @@ -1000,7 +1063,7 @@ kindevent location - line66 + line67 col12 file0 @@ -1008,12 +1071,12 @@ - line66 + line67 col12 file0 - line69 + line70 col5 file0 @@ -1029,7 +1092,7 @@ kindevent location - line66 + line67 col12 file0 @@ -1047,12 +1110,12 @@ start - line66 + line67 col12 file0 - line66 + line67 col12 file0 @@ -1060,12 +1123,12 @@ end - line67 + line68 col5 file0 - line67 + line68 col7 file0 @@ -1077,7 +1140,7 @@ kindevent location - line67 + line68 col5 file0 @@ -1085,12 +1148,12 @@ - line67 + line68 col5 file0 - line67 + line68 col10 file0 @@ -1110,12 +1173,12 @@ start - line67 + line68 col5 file0 - line67 + line68 col7 file0 @@ -1123,12 +1186,12 @@ end - line68 + line69 col5 file0 - line68 + line69 col10 file0 @@ -1140,7 +1203,7 @@ kindevent location - line68 + line69 col5 file0 @@ -1148,12 +1211,12 @@ - line68 + line69 col5 file0 - line68 + line69 col12 file0 @@ -1169,7 +1232,7 @@ kindevent location - line66 + line67 col12 file0 @@ -1177,12 +1240,12 @@ - line66 + line67 col12 file0 - line69 + line70 col5 file0 @@ -1202,12 +1265,12 @@ start - line66 + line67 col12 file0 - line66 + line67 col12 file0 @@ -1215,12 +1278,12 @@ end - line66 + line67 col3 file0 - line66 + line67 col5 file0 @@ -1232,7 +1295,7 @@ kindevent location - line66 + line67 col3 file0 @@ -1240,12 +1303,12 @@ - line66 + line67 col3 file0 - line66 + line67 col8 file0 @@ -1265,12 +1328,12 @@ start - line66 + line67 col3 file0 - line66 + line67 col5 file0 @@ -1278,12 +1341,12 @@ end - line70 + line71 col3 file0 - line70 + line71 col3 file0 @@ -1299,12 +1362,12 @@ start - line70 + line71 col3 file0 - line70 + line71 col3 file0 @@ -1312,12 +1375,12 @@ end - line70 + line71 col6 file0 - line70 + line71 col6 file0 @@ -1329,7 +1392,7 @@ kindevent location - line70 + line71 col6 file0 @@ -1337,12 +1400,12 @@ - line70 + line71 col4 file0 - line70 + line71 col4 file0 @@ -1366,7 +1429,7 @@ issue_hash_function_offset5 location - line70 + line71 col6 file0 @@ -1374,11 +1437,11 @@ 0 - 65 66 67 68 - 70 + 69 + 71 @@ -1393,12 +1456,12 @@ start - line74 + line75 col3 file0 - line74 + line75 col9 file0 @@ -1406,12 +1469,12 @@ end - line75 + line76 col3 file0 - line75 + line76 col3 file0 @@ -1423,7 +1486,7 @@ kindevent location - line75 + line76 col3 file0 @@ -1431,12 +1494,12 @@ - line75 + line76 col3 file0 - line77 + line78 col5 file0 @@ -1452,7 +1515,7 @@ kindevent location - line75 + line76 col3 file0 @@ -1470,12 +1533,12 @@ start - line75 + line76 col3 file0 - line75 + line76 col3 file0 @@ -1483,12 +1546,12 @@ end - line76 + line77 col5 file0 - line76 + line77 col5 file0 @@ -1500,7 +1563,7 @@ kindevent location - line76 + line77 col5 file0 @@ -1508,12 +1571,12 @@ - line76 + line77 col5 file0 - line76 + line77 col9 file0 @@ -1529,7 +1592,7 @@ kindevent location - line75 + line76 col3 file0 @@ -1537,12 +1600,12 @@ - line75 + line76 col3 file0 - line77 + line78 col5 file0 @@ -1562,12 +1625,12 @@ start - line75 + line76 col3 file0 - line75 + line76 col3 file0 @@ -1575,12 +1638,12 @@ end - line78 + line79 col3 file0 - line78 + line79 col3 file0 @@ -1596,12 +1659,12 @@ start - line78 + line79 col3 file0 - line78 + line79 col3 file0 @@ -1609,12 +1672,12 @@ end - line78 + line79 col6 file0 - line78 + line79 col6 file0 @@ -1626,7 +1689,7 @@ kindevent location - line78 + line79 col6 file0 @@ -1634,12 +1697,12 @@ - line78 + line79 col4 file0 - line78 + line79 col4 file0 @@ -1663,7 +1726,7 @@ issue_hash_function_offset5 location - line78 + line79 col6 file0 @@ -1671,11 +1734,11 @@ 0 - 73 74 75 76 - 78 + 77 + 79 @@ -1690,12 +1753,12 @@ start - line82 + line83 col3 file0 - line82 + line83 col5 file0 @@ -1703,12 +1766,12 @@ end - line83 + line84 col3 file0 - line83 + line84 col3 file0 @@ -1720,7 +1783,7 @@ kindevent location - line83 + line84 col3 file0 @@ -1728,12 +1791,12 @@ - line83 + line84 col3 file0 - line85 + line86 col7 file0 @@ -1749,7 +1812,7 @@ kindevent location - line83 + line84 col3 file0 @@ -1767,12 +1830,12 @@ start - line83 + line84 col3 file0 - line83 + line84 col3 file0 @@ -1780,12 +1843,12 @@ end - line84 + line85 col5 file0 - line84 + line85 col5 file0 @@ -1797,7 +1860,7 @@ kindevent location - line84 + line85 col5 file0 @@ -1805,12 +1868,12 @@ - line84 + line85 col5 file0 - line84 + line85 col10 file0 @@ -1826,7 +1889,7 @@ kindevent location - line83 + line84 col3 file0 @@ -1834,12 +1897,12 @@ - line83 + line84 col3 file0 - line85 + line86 col7 file0 @@ -1859,12 +1922,12 @@ start - line83 + line84 col3 file0 - line83 + line84 col3 file0 @@ -1872,12 +1935,12 @@ end - line86 + line87 col3 file0 - line86 + line87 col3 file0 @@ -1893,12 +1956,12 @@ start - line86 + line87 col3 file0 - line86 + line87 col3 file0 @@ -1906,12 +1969,12 @@ end - line86 + line87 col6 file0 - line86 + line87 col6 file0 @@ -1923,7 +1986,7 @@ kindevent location - line86 + line87 col6 file0 @@ -1931,12 +1994,12 @@ - line86 + line87 col4 file0 - line86 + line87 col4 file0 @@ -1960,7 +2023,7 @@ issue_hash_function_offset5 location - line86 + line87 col6 file0 @@ -1968,12 +2031,12 @@ 0 - 81 82 83 84 85 86 + 87 Index: test/Analysis/Inputs/expected-plists/method-call-path-notes.cpp.plist =================================================================== --- test/Analysis/Inputs/expected-plists/method-call-path-notes.cpp.plist +++ test/Analysis/Inputs/expected-plists/method-call-path-notes.cpp.plist @@ -471,6 +471,35 @@ Assuming 'p' is null + kindevent + location + + line29 + col7 + file0 + + ranges + + + + line29 + col7 + file0 + + + line29 + col8 + file0 + + + + depth0 + extended_message + Assuming 'p' is null + message + Assuming 'p' is null + + kindcontrol edges @@ -748,6 +777,35 @@ Assuming 'p' is null + kindevent + location + + line41 + col7 + file0 + + ranges + + + + line41 + col7 + file0 + + + line41 + col8 + file0 + + + + depth0 + extended_message + Assuming 'p' is null + message + Assuming 'p' is null + + kindcontrol edges @@ -842,4 +900,4 @@ /clang/test/Analysis/method-call-path-notes.cpp - + \ No newline at end of file Index: test/Analysis/Inputs/expected-plists/model-file.cpp.plist =================================================================== --- test/Analysis/Inputs/expected-plists/model-file.cpp.plist +++ test/Analysis/Inputs/expected-plists/model-file.cpp.plist @@ -127,6 +127,69 @@ end + line25 + col7 + file0 + + + line25 + col13 + file0 + + + + + + + kindevent + location + + line25 + col7 + file0 + + ranges + + + + line25 + col7 + file0 + + + line25 + col16 + file0 + + + + depth0 + extended_message + Assuming the condition is false + message + Assuming the condition is false + + + kindcontrol + edges + + + start + + + line25 + col7 + file0 + + + line25 + col13 + file0 + + + end + + line31 col3 file0 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 @@ -952,6 +952,35 @@ Assuming 'p' is equal to null + kindevent + location + + line45 + col7 + file0 + + ranges + + + + line45 + col7 + file0 + + + line45 + col21 + file0 + + + + depth0 + extended_message + Assuming 'p' is equal to null + message + Assuming 'p' is equal to null + + kindcontrol edges @@ -1389,6 +1418,35 @@ depth0 extended_message + Assuming 'p' is null + message + Assuming 'p' is null + + + kindevent + location + + line69 + col3 + file0 + + ranges + + + + line69 + col3 + file0 + + + line69 + col16 + file0 + + + + depth0 + extended_message Assuming 'y' is 0 message Assuming 'y' is 0 @@ -1525,7 +1583,7 @@ kindevent location - line83 + line87 col3 file0 @@ -1533,12 +1591,12 @@ - line83 + line87 col3 file0 - line83 + line87 col12 file0 @@ -1546,15 +1604,15 @@ depth0 extended_message - Passing null pointer value via 1st parameter 'a' + Passing value via 1st parameter 'a' message - Passing null pointer value via 1st parameter 'a' + Passing value via 1st parameter 'a' kindevent location - line83 + line87 col3 file0 @@ -1562,12 +1620,12 @@ - line83 + line87 col3 file0 - line83 + line87 col12 file0 @@ -1589,9 +1647,9 @@ depth1 extended_message - Entered call from 'test1' + Entered call from 'test2' message - Entered call from 'test1' + Entered call from 'test2' kindcontrol @@ -1648,6 +1706,69 @@ end + line77 + col7 + file0 + + + line77 + col7 + file0 + + + + + + + kindevent + location + + line77 + col7 + file0 + + ranges + + + + line77 + col7 + file0 + + + line77 + col7 + file0 + + + + depth1 + extended_message + Assuming 'a' is null + message + Assuming 'a' is null + + + kindcontrol + edges + + + start + + + line77 + col7 + file0 + + + line77 + col7 + file0 + + + end + + line79 col3 file0 @@ -1747,8 +1868,8 @@ 76 77 79 - 82 - 83 + 86 + 87 @@ -1758,4 +1879,4 @@ /clang/test/Analysis/plist-macros.cpp - + \ No newline at end of file Index: test/Analysis/Inputs/expected-plists/plist-output-alternate.m.plist =================================================================== --- test/Analysis/Inputs/expected-plists/plist-output-alternate.m.plist +++ test/Analysis/Inputs/expected-plists/plist-output-alternate.m.plist @@ -672,6 +672,35 @@ Assuming 'p' is null + kindevent + location + + line23 + col7 + file0 + + ranges + + + + line23 + col7 + file0 + + + line23 + col8 + file0 + + + + depth0 + extended_message + Assuming 'p' is null + message + Assuming 'p' is null + + kindcontrol edges @@ -1517,4 +1546,4 @@ /clang/test/Analysis/plist-output-alternate.m - + \ No newline at end of file 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 @@ -2497,6 +2497,35 @@ + kindevent + location + + line96 + col8 + file0 + + ranges + + + + line96 + col8 + file0 + + + line96 + col13 + file0 + + + + depth0 + extended_message + Assuming 'i' is not equal to 1 + message + Assuming 'i' is not equal to 1 + + kindcontrol edges @@ -2677,6 +2706,69 @@ end + line96 + col8 + file0 + + + line96 + col8 + file0 + + + + + + + kindevent + location + + line96 + col8 + file0 + + ranges + + + + line96 + col8 + file0 + + + line96 + col13 + file0 + + + + depth0 + extended_message + Assuming 'i' is equal to 1 + message + Assuming 'i' is equal to 1 + + + kindcontrol + edges + + + start + + + line96 + col8 + file0 + + + line96 + col8 + file0 + + + end + + line97 col5 file0 @@ -3448,6 +3540,35 @@ + kindevent + location + + line127 + col9 + file0 + + ranges + + + + line127 + col9 + file0 + + + line127 + col14 + file0 + + + + depth0 + extended_message + Assuming 'i' is not equal to 1 + message + Assuming 'i' is not equal to 1 + + kindcontrol edges @@ -3628,6 +3749,69 @@ end + line127 + col9 + file0 + + + line127 + col9 + file0 + + + + + + + kindevent + location + + line127 + col9 + file0 + + ranges + + + + line127 + col9 + file0 + + + line127 + col14 + file0 + + + + depth0 + extended_message + Assuming 'i' is equal to 1 + message + Assuming 'i' is equal to 1 + + + kindcontrol + edges + + + start + + + line127 + col9 + file0 + + + line127 + col9 + file0 + + + end + + line128 col7 file0 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 @@ -515,6 +515,69 @@ line105 + col12 + file0 + + + line105 + col27 + file0 + + + + + + + kindevent + location + + line105 + col12 + file0 + + ranges + + + + line105 + col12 + file0 + + + line105 + col49 + file0 + + + + depth0 + extended_message + Assuming the condition is true + message + Assuming the condition is true + + + kindcontrol + edges + + + start + + + line105 + col12 + file0 + + + line105 + col27 + file0 + + + end + + + line105 col52 file0 @@ -2244,6 +2307,69 @@ end + line60 + col6 + file0 + + + line60 + col21 + file0 + + + + + + + kindevent + location + + line60 + col6 + file0 + + ranges + + + + line60 + col6 + file0 + + + line60 + col49 + file0 + + + + depth1 + extended_message + Assuming the condition is true + message + Assuming the condition is true + + + kindcontrol + edges + + + start + + + line60 + col6 + file0 + + + line60 + col21 + file0 + + + end + + line61 col3 file0 @@ -2601,6 +2727,69 @@ end + line60 + col6 + file0 + + + line60 + col21 + file0 + + + + + + + kindevent + location + + line60 + col6 + file0 + + ranges + + + + line60 + col6 + file0 + + + line60 + col49 + file0 + + + + depth1 + extended_message + Assuming the condition is true + message + Assuming the condition is true + + + kindcontrol + edges + + + start + + + line60 + col6 + file0 + + + line60 + col21 + file0 + + + end + + line61 col3 file0 Index: test/Analysis/MisusedMovedObject.cpp =================================================================== --- test/Analysis/MisusedMovedObject.cpp +++ test/Analysis/MisusedMovedObject.cpp @@ -184,10 +184,12 @@ } { A a; - if (i == 1) { // expected-note {{Taking false branch}} expected-note {{Taking false branch}} + if (i == 1) { // expected-note {{Assuming 'i' is not equal to 1}} expected-note {{Taking false branch}} + // expected-note@-1 {{Assuming 'i' is not equal to 1}} expected-note@-1 {{Taking false branch}} std::move(a); } - if (i == 2) { // expected-note {{Taking false branch}} expected-note {{Taking false branch}} + if (i == 2) { // expected-note {{Assuming 'i' is not equal to 2}} expected-note {{Taking false branch}} + // expected-note@-1 {{Assuming 'i' is not equal to 2}} expected-note@-1 {{Taking false branch}} a = A(); a.foo(); } @@ -216,7 +218,7 @@ if (i < 10) { // expected-note {{Assuming 'i' is >= 10}} expected-note {{Taking false branch}} a = A(); } - if (i > 5) { // expected-note {{Taking true branch}} + if (i > 5) { // expected-note {{Assuming 'i' is > 5}} expected-note {{Taking true branch}} a.foo(); // expected-warning {{Method call on a 'moved-from' object 'a'}} expected-note {{Method call on a 'moved-from' object 'a'}} } } @@ -470,7 +472,7 @@ // Same thing, but with a ternary operator. { A a, b; - i > 0 ? (void)(b = std::move(a)) : a.bar(); // no-warning // expected-note {{'?' condition is true}} + i > 0 ? (void)(b = std::move(a)) : a.bar(); // no-warning // expected-note {{Assuming 'i' is > 0}} expected-note {{'?' condition is true}} } // A variation on the theme above. { @@ -577,7 +579,8 @@ A a; if (a.foo() > 0 && A(std::move(a)).foo() > 0) { // expected-note {{Assuming the condition is false}} expected-note {{Assuming the condition is false}} // expected-note@-1 {{Left side of '&&' is false}} expected-note@-1 {{Left side of '&&' is false}} - //expected-note@-2 {{Taking false branch}} expected-note@-2 {{Taking false branch}} + // expected-note@-2 {{Assuming the condition is false}} expected-note@-2 {{Assuming the condition is false}} + // expected-note@-3 {{Taking false branch}} expected-note@-3 {{Taking false branch}} A().bar(); } } @@ -587,7 +590,8 @@ A a; if (!(a.foo() > 0 && A(std::move(a)).foo() > 0)) { // expected-note {{Assuming the condition is false}} expected-note {{Assuming the condition is false}} // expected-note@-1 {{Left side of '&&' is false}} expected-note@-1 {{Left side of '&&' is false}} - // expected-note@-2 {{Taking true branch}} expected-note@-2 {{Taking true branch}} + // expected-note@-2 {{Assuming the condition is true}} expected-note@-2 {{Assuming the condition is true}} + // expected-note@-3 {{Taking true branch}} expected-note@-3 {{Taking true branch}} A().bar(); } } @@ -596,15 +600,17 @@ if (A(std::move(a)).foo() > 0 && a.foo() > 0) { // expected-warning {{Method call on a 'moved-from' object 'a'}} expected-note {{Method call on a 'moved-from' object 'a'}} // expected-note@-1 {{'a' became 'moved-from' here}} expected-note@-1 {{Assuming the condition is true}} expected-note@-1 {{Assuming the condition is false}} // expected-note@-2 {{Left side of '&&' is false}} expected-note@-2 {{Left side of '&&' is true}} - // expected-note@-3 {{Taking false branch}} + // expected-note@-3 {{Assuming the condition is false}} + // expected-note@-4 {{Taking false branch}} A().bar(); } } { A a; if (a.foo() > 0 || A(std::move(a)).foo() > 0) { // expected-note {{Assuming the condition is true}} - //expected-note@-1 {{Left side of '||' is true}} - //expected-note@-2 {{Taking true branch}} + // expected-note@-1 {{Left side of '||' is true}} + // expected-note@-2 {{Assuming the condition is true}} + // expected-note@-3 {{Taking true branch}} A().bar(); } } Index: test/Analysis/NewDelete-path-notes.cpp =================================================================== --- test/Analysis/NewDelete-path-notes.cpp +++ test/Analysis/NewDelete-path-notes.cpp @@ -7,7 +7,8 @@ int *p = new int; // expected-note@-1 {{Memory is allocated}} if (p) - // expected-note@-1 {{Taking true branch}} + // expected-note@-1 {{Assuming 'p' is non-null}} + // expected-note@-2 {{Taking true branch}} delete p; // expected-note@-1 {{Memory is released}} Index: test/Analysis/conditional-path-notes.c =================================================================== --- test/Analysis/conditional-path-notes.c +++ test/Analysis/conditional-path-notes.c @@ -24,8 +24,9 @@ void testLHSProblem(int *p) { int x = !p ? *p : 1; // expected-warning{{Dereference of null pointer (loaded from variable 'p')}} // expected-note@-1 {{Assuming 'p' is null}} - // expected-note@-2 {{'?' condition is true}} - // expected-note@-3 {{Dereference of null pointer (loaded from variable 'p')}} + // expected-note@-2 {{Assuming 'p' is null}} + // expected-note@-3 {{'?' condition is true}} + // expected-note@-4 {{Dereference of null pointer (loaded from variable 'p')}} (void)x; } 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 @@ -500,12 +500,12 @@ start - line39 + line40 col5 file0 - line39 + line40 col10 file0 @@ -513,12 +513,12 @@ end - line40 + line41 col5 file0 - line40 + line41 col13 file0 @@ -530,7 +530,7 @@ kindevent location - line40 + line41 col5 file0 @@ -538,12 +538,12 @@ - line40 + line41 col5 file0 - line40 + line41 col21 file0 @@ -687,12 +687,12 @@ end - line33 + line34 col9 file0 - line33 + line34 col14 file0 @@ -704,7 +704,7 @@ kindevent location - line40 + line41 col5 file0 @@ -712,12 +712,12 @@ - line40 + line41 col5 file0 - line40 + line41 col21 file0 @@ -737,12 +737,12 @@ start - line40 + line41 col5 file0 - line40 + line41 col13 file0 @@ -750,12 +750,12 @@ end - line42 + line43 col14 file0 - line42 + line43 col14 file0 @@ -767,7 +767,7 @@ kindevent location - line42 + line43 col14 file0 @@ -775,12 +775,12 @@ - line42 + line43 col16 file0 - line42 + line43 col21 file0 @@ -804,7 +804,7 @@ issue_hash_function_offset4 location - line42 + line43 col14 file0 @@ -814,11 +814,11 @@ 30 31 - 33 - 38 + 34 39 40 - 42 + 41 + 43 @@ -833,12 +833,12 @@ start - line58 + line60 col3 file0 - line58 + line60 col8 file0 @@ -846,12 +846,12 @@ end - line59 + line61 col3 file0 - line59 + line61 col4 file0 @@ -863,7 +863,7 @@ kindevent location - line59 + line61 col3 file0 @@ -871,12 +871,12 @@ - line59 + line61 col3 file0 - line59 + line61 col11 file0 @@ -896,12 +896,12 @@ start - line59 + line61 col3 file0 - line59 + line61 col4 file0 @@ -909,12 +909,12 @@ end - line60 + line62 col3 file0 - line60 + line62 col12 file0 @@ -926,7 +926,7 @@ kindevent location - line60 + line62 col3 file0 @@ -934,12 +934,12 @@ - line60 + line62 col3 file0 - line60 + line62 col20 file0 @@ -955,7 +955,7 @@ kindevent location - line50 + line51 col1 file0 @@ -973,12 +973,12 @@ start - line50 + line51 col1 file0 - line50 + line51 col4 file0 @@ -986,12 +986,12 @@ end - line51 + line52 col3 file0 - line51 + line52 col4 file0 @@ -1007,12 +1007,12 @@ start - line51 + line52 col3 file0 - line51 + line52 col4 file0 @@ -1020,12 +1020,12 @@ end - line51 + line52 col7 file0 - line51 + line52 col7 file0 @@ -1037,7 +1037,7 @@ kindevent location - line51 + line52 col7 file0 @@ -1045,12 +1045,12 @@ - line51 + line52 col7 file0 - line51 + line52 col12 file0 @@ -1070,12 +1070,12 @@ start - line51 + line52 col7 file0 - line51 + line52 col7 file0 @@ -1083,12 +1083,12 @@ end - line54 + line56 col5 file0 - line54 + line56 col10 file0 @@ -1104,12 +1104,12 @@ start - line54 + line56 col5 file0 - line54 + line56 col10 file0 @@ -1117,12 +1117,12 @@ end - line54 + line56 col5 file0 - line54 + line56 col10 file0 @@ -1134,7 +1134,7 @@ kindevent location - line54 + line56 col5 file0 @@ -1152,12 +1152,12 @@ start - line54 + line56 col5 file0 - line54 + line56 col10 file0 @@ -1165,12 +1165,12 @@ end - line54 + line56 col5 file0 - line54 + line56 col10 file0 @@ -1182,7 +1182,7 @@ kindevent location - line60 + line62 col3 file0 @@ -1190,12 +1190,12 @@ - line60 + line62 col3 file0 - line60 + line62 col20 file0 @@ -1215,12 +1215,12 @@ start - line60 + line62 col3 file0 - line60 + line62 col12 file0 @@ -1228,12 +1228,12 @@ end - line62 + line64 col3 file0 - line62 + line64 col8 file0 @@ -1249,12 +1249,12 @@ start - line62 + line64 col3 file0 - line62 + line64 col8 file0 @@ -1262,12 +1262,12 @@ end - line62 + line64 col10 file0 - line62 + line64 col10 file0 @@ -1279,7 +1279,7 @@ kindevent location - line62 + line64 col10 file0 @@ -1287,12 +1287,12 @@ - line62 + line64 col15 file0 - line62 + line64 col16 file0 @@ -1316,7 +1316,7 @@ issue_hash_function_offset5 location - line62 + line64 col10 file0 @@ -1324,14 +1324,14 @@ 0 - 50 51 - 54 - 57 - 58 + 52 + 56 59 60 + 61 62 + 64 @@ -1341,4 +1341,4 @@ /clang/test/Analysis/diagnostics/undef-value-param.c - + \ No newline at end of file Index: test/Analysis/diagnostics/macros.cpp =================================================================== --- test/Analysis/diagnostics/macros.cpp +++ test/Analysis/diagnostics/macros.cpp @@ -5,7 +5,8 @@ void testIntMacro(unsigned int i) { if (i == UINT32_MAX) { // expected-note {{Assuming 'i' is equal to UINT32_MAX}} - // expected-note@-1 {{Taking true branch}} + // expected-note@-1 {{Assuming 'i' is equal to UINT32_MAX}} + // expected-note@-2 {{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')}} // expected-note@-1 {{Dereference of null pointer (loaded from variable 'p')}} @@ -14,7 +15,8 @@ void testNULLMacro(int *p) { if (p == NULL) { // expected-note {{Assuming 'p' is equal to NULL}} - // expected-note@-1 {{Taking true branch}} + // expected-note@-1 {{Assuming 'p' is equal to NULL}} + // expected-note@-2 {{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')}} } @@ -22,7 +24,8 @@ void testnullptrMacro(int *p) { if (p == nullptr) { // expected-note {{Assuming pointer value is null}} - // expected-note@-1 {{Taking true branch}} + // expected-note@-1 {{Assuming the condition is true}} + // expected-note@-2 {{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 +33,8 @@ // There are no path notes on the comparison to float types. void testDoubleMacro(double d) { - if (d == DBL_MAX) { // expected-note {{Taking true branch}} + if (d == DBL_MAX) { // expected-note {{Assuming 'd' is equal to DBL_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')}} @@ -41,7 +45,8 @@ void testboolMacro(bool b, int *p) { p = nullptr; // expected-note {{Null pointer value stored to 'p'}} if (b == false) { // expected-note {{Assuming the condition is true}} - // expected-note@-1 {{Taking true branch}} + // expected-note@-1 {{Assuming the condition is true}} + // expected-note@-2 {{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')}} } Index: test/Analysis/diagnostics/macros.m =================================================================== --- test/Analysis/diagnostics/macros.m +++ test/Analysis/diagnostics/macros.m @@ -13,7 +13,8 @@ void testBOOLMacro(BOOL b) { if (b == YES) { // expected-note {{Assuming 'b' is equal to YES}} - // expected-note@-1 {{Taking true branch}} + // expected-note@-1 {{Assuming 'b' is equal to YES}} + // expected-note@-2 {{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')}} // expected-note@-1 {{Dereference of null pointer (loaded from variable 'p')}} @@ -22,7 +23,8 @@ void testNilMacro(NSMutableDictionary *d, NSObject *o) { if (o == nil) // expected-note {{Assuming 'o' is equal to nil}} - // expected-note@-1 {{Taking true branch}} + // expected-note@-1 {{Assuming 'o' is equal to nil}} + // expected-note@-2 {{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}} // expected-note@-2 {{Key argument to 'setObject:forKey:' cannot be nil}} Index: test/Analysis/diagnostics/no-store-func-path-notes.c =================================================================== --- test/Analysis/diagnostics/no-store-func-path-notes.c +++ test/Analysis/diagnostics/no-store-func-path-notes.c @@ -4,7 +4,8 @@ void *memset(void *__s, int __c, size_t __n); int initializer1(int *p, int x) { - if (x) { // expected-note{{Taking false branch}} + if (x) { // expected-note{{Assuming 'x' is 0}} + // expected-note@-1{{Taking false branch}} *p = 1; return 0; } else { @@ -29,7 +30,8 @@ static int global; int initializer2(int **p, int x) { - if (x) { // expected-note{{Taking false branch}} + if (x) { // expected-note{{Assuming 'x' is 0}} + // expected-note@-1{{Taking false branch}} *p = &global; return 0; } else { @@ -46,7 +48,8 @@ } void initializer3(int *p, int param) { - if (param) // expected-note{{Taking false branch}} + if (param) // expected-note{{Assuming 'param' is 0}} + // expected-note@-1{{Taking false branch}} *p = 0; } // expected-note{{Returning without writing to '*p'}} @@ -59,12 +62,14 @@ } void initializer4(int *p, int param) { - if (param) // expected-note{{Taking false branch}} + if (param) // expected-note{{Assuming 'param' is 0}} + // expected-note@-1{{Taking false branch}} *p = 0; } // expected-note{{Returning without writing to '*p'}} void initializer5(int *p, int param) { - if (!param) // expected-note{{Taking false branch}} + if (!param) // expected-note{{Assuming 'param' is not equal to 0}} + // expected-note@-1{{Taking false branch}} *p = 0; } // expected-note{{Returning without writing to '*p'}} @@ -94,7 +99,8 @@ } S; int initializer7(S *s, int param) { - if (param) { // expected-note{{Taking false branch}} + if (param) { // expected-note{{Assuming 'param' is 0}} + // expected-note@-1{{Taking false branch}} s->x = 0; return 0; } Index: test/Analysis/diagnostics/no-store-func-path-notes.cpp =================================================================== --- test/Analysis/diagnostics/no-store-func-path-notes.cpp +++ test/Analysis/diagnostics/no-store-func-path-notes.cpp @@ -1,7 +1,8 @@ // RUN: %clang_analyze_cc1 -x c++ -std=c++14 -analyzer-checker=core -analyzer-output=text -verify %s int initializer1(int &p, int x) { - if (x) { // expected-note{{Taking false branch}} + if (x) { // expected-note{{Assuming 'x' is 0}} + // expected-note@-1{{Taking false branch}} p = 1; return 0; } else { @@ -19,7 +20,8 @@ struct S { int initialize(int *p, int param) { - if (param) { //expected-note{{Taking false branch}} + if (param) { // expected-note{{Assuming 'param' is 0}} + // expected-note@-1{{Taking false branch}} *p = 1; return 1; } Index: test/Analysis/diagnostics/no-store-func-path-notes.m =================================================================== --- test/Analysis/diagnostics/no-store-func-path-notes.m +++ test/Analysis/diagnostics/no-store-func-path-notes.m @@ -10,7 +10,8 @@ @implementation I - (int)initVar:(int *)var param:(int)param { - if (param) { // expected-note{{Taking false branch}} + if (param) { // expected-note{{Assuming 'param' is 0}} + // expected-note@-1{{Taking false branch}} *var = 1; return 0; } @@ -22,14 +23,16 @@ int x; //expected-note{{'x' declared without an initial value}} int out = [i initVar:&x param:0]; //expected-note{{Calling 'initVar:param:'}} //expected-note@-1{{Returning from 'initVar:param:'}} - if (out) // expected-note{{Taking true branch}} + if (out) // expected-note{{Assuming 'out' is not equal to 0}} + // expected-note@-1{{Taking true branch}} return x; //expected-warning{{Undefined or garbage value returned to caller}} //expected-note@-1{{Undefined or garbage value returned to caller}} return 0; } int initializer1(int *p, int x) { - if (x) { // expected-note{{Taking false branch}} + if (x) { // expected-note{{Assuming 'x' is 0}} + // expected-note@-1{{Taking false branch}} *p = 1; return 0; } else { Index: test/Analysis/diagnostics/undef-value-param.c =================================================================== --- test/Analysis/diagnostics/undef-value-param.c +++ test/Analysis/diagnostics/undef-value-param.c @@ -30,6 +30,7 @@ void initArray(int x, double XYZ[3]) { if (x <= 0) //expected-note {{Taking true branch}} //expected-note@-1 {{Assuming 'x' is <= 0}} + //expected-note@-2 {{Assuming 'x' is <= 0}} return; XYZ[0] = 1; XYZ[1] = 1; @@ -50,6 +51,7 @@ void initStruct(int x, struct WithFields *X) { if (x <= 0) //expected-note {{Taking true branch}} //expected-note@-1 {{Assuming 'x' is <= 0}} + //expected-note@-2 {{Assuming 'x' is <= 0}} return; //expected-note{{Returning without writing to 'X->f1'}} X->f1 = getValidPtr(); Index: test/Analysis/inline-plist.c =================================================================== --- test/Analysis/inline-plist.c +++ test/Analysis/inline-plist.c @@ -43,7 +43,8 @@ } if (p == 0) { - // expected-note@-1 {{Taking true branch}} + // expected-note@-1 {{Assuming 'p' is equal to null}} + // expected-note@-2 {{Taking true branch}} triggers_bug(p); // expected-note@-1 {{Passing null pointer value via 1st parameter 'p'}} // expected-note@-2 {{Calling 'triggers_bug'}} Index: test/Analysis/inlining/Inputs/expected-plists/path-notes.cpp.plist =================================================================== --- test/Analysis/inlining/Inputs/expected-plists/path-notes.cpp.plist +++ test/Analysis/inlining/Inputs/expected-plists/path-notes.cpp.plist @@ -4683,6 +4683,35 @@ Assuming pointer value is null + kindevent + location + + line259 + col7 + file0 + + ranges + + + + line259 + col7 + file0 + + + line259 + col15 + file0 + + + + depth0 + extended_message + Assuming the condition is true + message + Assuming the condition is true + + kindcontrol edges @@ -4703,12 +4732,12 @@ end - line261 + line262 col5 file0 - line261 + line262 col7 file0 @@ -4720,7 +4749,7 @@ kindevent location - line261 + line262 col5 file0 @@ -4728,12 +4757,12 @@ - line261 + line262 col5 file0 - line261 + line262 col7 file0 @@ -4754,10 +4783,10 @@ issue_hash_content_of_line_in_context8b577b362ffa5a7290d00d03635c1fca issue_context_kindfunction issue_contexttestDeclRefExprToReferenceInGetDerefExpr - issue_hash_function_offset8 + issue_hash_function_offset9 location - line261 + line262 col5 file0 @@ -4768,7 +4797,7 @@ 253 254 259 - 261 + 262 @@ -4783,12 +4812,12 @@ start - line273 + line274 col3 file0 - line273 + line274 col8 file0 @@ -4796,12 +4825,12 @@ end - line273 + line274 col10 file0 - line273 + line274 col38 file0 @@ -4813,7 +4842,7 @@ kindevent location - line273 + line274 col10 file0 @@ -4821,12 +4850,12 @@ - line273 + line274 col10 file0 - line273 + line274 col41 file0 @@ -4842,7 +4871,7 @@ kindevent location - line273 + line274 col10 file0 @@ -4850,12 +4879,12 @@ - line273 + line274 col10 file0 - line273 + line274 col41 file0 @@ -4871,7 +4900,7 @@ kindevent location - line268 + line269 col1 file0 @@ -4889,12 +4918,12 @@ start - line268 + line269 col1 file0 - line268 + line269 col3 file0 @@ -4902,12 +4931,12 @@ end - line269 + line270 col13 file0 - line269 + line270 col13 file0 @@ -4919,7 +4948,7 @@ kindevent location - line269 + line270 col13 file0 @@ -4927,12 +4956,12 @@ - line269 + line270 col10 file0 - line269 + line270 col16 file0 @@ -4956,7 +4985,7 @@ issue_hash_function_offset1 location - line269 + line270 col13 file0 @@ -4964,10 +4993,10 @@ 0 - 268 269 - 272 + 270 273 + 274 @@ -4978,7 +5007,7 @@ kindevent location - line296 + line297 col5 file0 @@ -4986,12 +5015,12 @@ - line296 + line297 col5 file0 - line296 + line297 col16 file0 @@ -5007,7 +5036,7 @@ kindevent location - line289 + line290 col5 file0 @@ -5025,12 +5054,12 @@ start - line289 + line290 col5 file0 - line289 + line290 col5 file0 @@ -5038,12 +5067,12 @@ end - line290 + line291 col7 file0 - line290 + line291 col12 file0 @@ -5055,7 +5084,7 @@ kindevent location - line290 + line291 col7 file0 @@ -5063,12 +5092,12 @@ - line290 + line291 col7 file0 - line290 + line291 col18 file0 @@ -5084,7 +5113,7 @@ kindevent location - line280 + line281 col5 file0 @@ -5102,12 +5131,12 @@ start - line280 + line281 col5 file0 - line280 + line281 col5 file0 @@ -5115,12 +5144,12 @@ end - line281 + line282 col7 file0 - line281 + line282 col7 file0 @@ -5136,12 +5165,12 @@ start - line281 + line282 col7 file0 - line281 + line282 col7 file0 @@ -5149,12 +5178,12 @@ end - line281 + line282 col26 file0 - line281 + line282 col26 file0 @@ -5166,7 +5195,7 @@ kindevent location - line281 + line282 col26 file0 @@ -5174,12 +5203,12 @@ - line281 + line282 col7 file0 - line281 + line282 col28 file0 @@ -5201,7 +5230,7 @@ issue_hash_function_offset1 location - line281 + line282 col26 file0 @@ -5209,12 +5238,12 @@ 0 - 280 281 - 289 + 282 290 - 295 + 291 296 + 297 @@ -5224,4 +5253,4 @@ /clang/test/Analysis/inlining/path-notes.cpp - + \ No newline at end of file Index: test/Analysis/inlining/path-notes.cpp =================================================================== --- test/Analysis/inlining/path-notes.cpp +++ test/Analysis/inlining/path-notes.cpp @@ -257,7 +257,8 @@ // However, this is not checked at runtime, so this branch is actually // possible. if (&val == 0) { //expected-note {{Assuming pointer value is null}} - // expected-note@-1 {{Taking true branch}} + // expected-note@-1 {{Assuming the condition is true}} + // expected-note@-2 {{Taking true branch}} val.bar(); // expected-warning {{Called C++ object pointer is null}} // expected-note@-1 {{Called C++ object pointer is null}} } Index: test/Analysis/keychainAPI-diagnostic-visitor.m =================================================================== --- test/Analysis/keychainAPI-diagnostic-visitor.m +++ test/Analysis/keychainAPI-diagnostic-visitor.m @@ -27,7 +27,7 @@ char *x; st = SecKeychainItemCopyContent(2, ptr, ptr, &length, (void **)&bytes); // expected-note {{Data is allocated here}} x = bytes; - if (st == noErr) // expected-note {{Assuming 'st' is equal to noErr}} // expected-note{{Taking true branch}} + if (st == noErr) // expected-note {{Assuming 'st' is equal to noErr}} // expected-note {{Assuming 'st' is equal to noErr}} // expected-note{{Taking true branch}} x = bytes;; length++; // expected-warning {{Allocated data is not released}} // expected-note{{Allocated data is not released}} Index: test/Analysis/method-call-path-notes.cpp =================================================================== --- test/Analysis/method-call-path-notes.cpp +++ test/Analysis/method-call-path-notes.cpp @@ -26,7 +26,7 @@ } void test_ic_null(TestInstanceCall *p) { - if (!p) // expected-note {{Assuming 'p' is null}} expected-note {{Taking true branch}} + if (!p) // expected-note {{Assuming 'p' is null}} expected-note {{Assuming 'p' is null}} expected-note {{Taking true branch}} p->foo(); // expected-warning {{Called C++ object pointer is null}} expected-note{{Called C++ object pointer is null}} } @@ -38,7 +38,7 @@ } void test_cast(const TestInstanceCall *p) { - if (!p) // expected-note {{Assuming 'p' is null}} expected-note {{Taking true branch}} + if (!p) // expected-note {{Assuming 'p' is null}} expected-note {{Assuming 'p' is null}} expected-note {{Taking true branch}} const_cast(p)->foo(); // expected-warning {{Called C++ object pointer is null}} expected-note {{Called C++ object pointer is null}} } Index: test/Analysis/new-ctor-malloc.cpp =================================================================== --- test/Analysis/new-ctor-malloc.cpp +++ test/Analysis/new-ctor-malloc.cpp @@ -9,7 +9,8 @@ void *operator new(size_t size) throw() { void *x = malloc(size); // expected-note {{Memory is allocated}} if (!x) // expected-note {{Assuming 'x' is non-null}} - // expected-note@-1 {{Taking false branch}} + // expected-note@-1 {{Assuming 'x' is non-null}} + // expected-note@-2 {{Taking false branch}} return nullptr; return x; } Index: test/Analysis/non-diagnosable-assumptions.c =================================================================== --- test/Analysis/non-diagnosable-assumptions.c +++ test/Analysis/non-diagnosable-assumptions.c @@ -39,7 +39,8 @@ void test_exclamation_mark() { if (!non_diagnosable()) { // expected-note@-1{{Assuming the condition is true}} - // expected-note@-2{{Taking true branch}} + // expected-note@-2{{Assuming the condition is true}} + // expected-note@-3{{Taking true branch}} 1 / 0; // expected-warning@-1{{Division by zero}} // expected-note@-2{{Division by zero}} Index: test/Analysis/uninit-vals.c =================================================================== --- test/Analysis/uninit-vals.c +++ test/Analysis/uninit-vals.c @@ -64,7 +64,8 @@ void f6(int x) { int a[20]; if (x == 25) {} // expected-note{{Assuming 'x' is equal to 25}} - // expected-note@-1{{Taking true branch}} + // expected-note@-1{{Assuming 'x' is equal to 25}} + // expected-note@-2{{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/uninit-vals.m =================================================================== --- test/Analysis/uninit-vals.m +++ test/Analysis/uninit-vals.m @@ -164,7 +164,8 @@ // expected-note@-1{{TRUE}} testObj->origin = makePoint(0.0, 0.0); - if (testObj->size > 0) { ; } // expected-note{{Taking false branch}} + if (testObj->size > 0) { ; } // expected-note{{Assuming the condition is false}} + // expected-note@-1{{Taking false branch}} // FIXME: Assigning to 'testObj->origin' kills the default binding for the // whole region, meaning that we've forgotten that testObj->size should also @@ -218,10 +219,14 @@ // expected-note@-1{{TRUE}} testObj->origin = makeIntPoint(1, 2); - if (testObj->size > 0) { ; } // expected-note{{Taking false branch}} - // expected-note@-1{{Taking false branch}} - // expected-note@-2{{Taking false branch}} - // expected-note@-3{{Taking false branch}} + if (testObj->size > 0) { ; } // expected-note{{Assuming the condition is false}} + // expected-note@-1{{Assuming the condition is false}} + // expected-note@-2{{Assuming the condition is false}} + // expected-note@-3{{Assuming the condition is false}} + // expected-note@-4{{Taking false branch}} + // expected-note@-5{{Taking false branch}} + // expected-note@-6{{Taking false branch}} + // expected-note@-7{{Taking false branch}} // FIXME: Assigning to 'testObj->origin' kills the default binding for the // whole region, meaning that we've forgotten that testObj->size should also @@ -316,9 +321,12 @@ // expected-note@-1{{TRUE}} testObj->origin = makeIntPoint2D(1, 2); - if (testObj->size > 0) { ; } // expected-note{{Taking false branch}} - // expected-note@-1{{Taking false branch}} - // expected-note@-2{{Taking false branch}} + if (testObj->size > 0) { ; } // expected-note{{Assuming the condition is false}} + // expected-note@-1{{Assuming the condition is false}} + // expected-note@-2{{Assuming the condition is false}} + // expected-note@-3{{Taking false branch}} + // expected-note@-4{{Taking false branch}} + // expected-note@-5{{Taking false branch}} clang_analyzer_eval(testObj->size == 0); // expected-warning{{TRUE}} // expected-note@-1{{TRUE}} Index: test/Analysis/virtualcall.cpp =================================================================== --- test/Analysis/virtualcall.cpp +++ test/Analysis/virtualcall.cpp @@ -164,8 +164,10 @@ X(int i) { if (i > 0) { #if !PUREONLY - // expected-note-re@-2 {{{{^}}Taking true branch}} - // expected-note-re@-3 {{{{^}}Taking false branch}} + // expected-note-re@-2 {{{{^}}Assuming 'i' is > 0}} + // expected-note-re@-3 {{{{^}}Taking true branch}} + // expected-note-re@-4 {{{{^}}Assuming 'i' is <= 0}} + // expected-note-re@-5 {{{{^}}Taking false branch}} #endif X x(i - 1); #if !PUREONLY