Skip to content
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

Constants defined c++ highlight not working #12401

Open
paulotovo opened this issue Jun 21, 2024 · 1 comment
Open

Constants defined c++ highlight not working #12401

paulotovo opened this issue Jun 21, 2024 · 1 comment
Assignees
Labels
Language Service more info needed The issue report is not actionable in its current state

Comments

@paulotovo
Copy link

Environment

  • OS and Version: Linux Mint 21.3
  • VS Code Version: 1.90.1
  • C/C++ Extension Version: 1.20.5
  • If using SSH remote, specify OS of remote machine:

Bug Summary and Steps to Reproduce

Bug Summary: In a .h file with code snippet surrounded by a constant definition, it is not displayed (highlight) correctly whether the constant is defined or not.

Steps to reproduce:

`#undef TEST_CONST
#ifdef TEST_CONST
#define XXXXXXXX 10
#endif

#define TEST_CONST
#ifdef TEST_CONST
#define XXXXXXXX 10
#endif`

Expected behavior:

The isolated code by the constant definition should appear highlighted if the constant is defined, otherwise it should appear disabled.

image

Configuration and Logs

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
            ],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c17",
            "cppStandard": "gnu++17",
            "intelliSenseMode": "linux-gcc-x64"
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

No response

@browntarik
Copy link
Contributor

Could you provide the output of the C/C++: Log Diagnostics function when you open this file?

Do you have your C_Cpp.dimInactiveRegion setting set? If so, what is the current value?

Is IntelliSense working correctly otherwise?

@browntarik browntarik added Language Service more info needed The issue report is not actionable in its current state labels Jun 22, 2024
@browntarik browntarik self-assigned this Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Service more info needed The issue report is not actionable in its current state
Projects
Status: No status
Development

No branches or pull requests

2 participants