Change the warning produced for subtraction from (or with) a null pointer
to only be produced when the code path is live.
Respond to review comments: add cpp test.
Paths
| Differential D126816
Only issue warning for subtraction involving null pointers on live code paths ClosedPublic Authored by jamieschmeiser on Jun 1 2022, 1:20 PM.
Details Summary Change the warning produced for subtraction from (or with) a null pointer Respond to review comments: add cpp test.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Jun 1 2022, 1:28 PM Comment Actions So far the tests in pointer-subtraction.c are mirrored in pointer-subtraction.cpp - worth continuing to do? This revision was landed with ongoing or failed builds.Jun 3 2022, 7:12 AM Closed by commit rGefbf0136b410: Only issue warning for subtraction involving null pointers on live code paths (authored by jamieschmeiser). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 434016 clang/lib/Sema/SemaExpr.cpp
clang/test/Sema/pointer-subtraction.c
clang/test/Sema/pointer-subtraction.cpp
|