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

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 12 00:20:04 PDT 2020


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 interesting to see an example.
I think in theory it should not happen. Doing it here is for completeness, it seems a bit odd we only do the change for `getEndLoc`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85645/new/

https://reviews.llvm.org/D85645



More information about the cfe-commits mailing list