Disable the coroutines tests until Clang bumps __cpp_coroutines to reflect recent changes

llvm-svn: 303837
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: d791d4ea3c254a0112c1c67c7fd5054a39efa76b
diff --git a/utils/libcxx/test/config.py b/utils/libcxx/test/config.py
index 2b89a1c..1bf2677 100644
--- a/utils/libcxx/test/config.py
+++ b/utils/libcxx/test/config.py
@@ -957,7 +957,15 @@
 
     def configure_coroutines(self):
         if self.cxx.hasCompileFlag('-fcoroutines-ts'):
-            self.config.available_features.add('fcoroutines-ts')
+            macros = self.cxx.dumpMacros(flags=['-fcoroutines-ts'])
+            if '__cpp_coroutines' not in macros:
+                self.lit_config.warning('-fcoroutines-ts is supported but '
+                    '__cpp_coroutines is not defined')
+            # Consider coroutines supported only when the feature test macro
+            # reflects a recent value.
+            val = macros['__cpp_coroutines'].replace('L', '')
+            if int(val) >= 201703:
+                self.config.available_features.add('fcoroutines-ts')
 
     def configure_modules(self):
         modules_flags = ['-fmodules']