[PATCH] D105380: [clang] fixes named return of variables with dependent alignment
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 5 15:47:39 PDT 2021
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:13314
-/// Determines if a variable's alignment is dependent.
-static bool hasDependentAlignment(VarDecl *VD) {
- if (VD->getType()->isDependentType())
- return true;
- for (auto *I : VD->specific_attrs<AlignedAttr>())
- if (I->isAlignmentDependent())
- return true;
- return false;
+bool Sema::hasDependentAlignment(const VarDecl *VD) {
+ return VD->getType()->isDependentType() ||
----------------
It doesn't look like this has any particular relationship to Sema. Consider making this a member of `VarDecl` instead.
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