[clang] [clang] assume_aligned incorrectly diagnoses a dependent return type (PR #111573)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 8 11:31:23 PDT 2024


================
@@ -1217,6 +1217,8 @@ static void handlePreferredName(Sema &S, Decl *D, const ParsedAttr &AL) {
 
 bool Sema::isValidPointerAttrType(QualType T, bool RefOkay) {
   if (RefOkay) {
+    if (T->isDependentType())
----------------
erichkeane wrote:

This doesn't seem like the right place for this, we should be skipping ANY time the type is dependent, not only when a ref argument is acceptable.

https://github.com/llvm/llvm-project/pull/111573


More information about the cfe-commits mailing list