diff options
author | Alex Lorenz <arphaman@gmail.com> | 2017-01-03 12:12:36 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2017-01-03 12:12:36 +0000 |
commit | 21c3293b42862390ece7ec1b41aa18e061910912 (patch) | |
tree | f721ad9c6dac5963a087c75acd479d33ca1462c9 | |
parent | eebc494a577adb3d67a778c6fa1488299016ee88 (diff) | |
download | bcm5719-llvm-21c3293b42862390ece7ec1b41aa18e061910912.tar.gz bcm5719-llvm-21c3293b42862390ece7ec1b41aa18e061910912.zip |
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
-rw-r--r-- | clang/lib/Frontend/ASTConsumers.cpp | 4 | ||||
-rw-r--r-- | clang/test/Coverage/cxx-language-features.inc | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Frontend/ASTConsumers.cpp b/clang/lib/Frontend/ASTConsumers.cpp index f5cca139bca..c45b539a569 100644 --- a/clang/lib/Frontend/ASTConsumers.cpp +++ b/clang/lib/Frontend/ASTConsumers.cpp @@ -518,6 +518,10 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC, Out << "<empty>\n"; break; } + case Decl::AccessSpec: { + Out << "<access specifier>\n"; + break; + } default: Out << "DeclKind: " << DK << '"' << I << "\"\n"; llvm_unreachable("decl unhandled"); diff --git a/clang/test/Coverage/cxx-language-features.inc b/clang/test/Coverage/cxx-language-features.inc index 1df4db7d35d..be99eece797 100644 --- a/clang/test/Coverage/cxx-language-features.inc +++ b/clang/test/Coverage/cxx-language-features.inc @@ -55,3 +55,8 @@ template<typename T, bool> struct ClassTemplatePartialSpecialization; template<typename T> struct ClassTemplatePartialSpecialization<T, true> { }; + +// Access specifier +struct AccessSpec { +private: +}; |