[PATCH] D125517: [Frontend] [Coroutines] Emit error when we found incompatible allocation function in promise_type

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 13 06:58:18 PDT 2022


erichkeane added inline comments.


================
Comment at: clang/lib/Sema/SemaCoroutine.cpp:1312
+
+  bool PromiseContainNew = [this, &PromiseType]() -> bool {
+    DeclarationName NewName =
----------------
Slight preference to just have this as a part of LookupAllocationFunction.


================
Comment at: clang/lib/Sema/SemaCoroutine.cpp:1329
+    if (PromiseContainNew)
+      S.FindAllocationFunctions(Loc, SourceRange(),
+                                /*NewScope*/ Sema::AFS_Class,
----------------
It looks like the NewScope is the only difference between these?  I wonder if it might be better off doing the PromiseContainsNew work to just set a variable to THAT and use it later?


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

https://reviews.llvm.org/D125517



More information about the cfe-commits mailing list