[llvm-branch-commits] [cfe-branch] r260642 - ReleaseNotes: __builtin_object_size and overloadable; by George Burgess IV

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 11 17:54:57 PST 2016


Author: hans
Date: Thu Feb 11 19:54:57 2016
New Revision: 260642

URL: http://llvm.org/viewvc/llvm-project?rev=260642&view=rev
Log:
ReleaseNotes: __builtin_object_size and overloadable; by George Burgess IV

Modified:
    cfe/branches/release_38/docs/ReleaseNotes.rst

Modified: cfe/branches/release_38/docs/ReleaseNotes.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_38/docs/ReleaseNotes.rst?rev=260642&r1=260641&r2=260642&view=diff
==============================================================================
--- cfe/branches/release_38/docs/ReleaseNotes.rst (original)
+++ cfe/branches/release_38/docs/ReleaseNotes.rst Thu Feb 11 19:54:57 2016
@@ -82,8 +82,41 @@ Clang's support for building native Wind
 C Language Changes in Clang
 ---------------------------
 
+Better support for ``__builtin_object_size``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Clang 3.8 has expanded support for the ``__builtin_object_size`` intrinsic.
+Specifically, ``__builtin_object_size`` will now fail less often when you're
+trying to get the size of a subobject. Additionally, the ``pass_object_size``
+attribute was added, which allows ``__builtin_object_size`` to successfully
+report the size of function parameters, without requiring that the function be
+inlined.
+
+
+``overloadable`` attribute relaxations
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Previously, functions marked ``overloadable`` in C would strictly use C++'s
+type conversion rules, so the following code would not compile:
+
+.. code-block:: c
+
+  void foo(char *bar, char *baz) __attribute__((overloadable));
+  void foo(char *bar) __attribute__((overloadable));
+
+  void callFoo() {
+    int a;
+    foo(&a);
+  }
+
+Now, Clang is able to selectively use C's type conversion rules during overload
+resolution in C, which allows the above example to compile (albeit potentially
+with a warning about an implicit conversion from ``int*`` to ``char*``).
+
+
 ...
 
+
 C11 Feature Support
 ^^^^^^^^^^^^^^^^^^^
 




More information about the llvm-branch-commits mailing list