[NFC] Pre- increment and decrement where possible

This commit is contained in:
Anthony Latsis
2020-06-01 15:39:29 +03:00
parent ad0a8d3121
commit 9fd1aa5d59
162 changed files with 398 additions and 397 deletions

View File

@@ -1416,7 +1416,7 @@ bool ModelASTWalker::pushStructureNode(const SyntaxStructureNode &Node,
const ASTNodeType& ASTNode) {
SubStructureStack.emplace_back(Node, ASTNode);
if (shouldTreatAsSingleToken(Node, SM))
AvoidPassingSyntaxToken ++;
++AvoidPassingSyntaxToken;
if (!passTokenNodesUntil(Node.Range.getStart(),
ExcludeNodeAtLocation).shouldContinue)
@@ -1552,12 +1552,12 @@ static CharSourceRange sanitizeUnpairedParenthesis(CharSourceRange Range) {
unsigned TrimLen = 0;
for (char C : Text) {
if (C == '(') {
Pairs ++;
++Pairs;
} else if (C == ')') {
if (Pairs == 0)
TrimLen ++;
++TrimLen;
else
Pairs --;
--Pairs;
} else {
TrimLen = 0;
}