[PATCH] D40574: Bounds check argument_with_type_tag attribute.

Matt Davis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 29 11:26:30 PST 2017


mattd marked 6 inline comments as done.
mattd added inline comments.


================
Comment at: test/Sema/error-type-safety.cpp:3-4
+
+static const int test_void
+  __attribute__((type_tag_for_datatype(test, void))) = 0;
+
----------------
aaron.ballman wrote:
> Is this declaration necessary?
Hi Aaron, thanks for the input.  Yes, defining the tag is necessary in order to test the argument index.  If the type tag is not satisfied, the code path checking argument tag index will never be reached.  My update will test the bounds and is a little more comprehensive.


https://reviews.llvm.org/D40574





More information about the cfe-commits mailing list