diff options
Diffstat (limited to 'test/Import/template-specialization')
-rw-r--r-- | test/Import/template-specialization/Inputs/T.cpp | 14 | ||||
-rw-r--r-- | test/Import/template-specialization/test.cpp | 7 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/Import/template-specialization/Inputs/T.cpp b/test/Import/template-specialization/Inputs/T.cpp new file mode 100644 index 0000000000000..b31e2439efebd --- /dev/null +++ b/test/Import/template-specialization/Inputs/T.cpp @@ -0,0 +1,14 @@ +template <typename T> struct A { +}; + +template <> struct A<int> { + struct B { + int f; + }; +}; + +template <> struct A<bool> { + struct B { + int g; + }; +}; diff --git a/test/Import/template-specialization/test.cpp b/test/Import/template-specialization/test.cpp new file mode 100644 index 0000000000000..43996c53a77ed --- /dev/null +++ b/test/Import/template-specialization/test.cpp @@ -0,0 +1,7 @@ +// RUN: clang-import-test -import %S/Inputs/T.cpp -expression %s +// XFAIL: * +void expr() { + A<int>::B b1; + A<bool>::B b2; + b1.f + b2.g; +} |