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

Harald van Dijk via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 25 05:24:40 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())
----------------
hvdijk wrote:

Changing a previously valid call to have undefined behavior does not sound like a good idea to me. If we want to say that it is invalid to call this function on something that is currently being defined -- I don't feel too strongly on that -- given that it was previously valid, at the least there should be an assert so that it fails reliably (in assertion-enabled builds).

But even then, that's a change that's not needed for your bugfix, so personally, I'd rather have that not in this PR: get the bugfix merged first, then do the `IsArmStreamingFunction` as a followup PR so that if there is any fallout from that (possibly because of external callers) and it needs to be reverted, that doesn't take the bugfix with it.

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


More information about the cfe-commits mailing list