diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-07 11:57:45 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-07 11:57:45 +0000 |
commit | 2f56992964a308e85ea5b39e836d04d498ea521d (patch) | |
tree | ee678dc0348e4d50bcdb14fb2f7e4e2f2e292a73 /clang/lib | |
parent | 59580dbf52db290de2d099e70e2e9345a2e9747b (diff) | |
download | bcm5719-llvm-2f56992964a308e85ea5b39e836d04d498ea521d.tar.gz bcm5719-llvm-2f56992964a308e85ea5b39e836d04d498ea521d.zip |
Switch the ObjC*Decl raw_stream overloads to take a reference, for consistency with NamedDecls.
llvm-svn: 149981
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/DeclObjC.cpp | 8 | ||||
-rw-r--r-- | clang/lib/AST/Expr.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/Mangle.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 2 | ||||
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index 2b97cf56861..d0083855bb4 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/lib/AST/DeclObjC.cpp @@ -1191,8 +1191,8 @@ FindPropertyImplDecl(IdentifierInfo *Id) const { } raw_ostream &clang::operator<<(raw_ostream &OS, - const ObjCCategoryImplDecl *CID) { - OS << CID->getName(); + const ObjCCategoryImplDecl &CID) { + OS << CID.getName(); return OS; } @@ -1235,8 +1235,8 @@ void ObjCImplementationDecl::setIvarInitializers(ASTContext &C, } raw_ostream &clang::operator<<(raw_ostream &OS, - const ObjCImplementationDecl *ID) { - OS << ID->getName(); + const ObjCImplementationDecl &ID) { + OS << ID.getName(); return OS; } diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index f2ebd8cf48b..398e27ea971 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -433,7 +433,7 @@ std::string PredefinedExpr::ComputeName(IdentType IT, const Decl *CurrentDecl) { if (const ObjCCategoryImplDecl *CID = dyn_cast<ObjCCategoryImplDecl>(MD->getDeclContext())) - Out << '(' << CID << ')'; + Out << '(' << *CID << ')'; Out << ' '; Out << MD->getSelector().getAsString(); diff --git a/clang/lib/AST/Mangle.cpp b/clang/lib/AST/Mangle.cpp index c1f762be9ba..73c9f5778f4 100644 --- a/clang/lib/AST/Mangle.cpp +++ b/clang/lib/AST/Mangle.cpp @@ -124,7 +124,7 @@ void MangleContext::mangleObjCMethodName(const ObjCMethodDecl *MD, assert (CD && "Missing container decl in GetNameForMethod"); OS << (MD->isInstanceMethod() ? '-' : '+') << '[' << CD->getName(); if (const ObjCCategoryImplDecl *CID = dyn_cast<ObjCCategoryImplDecl>(CD)) - OS << '(' << CID << ')'; + OS << '(' << *CID << ')'; OS << ' ' << MD->getSelector().getAsString() << ']'; Out << OS.str().size() << OS.str(); diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index 5d55cb1d8e9..d2701f71b75 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -4208,7 +4208,7 @@ void CGObjCCommonMac::GetNameForMethod(const ObjCMethodDecl *D, << '[' << CD->getName(); if (const ObjCCategoryImplDecl *CID = dyn_cast<ObjCCategoryImplDecl>(D->getDeclContext())) - OS << '(' << CID << ')'; + OS << '(' << *CID << ')'; OS << ' ' << D->getSelector().getAsString() << ']'; } diff --git a/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp b/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp index c325bb1517f..07383317c0e 100644 --- a/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp @@ -177,7 +177,7 @@ static void checkObjCDealloc(const ObjCImplementationDecl *D, std::string buf; llvm::raw_string_ostream os(buf); - os << "Objective-C class '" << D << "' lacks a 'dealloc' instance method"; + os << "Objective-C class '" << *D << "' lacks a 'dealloc' instance method"; BR.EmitBasicReport(name, os.str(), DLoc); return; @@ -192,7 +192,7 @@ static void checkObjCDealloc(const ObjCImplementationDecl *D, std::string buf; llvm::raw_string_ostream os(buf); - os << "The 'dealloc' instance method in Objective-C class '" << D + os << "The 'dealloc' instance method in Objective-C class '" << *D << "' does not send a 'dealloc' message to its super class" " (missing [super dealloc])"; |