Skip to content

Commit 50955d6

Browse files
authored
[C++20][Modules][NFC] Some minor non-functional fixes (#172524)
1 parent 39f68f7 commit 50955d6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang/lib/Serialization/ASTWriter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4441,9 +4441,9 @@ class ASTDeclContextNameLookupTrait
44414441

44424442
DeclIDs.push_back(ID);
44434443
};
4444+
ASTReader *Chain = Writer.getChain();
44444445
for (NamedDecl *D : Decls) {
4445-
if (ASTReader *Chain = Writer.getChain();
4446-
Chain && isa<NamespaceDecl>(D) && D->isFromASTFile() &&
4446+
if (Chain && isa<NamespaceDecl>(D) && D->isFromASTFile() &&
44474447
D == Chain->getKeyDeclaration(D)) {
44484448
// In ASTReader, we stored only the key declaration of a namespace decl
44494449
// for this TU rather than storing all of the key declarations from each
@@ -4641,7 +4641,7 @@ uint64_t ASTWriter::WriteSpecializationInfoLookupTable(
46414641
return Offset;
46424642
}
46434643

4644-
/// Returns ture if all of the lookup result are either external, not emitted or
4644+
/// Returns true if all of the lookup result are either external, not emitted or
46454645
/// predefined. In such cases, the lookup result is not interesting and we don't
46464646
/// need to record the result in the current being written module. Return false
46474647
/// otherwise.

clang/test/CXX/module/module.reach/p5.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ export using Y = X;
1313
//--- B.cppm
1414
export module B;
1515
import A;
16-
Y y; // OK, definition of X is reachable
16+
Y y; // OK, definition of Y is reachable
1717
X x; // expected-error {{unknown type name 'X'}}

0 commit comments

Comments
 (0)