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

@@ -183,11 +183,11 @@ private:
// MARK: The ASTPrinter callback interface.
void printDeclPre(const Decl *D) override {
void printDeclPre(const Decl *D, Optional<BracketOptions> Bracket) override {
contextStack.emplace_back(PrintContext(D));
openTag(getTagForDecl(D, /*isRef=*/false));
}
void printDeclPost(const Decl *D) override {
void printDeclPost(const Decl *D, Optional<BracketOptions> Bracket) override {
assert(contextStack.back().getDecl() == D && "unmatched printDeclPre");
contextStack.pop_back();
closeTag(getTagForDecl(D, /*isRef=*/false));