Skip to content

Commit 63ba6c9

Browse files
committed
Add a lit test.
1 parent 184a449 commit 63ba6c9

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#pragma once
2+
3+
#include "shared_ptr2.h"
4+
5+
inline void f() {
6+
x<int>();
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module hoge {
2+
header "hoge.h"
3+
}
4+
5+
module shared_ptr2 {
6+
header "shared_ptr2.h"
7+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#pragma once
2+
3+
template<class T>
4+
void x() { }
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// RUN: rm -rf %t
2+
// RUN: %clang_cc1 -std=c++20 -fmodules -fmodules-cache-path=%t -I%S/Inputs/undefined-template \
3+
// RUN: -Wundefined-func-template \
4+
// RUN: -fimplicit-module-maps %s 2>&1 | grep "declaration of template entity is unreachable here"
5+
6+
#include "hoge.h"
7+
8+
int main() {
9+
f();
10+
}

0 commit comments

Comments
 (0)