summaryrefslogtreecommitdiffstats
path: root/test/Parser/DelayedTemplateParsing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/DelayedTemplateParsing.cpp')
-rw-r--r--test/Parser/DelayedTemplateParsing.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/test/Parser/DelayedTemplateParsing.cpp b/test/Parser/DelayedTemplateParsing.cpp
index 77b4723..73128c4 100644
--- a/test/Parser/DelayedTemplateParsing.cpp
+++ b/test/Parser/DelayedTemplateParsing.cpp
@@ -11,7 +11,8 @@ class A {
template <class T>
class B {
void foo4() { } // expected-note {{previous definition is here}} expected-note {{previous definition is here}}
- void foo4() { } // expected-error {{class member cannot be redeclared}} expected-error {{redefinition of 'foo4'}} expected-note {{previous definition is here}}
+ void foo4() { } // expected-error {{class member cannot be redeclared}} expected-error {{redefinition of 'foo4'}}
+ void foo5() { } // expected-note {{previous definition is here}}
friend void foo3() {
undeclared();
@@ -20,7 +21,7 @@ class B {
template <class T>
-void B<T>::foo4() {// expected-error {{redefinition of 'foo4'}}
+void B<T>::foo5() { // expected-error {{redefinition of 'foo5'}}
}
template <class T>
@@ -101,3 +102,22 @@ namespace rdar11700604 {
};
}
+namespace PR17334 {
+
+template <typename = void> struct ArrayRef {
+ constexpr ArrayRef() {}
+};
+template <typename = void> void CreateConstInBoundsGEP2_32() {
+ ArrayRef<> IdxList;
+}
+void LLVMBuildStructGEP() { CreateConstInBoundsGEP2_32(); }
+
+}
+
+namespace PR17661 {
+template <typename T>
+constexpr T Fun(T A) { return T(0); }
+
+constexpr int Var = Fun(20);
+}
+
OpenPOWER on IntegriCloud