[PATCH] D107051: [clang][analyzer] Improve bug report in alpha.security.ReturnPtrRange

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 5 09:18:28 PDT 2021


steakhal accepted this revision.
steakhal added a comment.
This revision is now accepted and ready to land.

Aside from the inline nit, I think it's good to go.
Let some time for the others to catch up, they might have objections.



================
Comment at: clang/test/Analysis/return-ptr-range.cpp:17
       return arr; // no-warning
-  } while (0);
-  return ptr; // expected-warning{{Returned pointer value points outside the original object (potential buffer overflow)}}
+  }
+  return ptr; // expected-warning{{Returned pointer value points outside the original object (potential buffer overflow) [alpha.security.ReturnPtrRange]}}
----------------
I don't think we need this extra scope. Same for the others.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107051/new/

https://reviews.llvm.org/D107051



More information about the cfe-commits mailing list