[llvm-bugs] [Bug 40978] New: Clang should raise a compile-error when co_await used in a catch-block
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Wed Mar  6 08:37:40 PST 2019
    
    
  
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: unassignedclangbugs at nondot.org
          Reporter: lewissbaker at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190306/3f768407/attachment.html>
    
    
More information about the llvm-bugs
mailing list