summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-12-04 00:47:33 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-12-04 00:47:33 +0000
commit95759ff807498e79732669a2c2fa79c814342b9a (patch)
tree8f2f43bb46633815482c7db25a5a8be5d8cda858 /clang/lib
parenta32d85b39da960eed5bc3509f602f0241b8e69a6 (diff)
downloadbcm5719-llvm-95759ff807498e79732669a2c2fa79c814342b9a.tar.gz
bcm5719-llvm-95759ff807498e79732669a2c2fa79c814342b9a.zip
Testing objective-C declarations embedded in
<declaration> tag of Comment XML and fixed a missing declaration of ivars private to @implementation as result of the testing. // rdar://12378714 llvm-svn: 169193
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/DeclPrinter.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index 83f38badd14..35bff1035ec 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -893,7 +893,17 @@ void DeclPrinter::VisitObjCImplementationDecl(ObjCImplementationDecl *OID) {
Out << "@implementation " << I << " : " << *SID;
else
Out << "@implementation " << I;
- Out << "\n";
+
+ if (OID->ivar_size() > 0) {
+ Out << "{\n";
+ Indentation += Policy.Indentation;
+ for (ObjCImplementationDecl::ivar_iterator I = OID->ivar_begin(),
+ E = OID->ivar_end(); I != E; ++I) {
+ Indent() << I->getType().getAsString(Policy) << ' ' << **I << ";\n";
+ }
+ Indentation -= Policy.Indentation;
+ Out << "}\n";
+ }
VisitDeclContext(OID, false);
Out << "@end";
}
OpenPOWER on IntegriCloud