================
@@ -7584,11 +7584,22 @@ static void 
visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call,
 
   if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee))
     VisitLifetimeBoundArg(Callee, ObjectArg);
-
+  bool checkCoroCall = false;
+  if (const auto *RD = Callee->getReturnType()->getAsRecordDecl()) {
+    for (const auto &attr :
+         RD->getUnderlyingDecl()->specific_attrs<clang::AnnotateAttr>()) {
+      // Only for demonstration: Get feedback and add a clang annotation as an
+      // extension.
+      if (attr->getAnnotation() == "coro_type") {
----------------
bcardosolopes wrote:

I don't think you need this to find if a record is a "coroutine type", there 
are other ways, for example:
```
if (rec->getDeclName().isIdentifier() && rec->getName() == "promise_type") {
....
```

https://github.com/llvm/llvm-project/pull/69360
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to