[PATCH] D77395: [AST] Dont invalidate VarDecl even the default initializaiton is failed.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 14 02:05:13 PDT 2020


hokein added a comment.

In D77395#1972666 <https://reviews.llvm.org/D77395#1972666>, @sammccall wrote:

> the `attempt to use a deleted function` diagnostic is a bit spammy, because the default-constructor and destructor are often deleted for similar reasons. But I guess this is probably OK, unless you can see an easy way to suppress it.


didn't see a trivial way to suppress this diagnostic, as we don't have enough information to distinguish the VarDecl (valid bit is true, no init-expr) has an ill-formed default initialization. I think we could build a recovery-expr and use it as the init-expr for the VarDecl, and suppress this diagnostic.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77395





More information about the cfe-commits mailing list