[cfe-commits] [PATCH] add support for "naked" attribute
eli.friedman at gmail.com
Tue Sep 15 14:30:37 PDT 2009
On Tue, Sep 15, 2009 at 2:18 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
> On Sep 15, 2009, at 2:09 PM, Sylvere Teissier wrote:
>> Index: test/CodeGen/attr-naked.c
>> --- test/CodeGen/attr-naked.c (révision 0)
>> +++ test/CodeGen/attr-naked.c (révision 0)
>> @@ -0,0 +1,9 @@
>> +// RUN: clang-cc -g -emit-llvm -o %t %s &&
>> +// RUN: grep 'naked' %t
>> +void t1() __attribute__((naked));
>> +void t1()
> It would be useful if your test case shows effect of specifying this
> attribute on a function declaration.
> - Fariborz
There should already be LLVM tests for that; I don't think going past
-emit-llvm is necessary.
The test is bad form, though. The string for the grep should be
longer than just "naked", to make sure it isn't picking up, for
example, the name of the test file. New tests shouldn't use temporary
files for grepping; if a single grep isn't enough, use FileCheck.
Passing -g seems unnecessary for this test.
The patch itself looks fine, though.
More information about the cfe-commits