================
@@ -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:

> It was never previously valid to call it with an object that is still in the 
> process of being defined, we just hid the issue by returning a bogus result.

Let me rephrase: previously, calling this with an object that was still in the 
process of being defined was something that had well-defined behaviour by the 
C++ language rules, was something that Clang itself did, was something that had 
code written to handle specifically that, and was something that violated no 
requirement expressed anywhere in the LLVM code or documentation. Even if it 
was not intended to be valid, there was no way for anyone to infer that.

That said, regardless of whether we say it was or wasn't valid before, I'm fine 
with deciding it's definitely not going to be valid going forward (in that 
future PR). This PR, and that future PR, they both look good to me.

https://github.com/llvm/llvm-project/pull/150592
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to