Open mobsceneZ opened 1 year ago
Bug Summary:
C Macros
No definition found
Steps to reproduce:
issue
code .
poc.c
#include <time.h> #include <stdio.h> #include <stdlib.h>
do { \ {block} \ } while (0);
typedef struct { int a; double b; } test;
int main(void) { NOP({ test v1; v1.a = 10;
for (int i = 0; i < 10; i++) { if (rand() % 2) { test v2; } } })
}
5. See the first bug: ![捕获](https://github.com/microsoft/vscode-cpptools/assets/33396195/f40a9d75-c663-4118-b691-e1eba4764908) 7. See the second bug: ![捕获](https://github.com/microsoft/vscode-cpptools/assets/33396195/260e3d42-333a-412b-b218-43d393aacddf) Expected behavior: 1. At least all the type keywords of variables are colorized; 2. 'Go to Definition' points to the correct variable definition location; ### Configuration and Logs ```shell { "configurations": [ { "name": "Linux", "includePath": [ "${workspaceFolder}/**" ], "defines": [], "compilerPath": "/usr/local/bin/clang", "cStandard": "c17", "cppStandard": "c++14", "intelliSenseMode": "linux-clang-x64" } ], "version": 4 } -------- Diagnostics - 11/22/2023, 9:04:19 PM Version: 1.18.5 Current Configuration: { "name": "Linux", "includePath": [ "/home/lain/issue/**" ], "defines": [], "compilerPath": "/usr/local/bin/clang", "cStandard": "c17", "cppStandard": "c++14", "intelliSenseMode": "linux-clang-x64", "compilerPathIsExplicit": true, "cStandardIsExplicit": true, "cppStandardIsExplicit": true, "intelliSenseModeIsExplicit": true, "compilerPathInCppPropertiesJson": "/usr/local/bin/clang", "mergeConfigurations": false, "browse": { "path": [ "/home/lain/issue/**", "${workspaceFolder}" ], "limitSymbolsToIncludedHeaders": true } } cpptools version (native): 1.18.3.0 Translation Unit Mappings: [ /home/lain/issue/poc.c ]: /home/lain/issue/poc.c Translation Unit Configurations: [ /home/lain/issue/poc.c ]: Process ID: 13842 Memory Usage: 11 MB Compiler Path: /usr/local/bin/clang Includes: /home/lain/.wasmedge/include /usr/local/lib/clang/13.0.0/include /usr/local/include /usr/include/x86_64-linux-gnu /usr/include Standard Version: c17 IntelliSense Mode: linux-clang-x64 Other Flags: --clang --clang_version=130000 Total Memory Usage: 11 MB ------- Workspace parsing diagnostics ------- Number of files discovered (not excluded): 23534
No response
I've filed a bug on VS (shared component) at https://developercommunity.visualstudio.com/t/CC-go-to-def-and-semantic-colorizatio/10523632 .
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
C Macros
are not colorized but others are.C Macros
, it showsNo definition found
.Steps to reproduce:
issue
;code .
;poc.c
, and copy following content:define NOP(block) \
typedef struct { int a; double b; } test;
int main(void) { NOP({ test v1; v1.a = 10;
}
Other Extensions
No response
Additional context
No response