https://bugs.llvm.org/show_bug.cgi?id=40978

            Bug ID: 40978
           Summary: Clang should raise a compile-error when co_await used
                    in a catch-block
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

The Coroutines TS N4775 [expr.await] paragraph 2 states:
> An await-expression shall appear only in a potentially-evaluated expression
> within the compound-statement of a function-body outside of a handler (Clause 
> 18).

However, current trunk version of clang does not emit a
compile-error/diagnostic when a co_await expression is used within a handler.

https://godbolt.org/z/24MgJZ

Clang should be detecting use of co_await within a catch block and raising a
compile-error that indicates this is not allowed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to