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 origin/main HEAD --extensions h,cpp -- 
clang/include/clang/Frontend/CompilerInstance.h 
clang/include/clang/Frontend/FrontendActions.h 
clang/include/clang/Lex/ModuleMap.h 
clang/include/clang/Serialization/ASTReader.h 
clang/include/clang/Serialization/ModuleCache.h 
clang/include/clang/Serialization/ModuleFile.h 
clang/lib/DependencyScanning/InProcessModuleCache.cpp 
clang/lib/Frontend/CompilerInstance.cpp clang/lib/Frontend/FrontendActions.cpp 
clang/lib/Lex/ModuleMap.cpp clang/lib/Serialization/ASTReader.cpp 
clang/lib/Serialization/ModuleCache.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/include/clang/Serialization/ASTReader.h 
b/clang/include/clang/Serialization/ASTReader.h
index 808db66e6..5b4dca205 100644
--- a/clang/include/clang/Serialization/ASTReader.h
+++ b/clang/include/clang/Serialization/ASTReader.h
@@ -417,15 +417,13 @@ struct LookupBlockOffsets : VisibleLookupBlockOffsets {
 /// The AST reader provides lazy de-serialization of declarations, as
 /// required when traversing the AST. Only those AST nodes that are
 /// actually required will be de-serialized.
-class ASTReader
-  : public ExternalPreprocessorSource,
-    public ExternalPreprocessingRecordSource,
-    public ExternalHeaderFileInfoSource,
-    public ExternalSemaSource,
-    public IdentifierInfoLookup,
-    public ExternalSLocEntrySource,
-    public ExternalSubmoduleSource
-{
+class ASTReader : public ExternalPreprocessorSource,
+                  public ExternalPreprocessingRecordSource,
+                  public ExternalHeaderFileInfoSource,
+                  public ExternalSemaSource,
+                  public IdentifierInfoLookup,
+                  public ExternalSLocEntrySource,
+                  public ExternalSubmoduleSource {
 public:
   /// Types of AST files.
   friend class ASTDeclMerger;
diff --git a/clang/lib/Serialization/ASTReader.cpp 
b/clang/lib/Serialization/ASTReader.cpp
index 4c6671b3d..c1a4129c7 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -6373,10 +6373,10 @@ llvm::Error ASTReader::ReadSubmoduleBlock(ModuleFile &F,
       }
 
       // After the root module of this PCM file has been eagerly loaded, skip
-      // creating Module objects for all descendant submodules.  Their 
scan-index
-      // entries (above) are enough for loadSingleSubmodule() to materialise
-      // them on demand when they are first referenced (e.g. via a header-file
-      // lookup or an explicit import).
+      // creating Module objects for all descendant submodules.  Their
+      // scan-index entries (above) are enough for loadSingleSubmodule() to
+      // materialise them on demand when they are first referenced (e.g. via a
+      // header-file lookup or an explicit import).
       if (SeenFirstDef) {
         CurrentModule = nullptr;
         continue;
@@ -6662,7 +6662,6 @@ llvm::Error ASTReader::ReadSubmoduleBlock(ModuleFile &F,
   }
 }
 
-
 void ASTReader::loadSubmodule(Module *Parent, StringRef Name) {
   // Don't fire while ReadSubmoduleBlock() is building the scan index — the
   // eager loader already creates every module we need, and we would otherwise
@@ -6879,8 +6878,7 @@ void ASTReader::loadSingleSubmodule(ModuleFile &F, 
uint32_t FileIdx) {
       if (!CurrentModule)
         break;
       auto Dirname = ResolveImportedPath(PathBuf, Blob, F);
-      if (auto Umbrella =
-              PP.getFileManager().getOptionalDirectoryRef(*Dirname))
+      if (auto Umbrella = 
PP.getFileManager().getOptionalDirectoryRef(*Dirname))
         if (!CurrentModule->getUmbrellaDirAsWritten())
           ModMap.setUmbrellaDirAsWritten(CurrentModule, *Umbrella, Blob, "");
       break;

``````````

</details>


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

Reply via email to