From: Richard Smith Date: Sun, 7 Jul 2013 06:15:42 +0000 (+0000) Subject: Rename test to match C++1y paragraph number per N3690, and add additional test X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=732277ac26b0ad6cf6c78a039f8f504c2203261f;p=clang Rename test to match C++1y paragraph number per N3690, and add additional test case inspired by a stackoverflow question. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185772 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p6-1y.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-1y.cpp similarity index 97% rename from test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p6-1y.cpp rename to test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-1y.cpp index 66085eda3d..f7b3e8e7be 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p6-1y.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-1y.cpp @@ -8,9 +8,6 @@ namespace std { }; } -// FIXME: This may not be p6 in C++1y; N3638 isn't very clear whether paragraphs -// were added. It might be p8? - int i; int &&f(); diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7.cpp index 9c1d397a1f..8d789bdd5a 100644 --- a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7.cpp +++ b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7.cpp @@ -29,4 +29,17 @@ void g() { (*e)() -> void, #endif f = 0.0; + +#if __has_feature(cxx_decltype) + auto g = 0ull, h = decltype(g)(0); +#endif +} + +template void h() { + auto a = T(), *b = &a; +#if __has_feature(cxx_decltype) + auto c = T(), d = decltype(c)(0); +#endif } +template void h(); +template void h();