Skip to content

C++ syntax highlighting not working properly when constructor initializer list has multiple lines #529

Closed

Description

VSCode Version: Code 1.10.1 (653f873, 2017-03-02T00:47:58.633Z)
OS Version: Linux x64 4.4.0-64-generic
Extensions:
Extension Author Version
githistory donjayamanne 0.1.5
vscode-clang mitaki28 0.2.1
cpptools ms-vscode 0.10.2
vscode-icons robertohuertasm 7.3.0
Material-theme zhuangtongfa 2.1.3
Steps to Reproduce:

Syntax highlighting for keywords like noexcept and delete is not working as shown in the screenshot with the following code:

#include

class Myclass
{
public:
Myclass()
: x(), y(),
z()
{
}

Myclass(const Myclass&) noexcept = delete;
void print() { std::cout << 1 << std::endl; }
private:
int x;
int y;
int z;
};

It is observed that this issue occurs when the constructor initializer list is spread over more than a line.
Issue exists for all themes and when all extensions are disabled as well
Code works and tested with g++
screenshot at 2017-03-03 21 16 41
image

Activity

  1. sean-mcmanus commented on Mar 6, 2017

    @sean-mcmanus
    Contributor

    This is a bug with atom/language-c, which is used to implement all the C/C++ syntax highlighting in VS Code (the C++ extension doesn't implement any colorization). It seems like the root cause is the same as in atom/language-c#101 .

  2. Colengms commented on Jul 3, 2019

    @Colengms
    Contributor

    This appears to be fixed in VS Code.

  3. locked and limited conversation to collaborators on Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions