Thanks!

Dmitry

2013/6/30 Yang Chen <[email protected]>:
> Could you attach the unreduced x.ii? I will try to investigate tomorrow.
> Thanks!
>
> - Yang
>
>
> On 6/30/2013 4:22 AM, Дмитрий Дьяченко wrote:
>>
>> Thanks for clarification
>>
>> "clang_delta --transformation=return-void --counter=1 x.ii" solve issue
>>
>> What I do incorrectly? -- why "--transformation=return-void " is not
>> run in my case?
>>
>> Dmitry
>>
>> 2013/6/30 Yang Chen<[email protected]>:
>>>
>>> On 6/30/2013 3:43 AM, Дмитрий Дьяченко wrote:
>>>>
>>>>
>>>> Hi!
>>>>
>>>> I use creduce-git-latest
>>>>
>>>> After "creduce --sanitize --sanity-checks --sllooww x.sh x.ii" I have
>>>>
>>>> $ cat x.ii
>>>> typedef struct
>>>> {
>>>>       volatile struct
>>>>       {
>>>>       } x0;
>>>> }
>>>> x1;
>>>> int
>>>> x2 ()
>>>> {
>>>>       x1 x3 = x3;
>>>>       return 0;
>>>> }
>>>>
>>>> Looks like there are possible simplifications : definitely 1 / may be 2
>>>>
>>>> 1) remove 'return 0;' and change return type for x2() from 'int' to
>>>> 'void'
>>>>
>>>
>>> Hmm, we have a similar pass to do this, for example:
>>>
>>> $ clang_delta --transformation=return-void --counter=1 x.ii
>>>
>>>
>>> typedef struct
>>> {
>>>      volatile struct
>>>      {
>>>      } x0;
>>> }
>>> x1;
>>> void
>>>
>>> x2 ()
>>> {
>>>      x1 x3 = x3;
>>>       0;
>>> }
>>>
>>> It does almost what you said except keeping 0. The reason I chose to
>>> leave
>>> '0' is that
>>>    * in general we could have something like "return foo()", where foo()
>>> could have side-effect and may be relevant to the bug;
>>>    * if foo() is not relevant to the bug, then later pass such as
>>> pass-line
>>> can nuke it.
>>>
>>> - Yang
>
>

Attachment: x.orig.bz2
Description: BZip2 compressed data

Reply via email to