[PATCH] D34298: [ubsan] Improve diagnostics for return value checks (compiler-rt)

Filipe Cabecinhas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 13:36:55 PDT 2017


filcab added inline comments.


================
Comment at: test/ubsan/TestCases/Misc/nonnull.cpp:15
+
+__attribute__((returns_nonnull)) char *bar(int x, char *a) {
+  if (x > 10) {
----------------
vsk wrote:
> filcab wrote:
> > Shouldn't you do a similar transformation for the nullability test?
> I did update the nullability.c test. If you mean that we should have a function that looks like "bar", but with a _Nonnull return value annotation, I can add that in.
yeah, I guess there's no need for an additional one here, since we can tell it's emitting at the new place (expression for `return`), and you should already have the call emission covered in the clang part.


https://reviews.llvm.org/D34298





More information about the llvm-commits mailing list