)]}' { "commit": "dd8d537de46b54909c527de66157547af48310b4", "tree": "566cf2ab9d4aa6381bb5c5dbc07dcd6e6b099a7b", "parents": [ "3d74bf9f5fd29b16bf3887b6416505a811cbb92c" ], "author": { "name": "Yuanfang Chen", "email": "yuanfang.chen@sony.com", "time": "Wed Mar 24 16:03:13 2021 -0700" }, "committer": { "name": "Copybara-Service", "email": "copybara-worker@google.com", "time": "Thu Mar 25 13:19:38 2021 -0700" }, "message": "[Clang][Sema] Implement GCC -Wcast-function-type\n\n```\nWarn when a function pointer is cast to an incompatible function\npointer. In a cast involving function types with a variable argument\nlist only the types of initial arguments that are provided are\nconsidered. Any parameter of pointer-type matches any other\npointer-type. Any benign differences in integral types are ignored, like\nint vs. long on ILP32 targets. Likewise type qualifiers are ignored. The\nfunction type void (*) (void) is special and matches everything, which\ncan be used to suppress this warning. In a cast involving pointer to\nmember types this warning warns whenever the type cast is changing the\npointer to member type. This warning is enabled by -Wextra.\n```\n\nReviewed By: rsmith\n\nDifferential Revision: https://reviews.llvm.org/D97831\n\nGitOrigin-RevId: 217f0f735afec57a51fa6f9ab863d4713a2f85e2\n", "tree_diff": [ { "type": "modify", "old_id": "04d7f74d5bfc9400c4f7bc5612118e09725eaa69", "old_mode": 33188, "old_path": "docs/DiagnosticsReference.rst", "new_id": "730077f33397aafcd2c7743263b41e0510b65a0c", "new_mode": 33188, "new_path": "docs/DiagnosticsReference.rst" }, { "type": "modify", "old_id": "291cca02694fc4094235acbea7d5897ae59111a0", "old_mode": 33188, "old_path": "include/clang/Basic/DiagnosticGroups.td", "new_id": "85f798013a3d41741308ed0d37d649b19cfae32a", "new_mode": 33188, "new_path": "include/clang/Basic/DiagnosticGroups.td" }, { "type": "modify", "old_id": "58e221a0046899212b3b9ee375c518b24c406db5", "old_mode": 33188, "old_path": "include/clang/Basic/DiagnosticSemaKinds.td", "new_id": "df2f79a4f34416b6764066ed750ab66288a7187e", "new_mode": 33188, "new_path": "include/clang/Basic/DiagnosticSemaKinds.td" }, { "type": "modify", "old_id": "22ec2c7ed8bbfdca207fb5c5290a2b39f459a9f9", "old_mode": 33188, "old_path": "lib/Sema/SemaCast.cpp", "new_id": "719cbf46bd5c26041183ffbdcc8a17d46d8bbd92", "new_mode": 33188, "new_path": "lib/Sema/SemaCast.cpp" }, { "type": "add", "old_id": "0000000000000000000000000000000000000000", "old_mode": 0, "old_path": "/dev/null", "new_id": "e2572210c1370e8d88a87e2382e0fb81cd8e464d", "new_mode": 33188, "new_path": "test/Sema/warn-cast-function-type.c" }, { "type": "add", "old_id": "0000000000000000000000000000000000000000", "old_mode": 0, "old_path": "/dev/null", "new_id": "d70657dad1793ec1ff00779fbdf91e9393a708d0", "new_mode": 33188, "new_path": "test/Sema/warn-cast-function-type.cpp" } ] }