]> granicus.if.org Git - clang/commitdiff
Add Forgotten test for: Fix template parameter default args missed if redecled
authorErich Keane <erich.keane@intel.com>
Tue, 24 Oct 2017 13:51:07 +0000 (13:51 +0000)
committerErich Keane <erich.keane@intel.com>
Tue, 24 Oct 2017 13:51:07 +0000 (13:51 +0000)
Addendum to differential revision: https://reviews.llvm.org/D39127

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316437 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/template-default-param-through-using.cpp [new file with mode: 0644]

diff --git a/test/SemaCXX/template-default-param-through-using.cpp b/test/SemaCXX/template-default-param-through-using.cpp
new file mode 100644 (file)
index 0000000..4bf26d5
--- /dev/null
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// expected-no-diagnostics
+namespace llvm {
+  template<typename T > struct StringSet;
+  template<int I > struct Int;
+  template <typename Inner, template <typename> class Outer>
+    struct TemplTempl;
+}
+
+namespace lld {
+  using llvm::StringSet;
+  using llvm::Int;
+  using llvm::TemplTempl;
+};
+
+namespace llvm {
+  template<typename T > struct StringSet;
+}
+
+template<typename T> struct Temp{};
+
+namespace llvm {
+  template<typename T = int> struct StringSet{};
+  template<int I = 5> struct Int{};
+  template <typename Inner, template <typename> class Outer = Temp>
+    struct TemplTempl{};
+};
+
+namespace lld {
+  StringSet<> s;
+  Int<> i;
+  TemplTempl<int> tt;
+}