[cfe-dev] Language not recognized: 'c++-module-cpp-output'

Boris Kolpackov via cfe-dev cfe-dev at lists.llvm.org
Tue Jun 6 04:55:44 PDT 2017


Hi Richard,

Richard Smith <richard at metafoo.co.uk> writes:

> For us at least, this would add complexity (by adding a "no preprocessing"
> mode) and likely not actually bring about any performance improvement --
> the additional checks for "does this identifier have a defined macro" and
> "is this a # at the start of a line" are extremely cheap.

Yes, you are probably right.


> Plus, as you mentioned above, this actually isn't what you want -- for
> compilers like Clang (and recent versions of GCC) that take into account
> the provenance of tokens (via macro expansion etc) when issuing diagnostics,
> preprocessing prior to compilation proper harms the quality of experience
> of your users.

The scenario I had in mind for -cpp-output is translation units that no
longer use the preprocessor, not previously-preprocessed (to certain
degree) units. Think of a C++ source file that uses module imports
instead of #include's, [[assert:]] instead of assert(), etc.

Boris



More information about the cfe-dev mailing list