[clang-tidy][NFC] Fix clang-format (#192044)
This commit is contained in:
@@ -166,14 +166,13 @@ void RedundantBranchConditionCheck::check(
|
||||
CondOp->getRHS()->getBeginLoc().getLocWithOffset(-1);
|
||||
Diag << FixItHint::CreateRemoval(CharSourceRange::getTokenRange(
|
||||
CondOp->getLHS()->getBeginLoc(), BeforeRHS));
|
||||
} else {
|
||||
if (const auto NextToken = utils::lexer::findNextTokenSkippingComments(
|
||||
CondOp->getLHS()->getEndLoc(), *Result.SourceManager,
|
||||
getLangOpts())) {
|
||||
const SourceLocation AfterLHS = NextToken->getLocation();
|
||||
Diag << FixItHint::CreateRemoval(CharSourceRange::getTokenRange(
|
||||
AfterLHS, CondOp->getRHS()->getEndLoc()));
|
||||
}
|
||||
} else if (const auto NextToken =
|
||||
utils::lexer::findNextTokenSkippingComments(
|
||||
CondOp->getLHS()->getEndLoc(), *Result.SourceManager,
|
||||
getLangOpts())) {
|
||||
const SourceLocation AfterLHS = NextToken->getLocation();
|
||||
Diag << FixItHint::CreateRemoval(CharSourceRange::getTokenRange(
|
||||
AfterLHS, CondOp->getRHS()->getEndLoc()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,16 +66,18 @@ static bool containsMisleadingBidi(StringRef Buffer,
|
||||
if (CodePoint == RLO || CodePoint == RLE || CodePoint == LRO ||
|
||||
CodePoint == LRE) {
|
||||
BidiContexts.push_back(PDF);
|
||||
}
|
||||
// Close PDF Context.
|
||||
} else if (CodePoint == PDF) {
|
||||
else if (CodePoint == PDF) {
|
||||
if (!BidiContexts.empty() && BidiContexts.back() == PDF)
|
||||
BidiContexts.pop_back();
|
||||
}
|
||||
// Open a PDI Context.
|
||||
else if (CodePoint == RLI || CodePoint == LRI || CodePoint == FSI) {
|
||||
BidiContexts.push_back(PDI);
|
||||
}
|
||||
// Close a PDI Context.
|
||||
} else if (CodePoint == PDI) {
|
||||
else if (CodePoint == PDI) {
|
||||
auto R = llvm::find(llvm::reverse(BidiContexts), PDI);
|
||||
if (R != BidiContexts.rend())
|
||||
BidiContexts.resize(BidiContexts.rend() - R - 1);
|
||||
|
||||
Reference in New Issue
Block a user