From 449d351095ce8c18b3ed1a4a825cb4ea266d3bb5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= <daniel.marjamaki@gmail.com>
Date: Sat, 7 May 2022 21:53:10 +0200
Subject: [PATCH] Revert "Tokenizer: handle when __asm__ directive is provided
 for function"

This reverts commit f25b8cf66256ac2ccf9104381313c08356e9af5c.
---
 lib/tokenize.cpp      | 5 -----
 test/testtokenize.cpp | 2 --
 2 files changed, 7 deletions(-)

diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp
index ca2992fec..7f0d80947 100644
--- a/lib/tokenize.cpp
+++ b/lib/tokenize.cpp
@@ -11425,11 +11425,6 @@ void Tokenizer::simplifyAsm()
         else
             continue;
 
-        if (Token::simpleMatch(tok->previous(), ")")) {
-            tok->deleteThis();
-            continue;
-        }
-
         // insert "asm ( "instruction" )"
         tok->str("asm");
         if (tok->strAt(1) != ";" && tok->strAt(1) != "{")
diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp
index 1c191b32f..5ec205cb9 100644
--- a/test/testtokenize.cpp
+++ b/test/testtokenize.cpp
@@ -994,8 +994,6 @@ private:
 
         // 'asm ( ) ;' should be in the same line
         ASSERT_EQUALS(";\n\nasm ( \"\"mov ax,bx\"\" ) ;", tokenizeAndStringify(";\n\n__asm__ volatile ( \"mov ax,bx\" );"));
-
-        ASSERT_EQUALS("void func1 ( ) ;", tokenizeAndStringify("void func1() __asm__(\"...\");"));
     }
 
     // #4725 - ^{}