C++ code is incorrectly identified as C #12975
Labels
Feature: Configuration
An issue related to configuring the extension or IntelliSense
more info needed
The issue report is not actionable in its current state
Environment
Bug Summary and Steps to Reproduce
Bug Summary: I have a C++ file with the extension .hpp. When I first open it, it initially correctly says "C++" on the bottom right, but after a while it automatically changes to "C" and I get a bunch of syntax errors. If I try to manually change it back to "C++", it automatically changes back to "C" after a while.
Steps to reproduce:
Expected behavior: C++ code should be identified as C++, not as C. I've never seen the .hpp extension used for C code, so .hpp should be C++ by default (and it is, but for some reason this extension isn't respecting that). For .h, it's fine if you want it to be C by default, but I should be able to associate the .h extension with C++ and if I do, the extension should respect that setting and identify .h files as C++.
Configuration and Logs
Configurations in c_cpp_properties.json:
Logs from running C/C++: Log Diagnostics from the VS Code command palette:
Logs from the language server logging:
Other Extensions
This problem occurs even after I've disabled all other extensions. It doesn't occur after disabling the C/C++ extension though.
Additional context
The text was updated successfully, but these errors were encountered: