[clang] [Serialization] Fix swapped PPOpts/ExistingPPOpts parameters. NFC.
authorMartin Storsjö <martin@martin.st>
Wed, 25 May 2022 12:07:18 +0000 (15:07 +0300)
committerMartin Storsjö <martin@martin.st>
Fri, 8 Jul 2022 21:11:45 +0000 (00:11 +0300)
The two first parameters of checkPreprocessorOptions are "PPOpts, ExistingPPOpts".
All other callers of the function pass them consistently.

This avoids confusion when working on the code.

Differential Revision: https://reviews.llvm.org/D129277

clang/lib/Serialization/ASTReader.cpp

index 096f4a5..bb98660 100644 (file)
@@ -5171,8 +5171,9 @@ namespace {
     bool ReadPreprocessorOptions(const PreprocessorOptions &PPOpts,
                                  bool Complain,
                                  std::string &SuggestedPredefines) override {
-      return checkPreprocessorOptions(ExistingPPOpts, PPOpts, nullptr, FileMgr,
-                                      SuggestedPredefines, ExistingLangOpts);
+      return checkPreprocessorOptions(PPOpts, ExistingPPOpts, /*Diags=*/nullptr,
+                                      FileMgr, SuggestedPredefines,
+                                      ExistingLangOpts);
     }
   };