Skip to content

remove space in GSL_SUPPRESS#1248

Open
beinhaerter wants to merge 1 commit into
microsoft:mainfrom
beinhaerter:gsl_suppress_without_space
Open

remove space in GSL_SUPPRESS#1248
beinhaerter wants to merge 1 commit into
microsoft:mainfrom
beinhaerter:gsl_suppress_without_space

Conversation

@beinhaerter
Copy link
Copy Markdown
Contributor

As VS2026 wants a string literal in [[gsl::suppress(...)]] it is a difference, if you GSL_SUPPRESS(a.1) without space or GSL_SUPPRESS(a .1) with space. The version with the space does not work, so this commit removes the spaces.

As VS2026 wants a string literal in `[[gsl::suppress(...)]]` it is a difference, if you `GSL_SUPPRESS(a.1)` without space or `GSL_SUPPRESS(a .1)` with space. The version with the space does not work, so this commit removes the spaces.
Comment thread tests/notnull_tests.cpp
{
// clang-format off
GSL_SUPPRESS(f .4) // NO-FORMAT: attribute
GSL_SUPPRESS(f.4) // NO-FORMAT: attribute
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most lines with GSL_SUPPRESS have a trailing // NO-FORMAT: attribute. I have left it here, but when we remove the NO-FORMAT, the VS formatting already fixes the f .4 to f.4.

I not only don't see a reason to write NO-FORMAT, I also think it makes things worse. I vote to remove all NO-FORMAT on GSL_SUPPRESS and revisit the necessity of CommentPragmas: '^ NO-FORMAT:' in .clang-format. If you agree, I can do that in another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant