sammccall added a comment. OK LG without changes
================ Comment at: clang/lib/Sema/SemaDecl.cpp:12565 + auto RecoveryExpr = + CreateRecoveryExpr(Var->getLocation(), Var->getEndLoc(), {}); + if (RecoveryExpr.get()) ---------------- hokein wrote: > sammccall wrote: > > This seems like it's going to claim some actual tokens, when the thing it > > represents doesn't cover any tokens. > > > > I think both start/end source locations should be invalid. > actually, I think it is still valuable to set the var location to > recovery-expr. > ``` > Foo [[foo]]; // if there is a valid default ctor, we have a CtorExpr which > has the `foo` range; otherwise there is a recoveryExpr with the same range. > ``` Yeah, invalid source range is scary too. Let's go with this and see if things break. I think more likely it'll be a mild annoyance like the range of CXXConstructExpr. (In a perfect world maybe this would have a location but no range, or a SourceRange would have half-open semantics and could represent a point). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78100/new/ https://reviews.llvm.org/D78100 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits