[PATCH] D151753: [Clang][Sema] Do not try to analyze dependent alignment during -Wcast-align

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 31 12:10:16 PDT 2023


shafik added inline comments.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:16163
+        // Dependent alignment cannot be resolved -> bail out.
+        if (any_of(VD->specific_attrs<AlignedAttr>(),
+                   [](auto *A) { return A->isAlignmentDependent(); }))
----------------
Can't we just use `hasDependentAlignment()` which basically does this.

I am curious that we don't have to do this check in every location we use `getDeclAlign`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151753



More information about the cfe-commits mailing list