Skip to content

Commit b541800

Browse files
committed
[clang-doc] Add test case for #141990
When we landed the fix for the assertion in #141990, we hadn't yet reduced the test case sufficiently for a regression test.
1 parent d4791f5 commit b541800

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// RUN: rm -rf %t && mkdir -p %t
2+
// RUN: clang-doc -output=%t %s 2>&1 | FileCheck %s --implicit-check-not="{{warning|error}}"
3+
4+
// COM: This case triggered an assertion before #141990:
5+
// COM: clang-doc: llvm-project/clang/lib/AST/Decl.cpp:2985:
6+
// COM: Expr *clang::ParmVarDecl::getDefaultArg(): Assertion `!hasUninstantiatedDefaultArg()
7+
// COM: && "Default argument is not yet instantiated!"' failed.
8+
9+
template <class = int>
10+
class c;
11+
int e;
12+
13+
template <class>
14+
class c {
15+
public:
16+
void f(int n = e);
17+
};
18+
class B : c<> {};

0 commit comments

Comments
 (0)