[llvm] [FileCheck]: Fix diagnostics for NOT prefixes (PR #78412)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 03:34:59 PST 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 2c78f3b86007fbf56a6f40b647b5cb757c082215 373b5707c5d5736f57cf7c27fed56f2dc11dbd0e -- llvm/lib/FileCheck/FileCheck.cpp llvm/lib/FileCheck/FileCheckImpl.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/FileCheck/FileCheck.cpp b/llvm/lib/FileCheck/FileCheck.cpp
index 94e85ef1ee..0d5bdf7903 100644
--- a/llvm/lib/FileCheck/FileCheck.cpp
+++ b/llvm/lib/FileCheck/FileCheck.cpp
@@ -2303,19 +2303,19 @@ bool FileCheckString::CheckSame(const SourceMgr &SM, StringRef Buffer) const {
return false;
}
-bool FileCheckString::CheckNot(const SourceMgr &SM, StringRef Buffer,
- const std::vector<const DagNotPrefixInfo *> &NotStrings,
- const FileCheckRequest &Req,
- std::vector<FileCheckDiag> *Diags) const {
+bool FileCheckString::CheckNot(
+ const SourceMgr &SM, StringRef Buffer,
+ const std::vector<const DagNotPrefixInfo *> &NotStrings,
+ const FileCheckRequest &Req, std::vector<FileCheckDiag> *Diags) const {
bool DirectiveFail = false;
for (auto NotInfo : NotStrings) {
assert((NotInfo->DagNotPat.getCheckTy() == Check::CheckNot) &&
"Expect CHECK-NOT!");
Pattern::MatchResult MatchResult = NotInfo->DagNotPat.match(Buffer, SM);
- if (Error Err =
- reportMatchResult(/*ExpectedMatch=*/false, SM, NotInfo->DagNotPrefix,
- NotInfo->DagNotPat.getLoc(), NotInfo->DagNotPat, 1,
- Buffer, std::move(MatchResult), Req, Diags)) {
+ if (Error Err = reportMatchResult(
+ /*ExpectedMatch=*/false, SM, NotInfo->DagNotPrefix,
+ NotInfo->DagNotPat.getLoc(), NotInfo->DagNotPat, 1, Buffer,
+ std::move(MatchResult), Req, Diags)) {
cantFail(handleErrors(std::move(Err), [&](const ErrorReported &E) {}));
DirectiveFail = true;
continue;
@@ -2324,10 +2324,11 @@ bool FileCheckString::CheckNot(const SourceMgr &SM, StringRef Buffer,
return DirectiveFail;
}
-size_t FileCheckString::CheckDag(const SourceMgr &SM, StringRef Buffer,
- std::vector<const DagNotPrefixInfo *> &NotStrings,
- const FileCheckRequest &Req,
- std::vector<FileCheckDiag> *Diags) const {
+size_t
+FileCheckString::CheckDag(const SourceMgr &SM, StringRef Buffer,
+ std::vector<const DagNotPrefixInfo *> &NotStrings,
+ const FileCheckRequest &Req,
+ std::vector<FileCheckDiag> *Diags) const {
if (DagNotStrings.empty())
return 0;
``````````
</details>
https://github.com/llvm/llvm-project/pull/78412
More information about the llvm-commits
mailing list