aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-10-14 18:45:37 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-10-14 18:45:37 +0000
commitb8989f27f116ff2400e92a52c067a69846119eb5 (patch)
treefad64c15a367b5059588e3d6d3a70e08044048ac /lib/AST/Decl.cpp
parent2b5cfbc0b074ef77ccac407533d27778ace4028c (diff)
Change operator<< for raw_ostream and NamedDecl to take a reference instead of a pointer.
Passing a pointer was a bad idea as it collides with the overload for void*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 3e5c253737..95d52cb0fa 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -847,18 +847,18 @@ std::string NamedDecl::getQualifiedNameAsString(const PrintingPolicy &P) const {
if (ND->isAnonymousNamespace())
OS << "<anonymous namespace>";
else
- OS << ND;
+ OS << *ND;
} else if (const RecordDecl *RD = dyn_cast<RecordDecl>(*I)) {
if (!RD->getIdentifier())
OS << "<anonymous " << RD->getKindName() << '>';
else
- OS << RD;
+ OS << *RD;
} else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) {
const FunctionProtoType *FT = 0;
if (FD->hasWrittenPrototype())
FT = dyn_cast<FunctionProtoType>(FD->getType()->getAs<FunctionType>());
- OS << FD << '(';
+ OS << *FD << '(';
if (FT) {
unsigned NumParams = FD->getNumParams();
for (unsigned i = 0; i < NumParams; ++i) {
@@ -877,13 +877,13 @@ std::string NamedDecl::getQualifiedNameAsString(const PrintingPolicy &P) const {
}
OS << ')';
} else {
- OS << cast<NamedDecl>(*I);
+ OS << *cast<NamedDecl>(*I);
}
OS << "::";
}
if (getDeclName())
- OS << this;
+ OS << *this;
else
OS << "<anonymous>";