]> granicus.if.org Git - clang/commitdiff
Rename test to match C++1y paragraph number per N3690, and add additional test
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 7 Jul 2013 06:15:42 +0000 (06:15 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 7 Jul 2013 06:15:42 +0000 (06:15 +0000)
case inspired by a stackoverflow question.

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

test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-1y.cpp [moved from test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p6-1y.cpp with 97% similarity]
test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7.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 66085eda3d7353cead88ae317cfe26f6afc5fc07..f7b3e8e7be6321db659743fff5dd0c35b7dc78f6 100644 (file)
@@ -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();
 
index 9c1d397a1fbc100d6d5772423da3fd83b26eaf11..8d789bdd5ad38355bca0e591bf549b4d432e27d7 100644 (file)
@@ -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<typename T> void h() {
+  auto a = T(), *b = &a;
+#if __has_feature(cxx_decltype)
+  auto c = T(), d = decltype(c)(0);
+#endif
 }
+template void h<int>();
+template void h<unsigned long>();