diff options
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r-- | clang/lib/AST/DeclPrinter.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp index 9273f58..f4265dd0 100644 --- a/clang/lib/AST/DeclPrinter.cpp +++ b/clang/lib/AST/DeclPrinter.cpp @@ -1443,7 +1443,7 @@ void DeclPrinter::VisitObjCMethodDecl(ObjCMethodDecl *OMD) { lastPos = pos + 1; } - if (OMD->param_begin() == OMD->param_end()) + if (OMD->parameters().empty()) Out << name; if (OMD->isVariadic()) @@ -1480,8 +1480,7 @@ void DeclPrinter::VisitObjCImplementationDecl(ObjCImplementationDecl *OID) { } Indentation -= Policy.Indentation; Out << "}\n"; - } - else if (SID || (OID->decls_begin() != OID->decls_end())) { + } else if (SID || !OID->decls().empty()) { Out << "\n"; eolnOut = true; } @@ -1540,8 +1539,7 @@ void DeclPrinter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *OID) { } Indentation -= Policy.Indentation; Out << "}\n"; - } - else if (SID || (OID->decls_begin() != OID->decls_end())) { + } else if (SID || !OID->decls().empty()) { Out << "\n"; eolnOut = true; } |