[clang] [C++20][Modules] Allow using stdarg.h with header units (PR #100739)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 26 06:29:42 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 38d0b2d174efe05504a18988299b4d78d37999b7 edc7f5c84caefeae197a5884c91ec2194fd3148b --extensions cpp -- clang/test/Headers/stdarg-cxx-modules.cpp clang/lib/Serialization/ASTReader.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index f3e8027526..76f08e4fe7 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -1051,7 +1051,8 @@ IdentifierID ASTIdentifierLookupTrait::ReadIdentifierID(const unsigned char *d)
return Reader.getGlobalIdentifierID(F, RawID >> 1);
}
-static void markIdentifierFromAST(ASTReader &Reader, IdentifierInfo &II, bool IsModule) {
+static void markIdentifierFromAST(ASTReader &Reader, IdentifierInfo &II,
+ bool IsModule) {
if (!II.isFromAST()) {
II.setIsFromAST();
if (isInterestingIdentifier(Reader, II, IsModule))
@@ -1079,7 +1080,8 @@ IdentifierInfo *ASTIdentifierLookupTrait::ReadData(const internal_key_type& k,
II = &Reader.getIdentifierTable().getOwn(k);
KnownII = II;
}
- markIdentifierFromAST(Reader, *II, Reader.getPreprocessor().getCurrentModule() != nullptr);
+ markIdentifierFromAST(Reader, *II,
+ Reader.getPreprocessor().getCurrentModule() != nullptr);
Reader.markIdentifierUpToDate(II);
IdentifierID ID = Reader.getGlobalIdentifierID(F, RawID);
@@ -8960,7 +8962,8 @@ IdentifierInfo *ASTReader::DecodeIdentifierInfo(IdentifierID ID) {
auto Key = Trait.ReadKey(Data, KeyDataLen.first);
auto &II = PP.getIdentifierTable().get(Key);
IdentifiersLoaded[Index] = &II;
- markIdentifierFromAST(*this, II, getPreprocessor().getCurrentModule() != nullptr);
+ markIdentifierFromAST(*this, II,
+ getPreprocessor().getCurrentModule() != nullptr);
if (DeserializationListener)
DeserializationListener->IdentifierRead(ID, &II);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/100739
More information about the cfe-commits
mailing list