[clang] [coroutine] Suppress unreachable-code warning on coroutine statements. (PR #77454)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 19 06:30:15 PST 2024


================
@@ -0,0 +1,50 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -std=c++20 -fsyntax-only -verify -Wunreachable-code
+
+#include "Inputs/std-coroutine.h"
+
+extern void abort (void) __attribute__ ((__noreturn__));
+
+struct task {
+  struct promise_type {
+    std::suspend_always initial_suspend();
+    std::suspend_always final_suspend() noexcept;
+    void return_void();
+    std::suspend_always yield_value(int) { return {}; }
+    task get_return_object();
----------------
usx95 wrote:

Sorry, I meant to leave a suggestion here but accidentally committed my suggestion. I removed some spaces here. Please pull it locally before working further.

https://github.com/llvm/llvm-project/pull/77454


More information about the cfe-commits mailing list