<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in attr-format.cpp</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>92edd74b - Allow non-variadic functions to be attributed with `__attribute__((format))`</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp#92edd74b</link>
        <description>Allow non-variadic functions to be attributed with `__attribute__((format))`Clang only allows you to use __attribute__((format)) on variadic functions. There are legit use cases for __attribute__((format)) on non-variadic functions, such as:(1) variadic templates```c++template&lt;typename&#8230; Args&gt;void print(const char *fmt, Args&#8230; &amp;&amp;args) __attribute__((format(1, 2))); // error: format attribute requires variadic function```(2) functions which take fixed arguments and a custom format:```c++void print_number_string(const char *fmt, unsigned number, const char *string) __attribute__((format(1, 2)));// ^error: format attribute requires variadic functionvoid foo(void) {    print_number_string(&#8220;%08x %s\n&#8221;, 0xdeadbeef, &#8220;hello&#8221;);    print_number_string(&#8220;%d %s&#8221;, 0xcafebabe, &#8220;bar&#8221;);}```This change allows Clang users to attach __attribute__((format)) to non-variadic functions, including functions with C++ variadic templates. It replaces the error with a GCC compatibility warning and improves the type checker to ensure that received arrays are treated like pointers (this is a possibility in C++ since references to template types can bind to arrays).Reviewed By: aaron.ballmanDifferential Revision: https://reviews.llvm.org/D112579rdar://84629099

            List of files:
            /llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp</description>
        <pubDate>Tue, 07 Jun 2022 22:45:07 +0000</pubDate>
        <dc:creator>F&#233;lix Cloutier &lt;fcloutier@apple.com&gt;</dc:creator>
    </item>
<item>
        <title>726d11c4 - Make sure we perform the variadic method check correctly for calls to a member operator().  PR14057.</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp#726d11c4</link>
        <description>Make sure we perform the variadic method check correctly for calls to a member operator().  PR14057.llvm-svn: 165678

            List of files:
            /llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp</description>
        <pubDate>Thu, 11 Oct 2012 00:30:58 +0000</pubDate>
        <dc:creator>Eli Friedman &lt;eli.friedman@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>1c8383dc - Fix PR8625 and correctly interpret member-calls to static members when</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp#1c8383dc</link>
        <description>Fix PR8625 and correctly interpret member-calls to static members whenproducing warnings.This feels really fragile, and I&apos;ve not audited all other argument index-basedwarnings. I suspect we&apos;ll grow this bug on another warning eventually. It mightbe nice to adjust the argument indices when building up the attribute AST node,as we already have to remember about the &apos;this&apos; argument within that code toproduce correct errors.llvm-svn: 119340

            List of files:
            /llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp</description>
        <pubDate>Tue, 16 Nov 2010 08:49:43 +0000</pubDate>
        <dc:creator>Chandler Carruth &lt;chandlerc@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>743682bb - Re-work the handling of implicit &apos;this&apos; arguments and silly GCC-style attribute</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp#743682bb</link>
        <description>Re-work the handling of implicit &apos;this&apos; arguments and silly GCC-style attributeargument indexes. This handles the offsets in a consistent manner for all ofthe attributes which I saw working with these concepts. I&apos;ve also added testsfor the attribute that motivated this: nonnull.I consolidated the tests for format attributes into one file, and fleshed themout a bit to trigger more of the warning cases. Also improved the quality ofsome of the diagnostics that occur with invalid argument indices.The only really questionable change here is supporting the implicit thisargument for the ownership attribute. I&apos;m not sure it&apos;s really a sensibleconcept there, but implemented the logic for consistency.llvm-svn: 119339

            List of files:
            /llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp</description>
        <pubDate>Tue, 16 Nov 2010 08:35:43 +0000</pubDate>
        <dc:creator>Chandler Carruth &lt;chandlerc@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>8fbe78f6 - Update tests to use %clang_cc1 instead of &apos;clang-cc&apos; or &apos;clang -cc1&apos;.</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp#8fbe78f6</link>
        <description>Update tests to use %clang_cc1 instead of &apos;clang-cc&apos; or &apos;clang -cc1&apos;. - This is designed to make it obvious that %clang_cc1 is a &quot;test variable&quot;   which is substituted. It is &apos;%clang_cc1&apos; instead of &apos;%clang -cc1&apos; because it   can be useful to redefine what gets run as &apos;clang -cc1&apos; (for example, to set   a default target).llvm-svn: 91446

            List of files:
            /llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp</description>
        <pubDate>Tue, 15 Dec 2009 20:14:24 +0000</pubDate>
        <dc:creator>Daniel Dunbar &lt;daniel@zuster.org&gt;</dc:creator>
    </item>
<item>
        <title>11289f42 - Remove tabs, and whitespace cleanups.</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp#11289f42</link>
        <description>Remove tabs, and whitespace cleanups.llvm-svn: 81346

            List of files:
            /llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp</description>
        <pubDate>Wed, 09 Sep 2009 15:08:12 +0000</pubDate>
        <dc:creator>Mike Stump &lt;mrs@apple.com&gt;</dc:creator>
    </item>
<item>
        <title>be96bc94 - Handle the implicit &apos;this&apos; parameter for format attributes.</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp#be96bc94</link>
        <description>Handle the implicit &apos;this&apos; parameter for format attributes.llvm-svn: 79987

            List of files:
            /llvm-project-15.0.7/clang/test/SemaCXX/attr-format.cpp</description>
        <pubDate>Tue, 25 Aug 2009 14:12:34 +0000</pubDate>
        <dc:creator>Anders Carlsson &lt;andersca@mac.com&gt;</dc:creator>
    </item>
</channel>
</rss>
