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/Lex/HeaderSearch.h clang/include/clang/Lex/ModuleMap.h
clang/include/clang/Lex/ModuleMapFile.h clang/lib/Frontend/FrontendAction.cpp
clang/lib/Lex/HeaderSearch.cpp clang/lib/Lex/ModuleMap.cpp
clang/lib/Lex/ModuleMapFile.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/Lex/HeaderSearch.h
b/clang/include/clang/Lex/HeaderSearch.h
index c566d8c96..d7000da68 100644
--- a/clang/include/clang/Lex/HeaderSearch.h
+++ b/clang/include/clang/Lex/HeaderSearch.h
@@ -989,13 +989,10 @@ private:
MMR_InvalidModuleMap
};
- ModuleMapResult parseAndLoadModuleMapFileImpl(FileEntryRef File,
- bool IsSystem,
- bool ImplicitlyDiscovered,
- DirectoryEntryRef Dir,
- FileID ID = FileID(),
- unsigned *Offset = nullptr,
- bool DiagnosePrivMMap = false);
+ ModuleMapResult parseAndLoadModuleMapFileImpl(
+ FileEntryRef File, bool IsSystem, bool ImplicitlyDiscovered,
+ DirectoryEntryRef Dir, FileID ID = FileID(), unsigned *Offset = nullptr,
+ bool DiagnosePrivMMap = false);
ModuleMapResult parseModuleMapFileImpl(FileEntryRef File, bool IsSystem,
bool ImplicitlyDiscovered,
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index c6fc96785..5aee19cd1 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/lib/Lex/HeaderSearch.cpp
@@ -2336,10 +2336,9 @@ void
HeaderSearch::loadSubdirectoryModuleMaps(DirectoryLookup &SearchDir) {
continue;
bool IsFramework = llvm::sys::path::extension(Dir->path()) == ".framework";
if (IsFramework == SearchDir.isFramework())
- parseAndLoadModuleMapFile(Dir->path(),
- SearchDir.isSystemHeaderDirectory(),
- /*ImplicitlyDiscovered=*/true,
- SearchDir.isFramework());
+ parseAndLoadModuleMapFile(
+ Dir->path(), SearchDir.isSystemHeaderDirectory(),
+ /*ImplicitlyDiscovered=*/true, SearchDir.isFramework());
}
SearchDir.setSearchedAllModuleMaps(true);
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index 410d6d6b8..6c991430c 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -1994,8 +1994,7 @@ void ModuleMapLoader::handleHeaderDecl(const
modulemap::HeaderDecl &HD) {
SmallString<128> NormalizedPath(HD.Path);
llvm::sys::path::remove_dots(NormalizedPath, /*remove_dot_dot=*/true);
if (NormalizedPath.starts_with(".."))
- Diags.Report(HD.PathLoc,
- diag::warn_mmap_path_outside_directory);
+ Diags.Report(HD.PathLoc, diag::warn_mmap_path_outside_directory);
}
if (HD.Size)
@@ -2040,8 +2039,7 @@ void ModuleMapLoader::handleUmbrellaDirDecl(
SmallString<128> NormalizedPath(UDD.Path);
llvm::sys::path::remove_dots(NormalizedPath, /*remove_dot_dot=*/true);
if (NormalizedPath.starts_with(".."))
- Diags.Report(UDD.Location,
- diag::warn_mmap_path_outside_directory);
+ Diags.Report(UDD.Location, diag::warn_mmap_path_outside_directory);
}
// Look for this file.
``````````
</details>
https://github.com/llvm/llvm-project/pull/184279
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits