summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-12-18 23:02:59 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-12-18 23:02:59 +0000
commit9b7ab87738a6e4225005cff36e7aa1e735df5236 (patch)
tree27497a1cc82347f49b5669a2e807a97152c3520b /clang/lib
parentdfc9430bc7536c9f4599d586afce43606337dedb (diff)
downloadbcm5719-llvm-9b7ab87738a6e4225005cff36e7aa1e735df5236.tar.gz
bcm5719-llvm-9b7ab87738a6e4225005cff36e7aa1e735df5236.zip
This is the libclang patch providing minimal API to
use clang's formatter. Currently, formatter is used to format declaration tags for xml comments. Since formatter is in flux and its change will break several of the clang comment tests, only a single tests is formatted using this facility. Doug has reviewed and approved it for check-in. llvm-svn: 170467
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/DeclPrinter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index 5cef00f1874..34c69059c4b 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/lib/AST/DeclPrinter.cpp
@@ -915,6 +915,8 @@ void DeclPrinter::VisitObjCMethodDecl(ObjCMethodDecl *OMD) {
OMD->getBody()->printPretty(Out, 0, Policy);
Out << '\n';
}
+ else
+ Out << ';';
}
void DeclPrinter::VisitObjCImplementationDecl(ObjCImplementationDecl *OID) {
@@ -1093,7 +1095,7 @@ void DeclPrinter::VisitObjCPropertyDecl(ObjCPropertyDecl *PDecl) {
(void) first; // Silence dead store warning due to idiomatic code.
Out << " )";
}
- Out << ' ' << PDecl->getType().getAsString(Policy) << ' ' << *PDecl;
+ Out << ' ' << PDecl->getType().getAsString(Policy) << ' ' << *PDecl << ';';
}
void DeclPrinter::VisitObjCPropertyImplDecl(ObjCPropertyImplDecl *PID) {
OpenPOWER on IntegriCloud