[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

Marc-Andre Laperle via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 14 07:13:02 PST 2017

malaperle requested changes to this revision.
malaperle added inline comments.
This revision now requires changes to proceed.

Comment at: include/clang/Frontend/PrecompiledPreamble.h:263
                                   const MacroDirective *MD);
+  /// Adds list of Preprocessor callbacks so we can also process information
+  /// about includes that are outside of a preamble i.e in the middle of a file
It doesn't add, it creates.It's also not a "list". Is it true that it will process includes outside the preamble? I would think building the preamble stopped at the end of the preamble.

Comment at: lib/Frontend/PrecompiledPreamble.cpp:354
+  if (Callbacks.createPPCallbacks())
+    Clang->getPreprocessor().addPPCallbacks(std::move(Callbacks.createPPCallbacks()));
extract this to a local variable

  rC Clang


More information about the cfe-commits mailing list