jeff-hykin / better-cpp-syntax

💾 The source of VS Code's C++ syntax highlighting
GNU General Public License v3.0
155 stars 30 forks source link

Incorrect syntax for '= default;' and '= delete;' #587

Closed gtianw closed 2 years ago

gtianw commented 2 years ago

The syntax about = default;/= delete;, in copy/move assignment operator, are incorrect.

496 has reported a bug of deleted function.

But it also happen to default function. See microsoft/vscode-cpptools#9281 for details.

EloCode commented 2 years ago

Probably the same cause in

class Base {
    virtual ~Base() = default;
}

class Derived:Base {
    ~Derived() override = default;
}

the override keyword is not highlighted at all. There is no info regarding "semantic tokens". If = default is removed, highlighting works again. tmp2

sean-mcmanus commented 2 years ago

This also repros for "= 0" (abstract virtual method) see https://github.com/microsoft/vscode-cpptools/issues/9957.

jeff-hykin commented 2 years ago

Should be fixed now (v1.15.24 released just now), but let me know if it persists