vim-cpp-enhanced-highlight
vim-cpp-enhanced-highlight copied to clipboard
Misleading highlighting in #define with parenthesized expressions
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