r300071 - Moving a C++ test out of Sema and into SemaCXX; NFC.
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 12 08:56:02 PDT 2017
Author: aaronballman
Date: Wed Apr 12 10:56:02 2017
New Revision: 300071
URL: http://llvm.org/viewvc/llvm-project?rev=300071&view=rev
Log:
Moving a C++ test out of Sema and into SemaCXX; NFC.
Added:
cfe/trunk/test/SemaCXX/template-specialization.cpp
Removed:
cfe/trunk/test/Sema/template-specialization.cpp
Removed: cfe/trunk/test/Sema/template-specialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/template-specialization.cpp?rev=300070&view=auto
==============================================================================
--- cfe/trunk/test/Sema/template-specialization.cpp (original)
+++ cfe/trunk/test/Sema/template-specialization.cpp (removed)
@@ -1,21 +0,0 @@
-// RUN: %clang_cc1 -verify -fsyntax-only %s
-// Verify the absence of assertion failures when solving calls to unresolved
-// template member functions.
-
-struct A {
- template <typename T>
- static void bar(int) { } // expected-note {{candidate template ignored: couldn't infer template argument 'T'}}
-};
-
-struct B {
- template <int i>
- static void foo() {
- int array[i];
- A::template bar(array[0]); // expected-error {{no matching function for call to 'bar'}}
- }
-};
-
-int main() {
- B::foo<4>(); // expected-note {{in instantiation of function template specialization 'B::foo<4>'}}
- return 0;
-}
Added: cfe/trunk/test/SemaCXX/template-specialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/template-specialization.cpp?rev=300071&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/template-specialization.cpp (added)
+++ cfe/trunk/test/SemaCXX/template-specialization.cpp Wed Apr 12 10:56:02 2017
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -verify -fsyntax-only %s
+// Verify the absence of assertion failures when solving calls to unresolved
+// template member functions.
+
+struct A {
+ template <typename T>
+ static void bar(int) { } // expected-note {{candidate template ignored: couldn't infer template argument 'T'}}
+};
+
+struct B {
+ template <int i>
+ static void foo() {
+ int array[i];
+ A::template bar(array[0]); // expected-error {{no matching function for call to 'bar'}}
+ }
+};
+
+int main() {
+ B::foo<4>(); // expected-note {{in instantiation of function template specialization 'B::foo<4>'}}
+ return 0;
+}
More information about the cfe-commits
mailing list