Author: Martin Storsjö
Date: 2022-07-09T00:11:45+03:00
New Revision: b069801ffb6d11143c2b611a220827120113c7a1

URL: 
https://github.com/llvm/llvm-project/commit/b069801ffb6d11143c2b611a220827120113c7a1
DIFF: 
https://github.com/llvm/llvm-project/commit/b069801ffb6d11143c2b611a220827120113c7a1.diff

LOG: [clang] [Serialization] Fix swapped PPOpts/ExistingPPOpts parameters. NFC.

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

Added: 
    

Modified: 
    clang/lib/Serialization/ASTReader.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Serialization/ASTReader.cpp 
b/clang/lib/Serialization/ASTReader.cpp
index 096f4a5514b17..bb98660717e70 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -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);
     }
   };
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to