[PATCH] D78100: [AST] Suppress the spammy "attempt to use a deleted fucntion" diagnostic.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 20 06:59:48 PDT 2020
hokein marked an inline comment as done.
hokein added inline comments.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:12565
+ auto RecoveryExpr =
+ CreateRecoveryExpr(Var->getLocation(), Var->getEndLoc(), {});
+ if (RecoveryExpr.get())
----------------
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.
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78100/new/
https://reviews.llvm.org/D78100
More information about the cfe-commits
mailing list