aaron.ballman added a comment.

Generally looks good to me, but there were a few minor things. Do you need 
someone to commit on your behalf once those are addressed? If so, what name and 
email address would you like used for patch attribution?



================
Comment at: clang/docs/ReleaseNotes.rst:343
+  ``__builtin_assume_aligned``.
+  (`#62305 <https://github.com/llvm/llvm-project/issues/62305>`)
 
----------------



================
Comment at: clang/lib/Sema/SemaChecking.cpp:7982-7983
         DefaultFunctionArrayLvalueConversion(FirstArg);
-    if (FirstArgResult.isInvalid())
+    /// Type-check first argument normally.
+    if (checkBuiltinArgument(*this, TheCall, 0))
       return true;
----------------
The comment doesn't really add too much value, so removing it.


================
Comment at: clang/test/Sema/builtin-assume-aligned.c:79
+
+int test15(int *b) {
+  int arr[3] = {1, 2, 3};
----------------
yronglin wrote:
> Please add a test for function type
+1, test to make sure function to pointer decay happens.


================
Comment at: clang/test/Sema/builtin-assume-aligned.c:75
+int test14(int *a, int b) {
+  a = (int *)__builtin_assume_aligned(b, 32); // expected-error {{passing 
'int' to parameter of incompatible type 'int *'}}
+  return a[0];
----------------
barannikov88 wrote:
> The expected type is not `int *`, it is `cost void *` (according to the 
> definition of the builtin in Builtins.def).
> 
The GCC documentation for this builtin says `const void *`, Clang has no 
documentation for this one specifically.


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

https://reviews.llvm.org/D149514

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

Reply via email to