From 0f50091011f2bf82efd460264f2f40781a85f72b Mon Sep 17 00:00:00 2001 From: Michael Kenzel Date: Mon, 27 May 2024 14:17:04 +0200 Subject: [PATCH] Turn off "statement with no effect" warning for asm with memory clobber --- src/ast.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ast.cpp b/src/ast.cpp index f11eb04..f41be10 100644 --- a/src/ast.cpp +++ b/src/ast.cpp @@ -604,7 +604,7 @@ bool ImplicitCastExpr::is_constant() const { } bool AsmExpr::has_side_effect() const { - return !outs.empty() || std::find(opts.begin(), opts.end(), "volatile") != opts.end(); + return !outs.empty() || std::find(opts.begin(), opts.end(), "volatile") != opts.end() || std::find(clobs.begin(), clobs.end(), "memory") != clobs.end(); } // Patterns ------------------------------------------------------------------------