serge-sans-paille 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(); }))
----------------
shafik wrote:
> 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`
I missed that method, thanks for point it out. I think we should be doing that 
check in the other reference in SemaChecking.cpp, but I failed to find a 
reproducer...


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

https://reviews.llvm.org/D151753

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to