[PATCH] Preprocessor: Move IncrementalProcessing to PreprocessorOptions
vvasilev at cern.ch
Tue Feb 17 01:28:18 PST 2015
On 17/02/15 02:02, Sterling Augustine wrote:
> 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?
> [with cc's to original contributor of the IncrmentalProcessing Axel Naumann]
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
Q: Why is this email five sentences or less?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits