vim-cpp-enhanced-highlight icon indicating copy to clipboard operation
vim-cpp-enhanced-highlight copied to clipboard

Misleading highlighting in #define with parenthesized expressions

Open distobs opened this issue 3 years ago • 0 comments

In:

#define exp ((1 + 5) / 7.04f)

exp is highlighted as if it were a function, which is not true.

Expected behavior: differentiate #defines from actual function definitions, and highlight or not #defines if there is or isn't whitespace before the parentheses:

#define printint(x) printf("%d\n", x) #define pexp (7.0f + 2.4f)

Highlight printint, but not pexp

distobs avatar Apr 23 '22 15:04 distobs