[PATCH] D108696: [Coroutines] [Frontend] Lookup in std namespace first

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 23 07:17:40 PDT 2021


ldionne added a comment.

This sounds more reasonable to me, however we need to ship `<coroutine>` in libc++ before we enable this, or else we're going to start suggesting that users include `<coroutine>` when we don't have it.



================
Comment at: clang/lib/Sema/SemaCoroutine.cpp:1668
+    if (!CoroNamespace || !LookupQualifiedName(Result, CoroNamespace)) {
+      /// TODO: Lookup in std::expeirmental namespace for compability.
+      /// Remove this once users get familiar with coroutine under std
----------------



================
Comment at: clang/lib/Sema/SemaCoroutine.cpp:1677
       }
+      /// TODO: Add warning here once we updates libcxx.
+    }
----------------
Add a warning about what?


================
Comment at: clang/test/SemaCXX/coroutines-exp-namespace.cpp:2
+// This file is the same with coroutines.cpp except the coroutine components are defined in std::experimental namespace.
+// This intention of this test is to make sure the legacy imeplementation in std::experimental namespace could work.
+// TODO: Remove this test once we didn't support
----------------



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108696/new/

https://reviews.llvm.org/D108696



More information about the cfe-commits mailing list