[cfe-dev] Query regarding MinimalAction class not found in scope for clang 2.8

Eli Friedman eli.friedman at gmail.com
Tue Apr 5 11:10:05 PDT 2011


On Tue, Apr 5, 2011 at 2:14 AM, Vivek Kulkarni <viveksck at gmail.com> wrote:
> Hi Eli,
> Thanks a lot for the reply. I am trying to write a small source to source
> translation application. Basically I want to change all invocations of a
> function say foo to now take a extra parameter which I want to pass and was
> investigating the utility of CLANG.

Oh... that's pretty straightforward with the rewriter in clang;
RewriteObjC.cpp in the source tree should serve as an example of that
sort of ASTConsumer+ASTFrontendAction, and the clang-interpreter
example in examples/ in the source tree shows how to run an
FrontendAction.  There isn't really a good tutorial at the moment...

-Eli

> Thanks.
> Vivek.
>
> On Sat, Apr 2, 2011 at 2:22 AM, Eli Friedman <eli.friedman at gmail.com> wrote:
>>
>> On Fri, Apr 1, 2011 at 2:30 AM, Vivek Kulkarni <viveksck at gmail.com> wrote:
>> >
>> >
>> >> Hi All,
>> >> I am trying to get clang working for parsing AS and trying this
>> >> Tutorial
>> >> here.http://amnoid.de/tmp/clangtut/tut.html
>> >>
>> >> IdentifierTable tab(context.opts);
>> >>
>> >> MinimalAction action(tab);
>> >> Parser p(context.pp, action);
>> >> p.ParseTranslationUnit();
>> >>
>> >> I am unable to find class MinimalAction in clang 2.8. Has this been
>> >> deprecated. Is there a replacement provided for this class ?
>>
>> MinimalAction was taken out because the rigid separation between
>> Parser and Sema was causing code to be more complicated than it needed
>> to be, and it didn't seem very useful in practice.  What are you
>> trying to do?
>>
>> On a side note, although the concepts are probably still mostly
>> accurate, I wouldn't trust any sample code that's over two years old;
>> clang has changed a lot since then.
>>
>> -Eli
>
>
>
> --
> Vivek-
> The bitterest words cried over graves are of words left unsaid and deeds
> left undone
>




More information about the cfe-dev mailing list