rsmith marked an inline comment as done.
rsmith added a comment.

In D68896#1706870 <https://reviews.llvm.org/D68896#1706870>, @efriedma wrote:

> Would it make sense to always use ClassifyName from the parser, instead of 
> using ActOnIdExpression?


I like that idea, at least in principle. We'd need to generalize `ClassifyName` 
to operate on an arbitrary `UnqualifiedId` instead of only on an identifier, 
and we'd still need something to cover the various current calls to 
`ActOnIdExpression` from within `Sema`, so I'm not sure whether it'll actually 
work out cleaner in practice. I'm inclined to defer doing that for now, if 
that's OK :)



================
Comment at: lib/Sema/SemaDecl.cpp:1191
+  return NameClassification::ContextIndependentExpr(
+      BuildDeclarationNameExpr(SS, Result, ADL));
+}
----------------
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?


Repository:
  rC Clang

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

https://reviews.llvm.org/D68896



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to