[PATCH] D85645: [AST] Fix the CXXFoldExpr source range when parentheses range is invalid.

2020-08-12 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D85645: [AST] Fix the CXXFoldExpr source range when parentheses range is invalid.

2020-08-12 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D85645: [AST] Fix the CXXFoldExpr source range when parentheses range is invalid.

2020-08-11 Thread Nathan Ridge via Phabricator via cfe-commits
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

[PATCH] D85645: [AST] Fix the CXXFoldExpr source range when parentheses range is invalid.

2020-08-11 Thread Haojian Wu via Phabricator via cfe-commits
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

[PATCH] D85645: [AST] Fix the CXXFoldExpr source range when parentheses range is invalid.

2020-08-11 Thread Haojian Wu via Phabricator via cfe-commits
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/

[PATCH] D85645: [AST] Fix the CXXFoldExpr source range when parentheses range is invalid.

2020-08-10 Thread Nathan Ridge via Phabricator via cfe-commits
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 +

[PATCH] D85645: [AST] Fix the CXXFoldExpr source range when parentheses range is invalid.

2020-08-10 Thread Haojian Wu via Phabricator via cfe-commits
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