[clang] [NFC] Fix an incorrect comment about operator precedence. (PR #105784)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 22 22:16:32 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Michael Park (mpark)
<details>
<summary>Changes</summary>
The comment talks about left-associative operators twice, when the latter mention is actually describing right-associative operators.
---
Full diff: https://github.com/llvm/llvm-project/pull/105784.diff
1 Files Affected:
- (modified) clang/lib/Parse/ParseExpr.cpp (+1-1)
``````````diff
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index 1405aef700bec5..64f284d78b24db 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -607,7 +607,7 @@ Parser::ParseRHSOfBinaryExpression(ExprResult LHS, prec::Level MinPrec) {
RHS = ExprError();
}
// If this is left-associative, only parse things on the RHS that bind
- // more tightly than the current operator. If it is left-associative, it
+ // more tightly than the current operator. If it is right-associative, it
// is okay, to bind exactly as tightly. For example, compile A=B=C=D as
// A=(B=(C=D)), where each paren is a level of recursion here.
// The function takes ownership of the RHS.
``````````
</details>
https://github.com/llvm/llvm-project/pull/105784
More information about the cfe-commits
mailing list