[PATCH] D68896: PR43080: Do not build context-sensitive expressions during name classification.

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 14 12:18:18 PDT 2019


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM

> I'm inclined to defer doing that for now, if that's OK :)

Sure.



================
Comment at: lib/Sema/SemaDecl.cpp:1191
+  return NameClassification::ContextIndependentExpr(
+      BuildDeclarationNameExpr(SS, Result, ADL));
+}
----------------
rsmith wrote:
> efriedma wrote:
> > This doesn't depend on the context... because we're going to throw away the expression later anyway?  I guess that makes sense.
> Yes, basically; we don't do anything context-dependent right now when building the `UnresolvedLookupExpr`, it's all delayed until we resolve the overload set. I suppose I could make this more explicit by directly creating the `UnresolvedLookupExpr` here, at the cost of duplicating a little of the work done by `BuildDeclarationNameExpr`. WDYT?
I don't think duplicating the code really helps; the comment makes it clear enough what's happening here.


Repository:
  rC Clang

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

https://reviews.llvm.org/D68896





More information about the cfe-commits mailing list