)]}' { "commit": "9772bf511a32353fad73e38fdfc501d5fccb50d2", "tree": "4d27cac259d5c42947fd03414982a1c04b50b6c1", "parents": [ "da9df754b12fb0d930a242b1b10b3438b7c75666" ], "author": { "name": "Devin Coughlin", "email": "dcoughlin@apple.com", "time": "Wed Mar 01 17:48:39 2017 +0000" }, "committer": { "name": "Devin Coughlin", "email": "dcoughlin@apple.com", "time": "Wed Mar 01 10:49:29 2017 -0800" }, "message": "[analyzer] pr32088: Don\u0027t destroy the temporary if its initializer causes return.\n\nIn the following code involving GNU statement-expression extension:\n struct S {\n ~S();\n };\n\n void foo() {\n const S \u0026x \u003d ({ return; S(); });\n }\nfunction \u0027foo()\u0027 returns before reference x is initialized. We shouldn\u0027t call\nthe destructor for the temporary object lifetime-extended by \u0027x\u0027 in this case,\nbecause the object never gets constructed in the first place.\n\nThe real problem is probably in the CFG somewhere, so this is a quick-and-dirty\nhotfix rather than the perfect solution.\n\nA patch by Artem Dergachev!\n\nrdar://problem/30759076\n\nDifferential Revision: https://reviews.llvm.org/D30499\n\ngit-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296646 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit 162132fe03c8c2b02735f2adfd4e2dc421488006)\n\nIntegration into swift-3.1-branch is tracked by rdar://problem/30784915\n", "tree_diff": [ { "type": "modify", "old_id": "b059060b1ac323674d9a1b16280fa1ca97e7834d", "old_mode": 33188, "old_path": "lib/StaticAnalyzer/Core/ExprEngine.cpp", "new_id": "5010245a9a9b55108d32aeb73c16618dede175e6", "new_mode": 33188, "new_path": "lib/StaticAnalyzer/Core/ExprEngine.cpp" }, { "type": "modify", "old_id": "49cf070177fc2699ae5e5cd2e6efa04ab09edc7f", "old_mode": 33188, "old_path": "test/Analysis/temporaries.cpp", "new_id": "cc39201b0c3a68fb00caab83b48ab67fd1389a1d", "new_mode": 33188, "new_path": "test/Analysis/temporaries.cpp" } ] }