[libcxx] r220296 - Some tests used __typeof__ instead of decltype. Replace these usages.

Marshall Clow mclow.lists at gmail.com
Tue Oct 21 08:07:10 PDT 2014


Author: marshall
Date: Tue Oct 21 10:07:09 2014
New Revision: 220296

URL: http://llvm.org/viewvc/llvm-project?rev=220296&view=rev
Log:
Some tests used __typeof__ instead of decltype. Replace these usages.

Modified:
    libcxx/trunk/test/depr/depr.c.headers/locale_h.pass.cpp
    libcxx/trunk/test/depr/depr.c.headers/setjmp_h.pass.cpp
    libcxx/trunk/test/language.support/support.runtime/csetjmp.pass.cpp
    libcxx/trunk/test/localization/c.locales/clocale.pass.cpp

Modified: libcxx/trunk/test/depr/depr.c.headers/locale_h.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/depr/depr.c.headers/locale_h.pass.cpp?rev=220296&r1=220295&r2=220296&view=diff
==============================================================================
--- libcxx/trunk/test/depr/depr.c.headers/locale_h.pass.cpp (original)
+++ libcxx/trunk/test/depr/depr.c.headers/locale_h.pass.cpp Tue Oct 21 10:07:09 2014
@@ -43,6 +43,6 @@
 int main()
 {
     lconv lc;
-    static_assert((std::is_same<__typeof__(setlocale(0, "")), char*>::value), "");
-    static_assert((std::is_same<__typeof__(localeconv()), lconv*>::value), "");
+    static_assert((std::is_same<decltype(setlocale(0, "")), char*>::value), "");
+    static_assert((std::is_same<decltype(localeconv()), lconv*>::value), "");
 }

Modified: libcxx/trunk/test/depr/depr.c.headers/setjmp_h.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/depr/depr.c.headers/setjmp_h.pass.cpp?rev=220296&r1=220295&r2=220296&view=diff
==============================================================================
--- libcxx/trunk/test/depr/depr.c.headers/setjmp_h.pass.cpp (original)
+++ libcxx/trunk/test/depr/depr.c.headers/setjmp_h.pass.cpp Tue Oct 21 10:07:09 2014
@@ -15,6 +15,6 @@
 int main()
 {
     jmp_buf jb;
-    static_assert((std::is_same<__typeof__(longjmp(jb, 0)), void>::value),
-                  "std::is_same<__typeof__(longjmp(jb, 0)), void>::value");
+    static_assert((std::is_same<decltype(longjmp(jb, 0)), void>::value),
+                  "std::is_same<decltype(longjmp(jb, 0)), void>::value");
 }

Modified: libcxx/trunk/test/language.support/support.runtime/csetjmp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/language.support/support.runtime/csetjmp.pass.cpp?rev=220296&r1=220295&r2=220296&view=diff
==============================================================================
--- libcxx/trunk/test/language.support/support.runtime/csetjmp.pass.cpp (original)
+++ libcxx/trunk/test/language.support/support.runtime/csetjmp.pass.cpp Tue Oct 21 10:07:09 2014
@@ -19,6 +19,6 @@
 int main()
 {
     std::jmp_buf jb;
-    static_assert((std::is_same<__typeof__(std::longjmp(jb, 0)), void>::value),
-                  "std::is_same<__typeof__(std::longjmp(jb, 0)), void>::value");
+    static_assert((std::is_same<decltype(std::longjmp(jb, 0)), void>::value),
+                  "std::is_same<decltype(std::longjmp(jb, 0)), void>::value");
 }

Modified: libcxx/trunk/test/localization/c.locales/clocale.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/localization/c.locales/clocale.pass.cpp?rev=220296&r1=220295&r2=220296&view=diff
==============================================================================
--- libcxx/trunk/test/localization/c.locales/clocale.pass.cpp (original)
+++ libcxx/trunk/test/localization/c.locales/clocale.pass.cpp Tue Oct 21 10:07:09 2014
@@ -43,6 +43,6 @@
 int main()
 {
     std::lconv lc;
-    static_assert((std::is_same<__typeof__(std::setlocale(0, "")), char*>::value), "");
-    static_assert((std::is_same<__typeof__(std::localeconv()), std::lconv*>::value), "");
+    static_assert((std::is_same<decltype(std::setlocale(0, "")), char*>::value), "");
+    static_assert((std::is_same<decltype(std::localeconv()), std::lconv*>::value), "");
 }





More information about the cfe-commits mailing list