forked from OSchip/llvm-project
[DeclPrinter] Don't crash when printing a using decl with a special name
Fixes PR24872. llvm-svn: 248376
This commit is contained in:
parent
a3e553a22c
commit
36d514e687
|
@ -1299,7 +1299,7 @@ void DeclPrinter::VisitUnresolvedUsingValueDecl(UnresolvedUsingValueDecl *D) {
|
|||
if (!D->isAccessDeclaration())
|
||||
Out << "using ";
|
||||
D->getQualifier()->print(Out, Policy);
|
||||
Out << D->getName();
|
||||
Out << D->getDeclName();
|
||||
}
|
||||
|
||||
void DeclPrinter::VisitUsingShadowDecl(UsingShadowDecl *D) {
|
||||
|
|
|
@ -219,3 +219,11 @@ struct CXXFunctionalCastExprPrint {} fce = CXXFunctionalCastExprPrint{};
|
|||
|
||||
// CHECK: struct CXXTemporaryObjectExprPrint toe = CXXTemporaryObjectExprPrint{};
|
||||
struct CXXTemporaryObjectExprPrint { CXXTemporaryObjectExprPrint(); } toe = CXXTemporaryObjectExprPrint{};
|
||||
|
||||
namespace PR24872 {
|
||||
// CHECK: template <typename T> struct Foo : T {
|
||||
// CHECK: using T::operator-;
|
||||
template <typename T> struct Foo : T {
|
||||
using T::operator-;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue