[clang] [clang] Fix sorting module headers (PR #73146)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 22 09:23:43 PST 2023
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 1dd387e10624ece478759ec95c18545d051b7dbe d0a86b80256a45bfdee790a7aec5a48d2d71e6bb -- clang/lib/Lex/ModuleMap.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index 7ba5a5f8cb..591bd97075 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -2510,10 +2510,11 @@ void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken,
}
static bool compareModuleHeaders(const Module::Header &A,
- const Module::Header &B) {
+ const Module::Header &B) {
return A.NameAsWritten < B.NameAsWritten ||
- (A.NameAsWritten == B.NameAsWritten &&
- A.PathRelativeToRootModuleDirectory < B.PathRelativeToRootModuleDirectory);
+ (A.NameAsWritten == B.NameAsWritten &&
+ A.PathRelativeToRootModuleDirectory <
+ B.PathRelativeToRootModuleDirectory);
}
/// Parse an umbrella directory declaration.
``````````
</details>
https://github.com/llvm/llvm-project/pull/73146
More information about the cfe-commits
mailing list