Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Syntax highlighting for clang extensions in Visual Studio & VSCode?

I'm working with some clang extensions via __attribute__, for example:

typedef float Mat   __attribute__((ext_vector_type(16)));

In both VisualStudio and VSCode, these show red underlines in the editor, and when I hover, I see syntax errors. In VisualStudio, these also show up under View->Errorlist as:

Error (active)  E0065   expected a ';'  
Error (active)  E0020   identifier "overloadable" is undefined  

But the code compiles and runs as expected. How do I get Visual Studio and VSCode to recognize the clang extension syntax?

Comments