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

LGTM aside from two small style nits with the new test file.



================
Comment at: test/SemaCXX/alloc-size.cpp:6
+  int alloc(int) __attribute__((alloc_size(2))); // 
expected-warning{{'alloc_size' attribute only applies to return values that are 
pointers}}
+  void* alloc2(int) __attribute__((alloc_size(1))); // 
expected-error{{'alloc_size' attribute is invalid for the implicit this 
argument}}
+  void* alloc3(int) __attribute__((alloc_size(2))); // fine
----------------
Can you run this new test file through clang-format?


================
Comment at: test/SemaCXX/alloc-size.cpp:21
+// We should not be warning when assigning function pointers with and without 
the alloc size attribute
+// since it doesn't change the type of the function
+typedef void * (__attribute__((alloc_size(1))) * 
my_malloc_fn_pointer_type)(int);
----------------
Add a full stop at the end of the sentence.


Repository:
  rC Clang

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

https://reviews.llvm.org/D55212



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to