From c5034dec1811f82237f417e1ab4443e21fd5d600 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Fri, 12 Feb 2016 01:54:57 +0000 Subject: [PATCH] ReleaseNotes: __builtin_object_size and overloadable; by George Burgess IV git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_38@260642 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/ReleaseNotes.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 834add17b4..a5dfb562c8 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -82,8 +82,41 @@ Clang's support for building native Windows programs ... 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 ^^^^^^^^^^^^^^^^^^^ -- 2.50.1