Skip to content

Commit 4ea13a8

Browse files
committed
[clang][AST] urgent fix for lldb dap tests, remove the assertion
1 parent fac4547 commit 4ea13a8

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

clang/lib/AST/DeclPrinter.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -678,11 +678,8 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) {
678678
CXXConversionDecl *ConversionDecl = dyn_cast<CXXConversionDecl>(D);
679679
CXXDeductionGuideDecl *GuideDecl = dyn_cast<CXXDeductionGuideDecl>(D);
680680
if (!Policy.SuppressSpecifiers) {
681-
if (const char *Lang = tryGetUnbracedLinkageLanguage(D)) {
682-
// the "extern" specifier is implicit
683-
assert(D->getStorageClass() == SC_None);
681+
if (const char *Lang = tryGetUnbracedLinkageLanguage(D))
684682
Out << "extern \"" << Lang << "\" ";
685-
}
686683
switch (D->getStorageClass()) {
687684
case SC_None: break;
688685
case SC_Extern: Out << "extern "; break;
@@ -953,11 +950,8 @@ void DeclPrinter::VisitVarDecl(VarDecl *D) {
953950
: D->getASTContext().getUnqualifiedObjCPointerType(D->getType());
954951

955952
if (!Policy.SuppressSpecifiers) {
956-
if (const char *Lang = tryGetUnbracedLinkageLanguage(D)) {
957-
// the "extern" specifier is implicit
958-
assert(D->getStorageClass() == SC_None);
953+
if (const char *Lang = tryGetUnbracedLinkageLanguage(D))
959954
Out << "extern \"" << Lang << "\" ";
960-
}
961955
StorageClass SC = D->getStorageClass();
962956
if (SC != SC_None)
963957
Out << VarDecl::getStorageClassSpecifierString(SC) << " ";

0 commit comments

Comments
 (0)