[clang] [Clang][AArch64] Remove unwarranted 'cannot be used in non-streaming mode' diagnostic. (PR #150592)

Benjamin Maxwell via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 25 05:57:42 PDT 2025


================
@@ -5988,11 +5988,9 @@ bool clang::IsArmStreamingFunction(const FunctionDecl *FD,
     if (FD->hasAttr<ArmLocallyStreamingAttr>())
       return true;
 
-  if (const Type *Ty = FD->getType().getTypePtrOrNull())
----------------
MacDue wrote:

> operator-> that returns the Type* has an explicit assert that the type is not QualType():

Ah, okay :+1: 

> I'm happy to add an explicit assert in this function and to commit this as a separate change though.

I think it'd still be good to add an assert here. It's not obvious that the `QualType` assertion is hit before you dereference `Type*` pointer (at a glance), and I think it's better to fail early.

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


More information about the cfe-commits mailing list