From d6968f804ab817c29f9f0ca408279adf82b006f9 Mon Sep 17 00:00:00 2001 From: Jean Abou-Samra Date: Mon, 15 Aug 2022 11:45:13 +0200 Subject: CFamilyLexer: refuse quotes between parentheses for function definitions and declarations (#2208) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Something like id id2("){ ... }"); is no longer wrongly recognized as a "function" id id2(") { ... } "); As the difference in the tests shows, this has the unfortunate side effect that we no longer highlight something like int f(param="default"); as a function declaration, but it is hard to imagine another way to fix this (cf. “most vexing parse” problem). Fixes #2207 --- tests/examplefiles/cpp/example.cpp.output | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/examplefiles/cpp') diff --git a/tests/examplefiles/cpp/example.cpp.output b/tests/examplefiles/cpp/example.cpp.output index b82dd095..1e2444fc 100644 --- a/tests/examplefiles/cpp/example.cpp.output +++ b/tests/examplefiles/cpp/example.cpp.output @@ -944,7 +944,7 @@ ' ' Text.Whitespace 'string' Name ' ' Text.Whitespace -'getOpenTag' Name.Function +'getOpenTag' Name '(' Punctuation 'const' Keyword ' ' Text.Whitespace -- cgit v1.2.1