forked from OSchip/llvm-project
Handle AccessSpecDecl in DeclContextPrinter
This commit fixes a crash that occurs when -print-decl-contexts AST consumer tries to print an unhandled declaration. rdar://19467234 Differential Revision: https://reviews.llvm.org/D26964 llvm-svn: 290885
This commit is contained in:
parent
eebc494a57
commit
21c3293b42
|
@ -518,6 +518,10 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC,
|
||||||
Out << "<empty>\n";
|
Out << "<empty>\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case Decl::AccessSpec: {
|
||||||
|
Out << "<access specifier>\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
Out << "DeclKind: " << DK << '"' << I << "\"\n";
|
Out << "DeclKind: " << DK << '"' << I << "\"\n";
|
||||||
llvm_unreachable("decl unhandled");
|
llvm_unreachable("decl unhandled");
|
||||||
|
|
|
@ -55,3 +55,8 @@ template<typename T, bool> struct ClassTemplatePartialSpecialization;
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct ClassTemplatePartialSpecialization<T, true> { };
|
struct ClassTemplatePartialSpecialization<T, true> { };
|
||||||
|
|
||||||
|
// Access specifier
|
||||||
|
struct AccessSpec {
|
||||||
|
private:
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue