Skip to content

Commit f8f8d85

Browse files
author
git apple-llvm automerger
committed
Merge commit 'ddc8db792a80' from llvm.org/main into next
2 parents c751011 + ddc8db7 commit f8f8d85

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang-tools-extra/clang-doc/Serialize.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ getFunctionPrototype(const FunctionDecl *FuncDecl) {
113113
Stream << " " << ParamDecl->getNameAsString();
114114

115115
// Print default argument if it exists
116-
if (ParamDecl->hasDefaultArg()) {
117-
const Expr *DefaultArg = ParamDecl->getDefaultArg();
118-
if (DefaultArg) {
116+
if (ParamDecl->hasDefaultArg() &&
117+
!ParamDecl->hasUninstantiatedDefaultArg()) {
118+
if (const Expr *DefaultArg = ParamDecl->getDefaultArg()) {
119119
Stream << " = ";
120120
DefaultArg->printPretty(Stream, nullptr, Ctx.getPrintingPolicy());
121121
}

0 commit comments

Comments
 (0)