better-cpp-syntax icon indicating copy to clipboard operation
better-cpp-syntax copied to clipboard

attribute in macro can break syntax highlighting

Open hokein opened this issue 5 years ago • 1 comments

moved from https://github.com/clangd/clangd/issues/385

The code with a problem is:

#pragma once

#if 1
#   define MACRO(attr) [[attr]]
#else
#   define MACRO(attr)
#endif

struct S {
    MACRO(deprecated("some unrecognized string size() some unrecognized string"))
    int f() { return 0; }
};

It looks like:

image

vscode 1.45.0 without any cpp extension.

hokein avatar May 12 '20 13:05 hokein

And another example here: https://github.com/microsoft/vscode-cpptools/issues/6560

ytimenkov avatar Nov 24 '20 05:11 ytimenkov