[PATCH] Implement nonnull-attribute sanitizer

Alexey Samsonov vonosmas at gmail.com
Fri Sep 5 14:45:52 PDT 2014


================
Comment at: projects/compiler-rt/lib/ubsan/ubsan_handlers.cc:365
@@ +364,3 @@
+  if (!Data->DeclLoc.isInvalid())
+    Diag(Data->DeclLoc, DL_Note, "function declared here");
+}
----------------
rsmith wrote:
> It would seem better to point to the attribute rather than just to the function.
Done.

Side note: do you it makes sense to provide source location of returns_nonnull attribute as well? (I'd say it could make sense, as attribute is attached to function declaration, which might be in a completely different where definition is).

http://reviews.llvm.org/D5082






More information about the cfe-commits mailing list