[PATCH] D105380: [clang] fixes named return of variables with dependent alignment
Arthur O'Dwyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 4 14:48:44 PDT 2021
Quuxplusone added inline comments.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:13317
+ std::any_of(range.begin(), range.end(), [](const AlignedAttr *I) {
+ return I->isAlignmentDependent();
+ });
----------------
Tangent: It would be nice to rename `isAlignmentDependent` into `hasDependentAlignment` or simply `isDependent`. IIUC, the intended meaning is "Is this alignment attribute 'dependent'?" and not (as the name would naturally parse) "is this alignment attribute 'alignment-dependent'?"
Arguably, it could also work to say `I->isDependentAlignment()` in the same way that we say `getType()->isDependentType()`.
Speaking of which, maybe `I` should be renamed to `AA` or something? Is `I` really the right abbreviation for an `AlignedAttr`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105380/new/
https://reviews.llvm.org/D105380
More information about the cfe-commits
mailing list