Author: Chen Miao
Date: 2026-11-07T21:05:27+08:00
New Revision: 3e67bd5ef798937eea020cc6cc002f4f172dfa94

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

LOG: [clang][Lex][NFC] Remove unused ModuleDeclLoc (#239947)

`ModuleDeclLoc` is assigned but never read.

Added: 
    

Modified: 
    clang/include/clang/Lex/Preprocessor.h
    clang/lib/Lex/Preprocessor.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Lex/Preprocessor.h 
b/clang/include/clang/Lex/Preprocessor.h
index 31b68a0fd0670e..2d0c24b92334a3 100644
--- a/clang/include/clang/Lex/Preprocessor.h
+++ b/clang/include/clang/Lex/Preprocessor.h
@@ -376,10 +376,6 @@ class Preprocessor {
   /// lexed, if any.
   SourceLocation ModuleImportLoc;
 
-  /// The source location of the \c module contextual keyword we just
-  /// lexed, if any.
-  SourceLocation ModuleDeclLoc;
-
   llvm::DenseMap<FileID, SmallVector<const char *>> CheckPoints;
   unsigned CheckPointCounter = 0;
 

diff  --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index a8717424f1d155..d3a56f726b7b85 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -1424,7 +1424,6 @@ bool Preprocessor::HandleModuleContextualKeyword(Token 
&Result) {
         LookUpIdentifierInfo(*NextTok);
       if (NextTok->isOneOf(tok::identifier, tok::colon, tok::semi)) {
         Result.setKind(tok::kw_module);
-        ModuleDeclLoc = Result.getLocation();
         return true;
       }
     }


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to