-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Struct definition inside function not supported #2442
Comments
I think the problem is the green squiggle at the top of the file. It causes us to switch IntelliSense over to our tag parser implementation which does not parse out local variables and types. Can you share your The Goto defintion issue is known and we are tracking it with #255. |
The file I indeed ignored the green squiggles because I don't care if standard headers are not found. It is normal that the extension didn't find them because they are in an unusual directory.
When removing I don't really want to fix the missing include if it isn't absolutely required since it is an extra effort to me. |
Click on the green squiggle, then click on the lightbulb that appears and select "force semantic IntelliSense" |
When removing When forcing semantic IntelliSense ( If I remove the include, then it works again as expected, no matter if semantic IntelliSense was forced. |
Thanks for the info. I can reproduce your issue. We'll investigate. |
The Go to Definition on "bar" has been fixed with 0.19.0. I'm not able to repro the completion issue with the fallback even with 0.18.1 -- @bobbrow since you appear to have gotten a repro can you see if it's still a bug? Did you ever investigate this yet? |
My repro involves recursive includes, and an empty For the time being, you should be able to work around this issue by adding any non-recursive path to your |
The completion issue should be fixed with 0.20.0. |
Type: LanguageService
Description
The language service fails to parse struct definitions that occur inside function scope.
Please take a look at those screenshots.
Screenshot 1


Screenshot 2
To Reproduce
test.txt
test2.txt
Expected behavior
Expected in screenshot 1:
d
,e
andf
show up instead ofa
,b
,c
which make no senseExpected in screenshot 2: After pressing F12 (Go to definition), the definition on line 5 should be focused.
Screenshots
See above
Additional context
VS Code version: Code - Insiders 1.27.0-insider (e0a68266321d1518bc12428b71d80524461a275b, 2018-08-22T05:18:13.273Z)
OS version: Windows_NT x64 10.0.15063
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Extensions (5)
(1 theme extensions excluded)
The text was updated successfully, but these errors were encountered: