mizvekov added a comment.
In D105380#2858638 <https://reviews.llvm.org/D105380#2858638>, @aaronpuchert
wrote:
> I tend to follow the rule that if it's just used once I keep it local, but
> you might have good reasons for making it public.
Well it is used twice.
Notice how I replaced a pre-existing static function called
`hasDependentAlignment` with a static class member with the same name.
Since I kept the name, and it was used from a Sema member function, I did not
have to change the code in the call site, hence it did not show up in the diff
:)
================
Comment at: clang/lib/Sema/SemaDecl.cpp:13316
+ return VD->getType()->isDependentType() ||
+ std::any_of(range.begin(), range.end(), [](const AlignedAttr *AA) {
+ return AA->isAlignmentDependent();
----------------
aaronpuchert wrote:
> From `llvm/include/llvm/ADT/STLExtras.h`.
That looks much better, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105380/new/
https://reviews.llvm.org/D105380
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits