This revision was automatically updated to reflect the committed changes.
Closed by commit rGdc7b1e9db581: [AST] Fix the CXXFoldExpr source range when
parentheses range is invalid. (authored by hokein).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D8
hokein added inline comments.
Comment at: clang/include/clang/AST/ExprCXX.h:4582
+if (isLeftFold())
+ return getEllipsisLoc();
+return getLHS()->getBeginLoc();
nridge wrote:
> Can this case (left fold and no parenthesis) ever happen? It would be
> i
nridge accepted this revision.
nridge added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/include/clang/AST/ExprCXX.h:4582
+if (isLeftFold())
+ return getEllipsisLoc();
+return getLHS()->getBeginLoc();
Can this c
hokein added inline comments.
Comment at: clang/include/clang/AST/ExprCXX.h:4587
+ return RParenLoc;
+return getPattern()->getEndLoc();
+ }
nridge wrote:
> Wouldn't `EllipsisLoc` be more accurate?
yeah, that sounds more reasonable.
Repository:
rG LL
hokein updated this revision to Diff 284592.
hokein marked an inline comment as done.
hokein added a comment.
address review comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85645/new/
https://reviews.llvm.org/D85645
Files:
clang/include/
nridge added inline comments.
Comment at: clang/include/clang/AST/ExprCXX.h:4587
+ return RParenLoc;
+return getPattern()->getEndLoc();
+ }
Wouldn't `EllipsisLoc` be more accurate?
Comment at: clang/test/AST/ast-dump-concepts.cpp:16
+
hokein created this revision.
hokein added a reviewer: nridge.
Herald added a project: clang.
hokein requested review of this revision.
The CXXFoldExpr's range is invalid if the cxxfoldexpr is formed via the
Concept's TypeContraints (because the parentheses are not written in the
source code). We