Skip to content

Conversation

@mpark
Copy link
Member

@mpark mpark commented Dec 16, 2025

No description provided.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:modules C++20 modules and Clang Header Modules labels Dec 16, 2025
@llvmbot
Copy link
Member

llvmbot commented Dec 16, 2025

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-modules

Author: Michael Park (mpark)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/172524.diff

2 Files Affected:

  • (modified) clang/lib/Serialization/ASTWriter.cpp (+1-1)
  • (modified) clang/test/CXX/module/module.reach/p5.cpp (+1-1)
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 899fd69c2045e..0638f2c4efbe8 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -4641,7 +4641,7 @@ uint64_t ASTWriter::WriteSpecializationInfoLookupTable(
   return Offset;
 }
 
-/// Returns ture if all of the lookup result are either external, not emitted or
+/// Returns true if all of the lookup result are either external, not emitted or
 /// predefined. In such cases, the lookup result is not interesting and we don't
 /// need to record the result in the current being written module. Return false
 /// otherwise.
diff --git a/clang/test/CXX/module/module.reach/p5.cpp b/clang/test/CXX/module/module.reach/p5.cpp
index 947fd082553ec..f977049f2e996 100644
--- a/clang/test/CXX/module/module.reach/p5.cpp
+++ b/clang/test/CXX/module/module.reach/p5.cpp
@@ -13,5 +13,5 @@ export using Y = X;
 //--- B.cppm
 export module B;
 import A;
-Y y; // OK, definition of X is reachable
+Y y; // OK, definition of Y is reachable
 X x; // expected-error {{unknown type name 'X'}}

@mpark mpark changed the title Minor NFC fixes [C++20][Modules][NFC] Trivial NFC fixes Dec 16, 2025
@mpark mpark changed the title [C++20][Modules][NFC] Trivial NFC fixes [C++20][Modules][NFC] Some minor comment fixes Dec 16, 2025
Copy link
Collaborator

@hubert-reinterpretcast hubert-reinterpretcast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but the PR subject should be changed.

Comment on lines +4444 to +4446
ASTReader *Chain = Writer.getChain();
for (NamedDecl *D : Decls) {
if (ASTReader *Chain = Writer.getChain();
Chain && isa<NamespaceDecl>(D) && D->isFromASTFile() &&
if (Chain && isa<NamespaceDecl>(D) && D->isFromASTFile() &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is NFC, but not a "minor comment fix".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. I added this commit after creating the PR and hadn't updated the title. yet. Updated to "non-functional fixes" now.

@mpark mpark changed the title [C++20][Modules][NFC] Some minor comment fixes [C++20][Modules][NFC] Some minor fixes Dec 16, 2025
@mpark mpark changed the title [C++20][Modules][NFC] Some minor fixes [C++20][Modules][NFC] Some minor non-functional fixes Dec 16, 2025
@mpark mpark merged commit 50955d6 into llvm:main Dec 16, 2025
9 of 10 checks passed
@mpark mpark deleted the minor-nfc-fixes branch December 16, 2025 18:28

DeclIDs.push_back(ID);
};
ASTReader *Chain = Writer.getChain();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker. But I remember we prefer to move the declaration to if-statement if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:modules C++20 modules and Clang Header Modules clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants