[PATCH] Preprocessor: Move IncrementalProcessing to PreprocessorOptions

Vassil Vassilev vvasilev at cern.ch
Tue Feb 17 01:28:18 PST 2015


On 17/02/15 02:02, Sterling Augustine wrote:
> Hello,
>
> I'm working on a change that will enable a client to build an AST from
> an input file, and then, based on the contents of that AST, add
> additional tokens to be parsed. Richard Smith recommended adding a
> feature to the parser to do this, but it turns out that there is
> something quite close already: the IncrementalProcessing option, added
> in r152914.
>
> The enclosed patch moves the IncrementalProcessing from a Preprocessor
> field--which is only accessible once the preprocessor is actually
> built--into the PreprocessorOptions which is available to other
> interfaces which don't expose the preprocessor itself, such as the
> compiler invocation.
The patch LGTM.
>
> There is only minimal testing of this feature inside
> FrontendActionTest.cpp, but I have updated that as well. I will add
> tests to exercise it more thoroughly once I know that this direction
> is acceptable. The test itself uses two terms, calling it both
> "IncrementalParsing" and "IncrementalProcessing". Not sure if that is
> intentional or not.
The reason we went for IncrementalProcessing is that it does more than 
just parsing, it allows clang to be able to continue working even upon 
seeing an EOF token.
Could you also add a test case maybe closer to your planned use-case?
Thanks,
Vassil
>
> Sterling
>
> [with cc's to original contributor of the IncrmentalProcessing Axel Naumann]
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


-- 
--------------------------------------------
Q: Why is this email five sentences or less?
A: http://five.sentenc.es

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150217/ff6f98f6/attachment.html>


More information about the cfe-commits mailing list