[clang] [clang][ast][objc] Implement getNameForDiagnostic for ObjCMethodDecl and ObjCPropertyDecl. (PR #213030)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 31 08:16:48 PDT 2026


================
@@ -2365,6 +2383,33 @@ ObjCPropertyDecl *ObjCPropertyDecl::CreateDeserialized(ASTContext &C,
                                       QualType(), nullptr, None);
 }
 
+void ObjCPropertyDecl::getNameForDiagnostic(raw_ostream &OS,
+                                            const PrintingPolicy &Policy,
+                                            bool Qualified) const {
+  if (Qualified) {
----------------
steakhal wrote:

Given that the else branch is a oneliner, I'd suggest flipping the condition and returning early to reduce the indentation for the bulk of the code.

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


More information about the cfe-commits mailing list