1b80b6a9a2f9f9048ca0113adb2fba2700f89a3a5Douglas Gregor// RUN: %clang_cc1 -fsyntax-only -verify -Wc++11-compat %s 2a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregor 3a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregornamespace N { 4a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregor template<class T> class Y { // expected-note{{explicit instantiation refers here}} 5a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregor void mf() { } 6a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregor }; 7a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregor} 8a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregor 9fc4cdc9e773e417a67ac53160ced64dd783f0236Douglas Gregortemplate class Z<int>; // expected-error{{explicit instantiation of non-template class 'Z'}} 10a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregor 11a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregor// FIXME: This example from the standard is wrong; note posted to CWG reflector 12a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregor// on 10/27/2009 13a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregorusing N::Y; 14dec66e7d561ef6363f0cf77832b105c960e2a80aDouglas Gregortemplate class Y<int>; // expected-warning{{must occur in}} 15a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregor 16a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregortemplate class N::Y<char*>; 17a797f372ba94a648ccfaf3f1ac27b5da67a08c41Douglas Gregortemplate void N::Y<double>::mf(); 18