Enable auto-close of multi-line comments in cpp #160357
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to: #154994
Ideally, we'd also like to be able to enable/disable auto-closing of comments separately from brackets ( #154994 ). That also could soften the impact of this change on existing cpp users.
It's unclear to me why TypeScript uses
/**
and*/
. In this case, for C++, we'd like to use/*
and*/
to match the behavior of VS.One of the motivations for this change is to enable automatic insertion of doxygen comments (a feature in cpptools), when using a multi-line comment style for them. As currently implemented, this fails as it implicitly turn the rest of the file into a comment before the correct doxygen contents can be determined. This solution, of allowing the auto-closing to occur first, is the same solution used by VS.