ASTPrinter: Pass the bracket options to pre and post printing callbacks.

Need this for rdar://24912860
This commit is contained in:
Xi Ge
2016-03-22 11:34:15 -07:00
parent f79a741a7d
commit 33c53a12eb
9 changed files with 69 additions and 51 deletions

View File

@@ -126,7 +126,8 @@ public:
void printSynthesizedExtensionPre(const ExtensionDecl *ED,
const NominalTypeDecl *Target) override {
const NominalTypeDecl *Target,
Optional<BracketOptions> Bracket) override {
// When we start print a synthesized extension, record the target's USR.
llvm::SmallString<64> Buf;
llvm::raw_svector_ostream OS(Buf);
@@ -136,7 +137,8 @@ public:
}
void printSynthesizedExtensionPost(const ExtensionDecl *ED,
const NominalTypeDecl *Target) override {
const NominalTypeDecl *Target,
Optional<BracketOptions> Bracket) override {
// When we leave a synthesized extension, clear target's USR.
TargetUSR = "";
}