[PATCH] D76392: [AST] Make Expr::setDependence protected and remove add/removeDependence. NFC
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 19 04:17:21 PDT 2020
sammccall marked an inline comment as done.
sammccall added inline comments.
================
Comment at: clang/include/clang/AST/Expr.h:2766
+ void markDependentForPostponedNameLookup() {
+ setDependence(getDependence() | ExprDependence::TypeValueInstantiation);
----------------
hokein wrote:
> the method name seems too concrete to me, I'd prefer to drop `ForPostponedNameLookup`, though there is only one usage in Sema.
So the idea here is that we're breaking encapsulation for a special purpose, and this method shouldn't be generally used to manipulate dependence.
If we do want to add another usage (in sema or elsewhere) for another purpose, it makes sense to have to modify `Expr` (by renaming the method or adding another one), just as if this function was private.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76392/new/
https://reviews.llvm.org/D76392
More information about the cfe-commits
mailing list