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

via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 5 19:42:25 PDT 2025


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

It is this way in CallExpr::getUnusedResultAttr too. I would change it in both places?
Maybe is this way so that different Attrs can be supported in the future, not just WarnUnusedResultAttrs.

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


More information about the cfe-commits mailing list