[cfe-dev] How to disable the generation of TypedefDecl for __builtin_va_list

Chengnian Sun via cfe-dev cfe-dev at lists.llvm.org
Mon Feb 22 15:46:30 PST 2016


I want to randomly remove the variable declaration "a" or "b" from the
source file. There are two ways to do this.
    1) I can pretty print the VarDecl of "a" and "b". However, these three
builtin typedefs mentioned above make the modified source file not
compilable, as the _builtin_va_list is not defined.
    2) I can use rewriter to change the source file. However, as both "a"
and "b" are declared in one statement, removing either of them makes the
deletion complex.

I think another way to do this is to separate the statement "int a, b;"
into "int a; int b". Any existing functionality in clang to do this?

Thank you. Any advice is appreciated.



On Mon, Feb 22, 2016 at 3:30 PM, Meador Inge <meadori at gmail.com> wrote:

> On Mon, Feb 22, 2016 at 11:15 AM, Chengnian Sun via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
> Hi,
>>
>> I found out that for the following code (only containing two variable
>> declarations), clang will generate three internal typedef declarations. Is
>> there any way to disable the generation of the three typedef?
>>
>
> Not that I know of.  What problem are you trying to solve by disabling
> them?
>
> -- Meador
>



-- 
Best Regards.

Chengnian SUN.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160222/31191be5/attachment.html>


More information about the cfe-dev mailing list