================
@@ -343,7 +343,11 @@ namespace {
         }
       }
 
-      llvm_unreachable("no Attr* for AttributedType*");
+      // The AttributedType can be inherited from another declarator, for
+      // example when __typeof__ reuses a type built for a different
+      // declaration, in which case there is no entry for it in this
+      // TypeProcessingState. Return null in that case.
+      return nullptr;
----------------
AaronBallman wrote:

I think this breaks invariants for the caller, right? Now we'll end up setting 
a null attribute in `fillAttributedTypeLoc()` and is that expected?

I believe this interface is expected to always return a non-null attribute, so 
is a better chance to not inherit from another declarator but instead ensure 
there's an entry in `TypeProcessingState`?

https://github.com/llvm/llvm-project/pull/220139
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to