[PATCH] Preprocessor: Move IncrementalProcessing to PreprocessorOptions

Sterling Augustine saugustine at google.com
Mon Feb 16 17:02:54 PST 2015


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.

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.

Sterling

[with cc's to original contributor of the IncrmentalProcessing Axel Naumann]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: incremental_processing.patch
Type: text/x-patch
Size: 5934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150216/a3c30a16/attachment.bin>


More information about the cfe-commits mailing list