[PATCH] D126676: [clang] Disallow differences in defines used for creating and using PCH

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 11 14:08:49 PDT 2022


rnk added subscribers: arphaman, dexonsmith.
rnk added a comment.

Seeking additional opinions on the PCH change: @dexonsmith @arphaman

The use case makes sense to me. It seems reasonable to me that the compiler shouldn't use the same PCH file with mismatched defines on the command line.



================
Comment at: clang/lib/Serialization/ASTReader.cpp:640-641
                                      const LangOptions &LangOpts,
-                                     bool Validate = true) {
+                                     bool Validate = true,
+                                     bool ValidateStrict = false) {
   // Check macro definitions.
----------------
These feel like they should be a "validation level" enum. Multiple optional boolean parameters in sequence is usually a hazard for future refactorings.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126676/new/

https://reviews.llvm.org/D126676



More information about the cfe-commits mailing list