Skip to content

Commit 86e280b

Browse files
epilkazharudd
authored andcommitted
Fix a clang refactor test broken by a bad merge
(cherry picked from commit ea8d4a0)
1 parent 3ff8ed1 commit 86e280b

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

clang/lib/AST/DeclPrinter.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -599,13 +599,15 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) {
599599
CXXConversionDecl *ConversionDecl = dyn_cast<CXXConversionDecl>(D);
600600
CXXDeductionGuideDecl *GuideDecl = dyn_cast<CXXDeductionGuideDecl>(D);
601601
if (!Policy.SuppressSpecifiers) {
602-
switch (D->getStorageClass()) {
603-
case SC_None: break;
604-
case SC_Extern: Out << "extern "; break;
605-
case SC_Static: Out << "static "; break;
606-
case SC_PrivateExtern: Out << "__private_extern__ "; break;
607-
case SC_Auto: case SC_Register:
608-
llvm_unreachable("invalid for functions");
602+
if (!Policy.SupressStorageClassSpecifiers) {
603+
switch (D->getStorageClass()) {
604+
case SC_None: break;
605+
case SC_Extern: Out << "extern "; break;
606+
case SC_Static: Out << "static "; break;
607+
case SC_PrivateExtern: Out << "__private_extern__ "; break;
608+
case SC_Auto: case SC_Register:
609+
llvm_unreachable("invalid for functions");
610+
}
609611
}
610612

611613
if (D->isInlineSpecified()) Out << "inline ";

0 commit comments

Comments
 (0)