Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream.

The next step is to print the name directly into the stream, avoiding a temporary std::string copy.

llvm-svn: 101632
diff --git a/clang/lib/Checker/CheckObjCInstMethSignature.cpp b/clang/lib/Checker/CheckObjCInstMethSignature.cpp
index 8c43a45..76a0923 100644
--- a/clang/lib/Checker/CheckObjCInstMethSignature.cpp
+++ b/clang/lib/Checker/CheckObjCInstMethSignature.cpp
@@ -49,16 +49,16 @@
     llvm::raw_string_ostream os(sbuf);
 
     os << "The Objective-C class '"
-       << MethDerived->getClassInterface()->getNameAsString()
+       << MethDerived->getClassInterface()
        << "', which is derived from class '"
-       << MethAncestor->getClassInterface()->getNameAsString()
+       << MethAncestor->getClassInterface()
        << "', defines the instance method '"
        << MethDerived->getSelector().getAsString()
        << "' whose return type is '"
        << ResDerived.getAsString()
        << "'.  A method with the same name (same selector) is also defined in "
           "class '"
-       << MethAncestor->getClassInterface()->getNameAsString()
+       << MethAncestor->getClassInterface()
        << "' and has a return type of '"
        << ResAncestor.getAsString()
        << "'.  These two types are incompatible, and may result in undefined "