[PATCH] D76831: [AST] Preserve the DeclRefExpr when it refers to an invalid decl.

2020-09-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. @hokein I think this patch is obsolete, right? Richard's last comment is basically what's currently implemented: if lookup doesn't yield any valid results, we create a recoveryexpr for the failed lookup. It doesn't have a pointer to the invalid decl (which would be

[PATCH] D76831: [AST] Preserve the DeclRefExpr when it refers to an invalid decl.

2020-04-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Generally I think we should be moving towards finer-grained "invalid" / "contains errors" bits, so that we can preserve as much of the AST as possible and produce accurate diagnostics for independent errors wherever possible. To that end, I think generally the "invalid"

[PATCH] D76831: [AST] Preserve the DeclRefExpr when it refers to an invalid decl.

2020-04-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Yeah, so I guess the point of marking decls invalid is in large part to stop recovery using it. It's not surprising 1 has recovery regressions. 3 should have fewer (basically because you'll get the dependent bits too), but likely still some. 2 definitely seems the way

[PATCH] D76831: [AST] Preserve the DeclRefExpr when it refers to an invalid decl.

2020-04-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D76831#1952425 , @sammccall wrote: > I like the idea, but it seems to regress quite a lot of diagnostics... e.g. > where we fail to deduce auto and then say it's not a pointer. > > Also this is regressing things in the

[PATCH] D76831: [AST] Preserve the DeclRefExpr when it refers to an invalid decl.

2020-03-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I like the idea, but it seems to regress quite a lot of diagnostics... e.g. where we fail to deduce auto and then say it's not a pointer. Also this is regressing things in the -fno-recovery-ast case, because of the changes to CheckDeclInExpr with the existing

[PATCH] D76831: [AST] Preserve the DeclRefExpr when it refers to an invalid decl.

2020-03-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: sammccall, adamcz. Herald added a project: clang. Previously, clang refused to build the AST nodes for them. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D76831 Files: clang/lib/AST/ComputeDependence.cpp