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

C++ highlighting broken on class template specializations, but only with specific formatting #109098

Closed
evanacox opened this issue Oct 21, 2020 · 1 comment
Assignees
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@evanacox
Copy link

With C++, class/struct template declarations break syntax highlighting with template specialization only when there's not an opening brace on the end of the line, and the template is on the same line as struct/class. Does't change when
the C++ extension is enabled/disabled, it's broken on both.

  • VSCode Version: 1.50.1
  • OS Version: Linux x64 5.8.15-201.fc32.x86_64

Steps to Reproduce:

  1. Open up a C++ file in VSCode
  2. Paste in the following:
template <class T> struct example;

// highlighting works perfectly fine here
template <> struct example<unsigned> {};

// this also works perfectly fine
template <>
struct example<int> 
{};

// highlighting breaks at <>, doesn't matter if there is anything in it or not. 
// doesn't matter if the specialization is partial, full, CV-qualified, or anything else. 
template <> struct example<long> 
{};

At least on my machine, that text produces the following in a brand new Insiders installation:
Screenshot from 2020-10-21 11-21-32

Does this issue occur when all extensions are disabled?: Yes/No (Also reproduces on the Insiders build)

@alexr00
Copy link
Member

alexr00 commented Oct 22, 2020

Since we get our c++ syntax highlighting grammar from another repo, I have moved the issue to jeff-hykin/better-cpp-syntax#512

@alexr00 alexr00 closed this as completed Oct 22, 2020
@alexr00 alexr00 added grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream labels Oct 22, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

3 participants