[clang] [clang] Diagnose [[nodiscard]] return types in Objective-C++ (PR #142541)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 6 05:52:28 PDT 2025


================
@@ -272,6 +273,26 @@ QualType ObjCMessageExpr::getCallReturnType(ASTContext &Ctx) const {
   return Ctx.getReferenceQualifiedType(this);
 }
 
+std::pair<const NamedDecl *, const Attr *>
----------------
erichkeane wrote:

I think we're decades past 'maybe we'll support other kinds some day' :D  

If you're willing to do the change on `CallExpr` at the same time, please do.

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


More information about the cfe-commits mailing list