[cfe-commits] r149981 - in /cfe/trunk: include/clang/AST/DeclObjC.h lib/AST/DeclObjC.cpp lib/AST/Expr.cpp lib/AST/Mangle.cpp lib/CodeGen/CGObjCMac.cpp lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
Benjamin Kramer
benny.kra at googlemail.com
Tue Feb 7 03:57:45 PST 2012
Author: d0k
Date: Tue Feb 7 05:57:45 2012
New Revision: 149981
URL: http://llvm.org/viewvc/llvm-project?rev=149981&view=rev
Log:
Switch the ObjC*Decl raw_stream overloads to take a reference, for consistency with NamedDecls.
Modified:
cfe/trunk/include/clang/AST/DeclObjC.h
cfe/trunk/lib/AST/DeclObjC.cpp
cfe/trunk/lib/AST/Expr.cpp
cfe/trunk/lib/AST/Mangle.cpp
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=149981&r1=149980&r2=149981&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Tue Feb 7 05:57:45 2012
@@ -1498,8 +1498,7 @@
friend class ASTDeclWriter;
};
-raw_ostream &operator<<(raw_ostream &OS,
- const ObjCCategoryImplDecl *CID);
+raw_ostream &operator<<(raw_ostream &OS, const ObjCCategoryImplDecl &CID);
/// ObjCImplementationDecl - Represents a class definition - this is where
/// method definitions are specified. For example:
@@ -1643,8 +1642,7 @@
friend class ASTDeclWriter;
};
-raw_ostream &operator<<(raw_ostream &OS,
- const ObjCImplementationDecl *ID);
+raw_ostream &operator<<(raw_ostream &OS, const ObjCImplementationDecl &ID);
/// ObjCCompatibleAliasDecl - Represents alias of a class. This alias is
/// declared as @compatibility_alias alias class.
Modified: cfe/trunk/lib/AST/DeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=149981&r1=149980&r2=149981&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclObjC.cpp (original)
+++ cfe/trunk/lib/AST/DeclObjC.cpp Tue Feb 7 05:57:45 2012
@@ -1191,8 +1191,8 @@
}
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 @@
}
raw_ostream &clang::operator<<(raw_ostream &OS,
- const ObjCImplementationDecl *ID) {
- OS << ID->getName();
+ const ObjCImplementationDecl &ID) {
+ OS << ID.getName();
return OS;
}
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=149981&r1=149980&r2=149981&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Tue Feb 7 05:57:45 2012
@@ -433,7 +433,7 @@
if (const ObjCCategoryImplDecl *CID =
dyn_cast<ObjCCategoryImplDecl>(MD->getDeclContext()))
- Out << '(' << CID << ')';
+ Out << '(' << *CID << ')';
Out << ' ';
Out << MD->getSelector().getAsString();
Modified: cfe/trunk/lib/AST/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Mangle.cpp?rev=149981&r1=149980&r2=149981&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Mangle.cpp (original)
+++ cfe/trunk/lib/AST/Mangle.cpp Tue Feb 7 05:57:45 2012
@@ -124,7 +124,7 @@
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();
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=149981&r1=149980&r2=149981&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Tue Feb 7 05:57:45 2012
@@ -4208,7 +4208,7 @@
<< '[' << CD->getName();
if (const ObjCCategoryImplDecl *CID =
dyn_cast<ObjCCategoryImplDecl>(D->getDeclContext()))
- OS << '(' << CID << ')';
+ OS << '(' << *CID << ')';
OS << ' ' << D->getSelector().getAsString() << ']';
}
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp?rev=149981&r1=149980&r2=149981&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp Tue Feb 7 05:57:45 2012
@@ -177,7 +177,7 @@
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 @@
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])";
More information about the cfe-commits
mailing list