Skip to content

Visual Studio recognises __nullptr in C++ mode #8624

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

Merged
merged 1 commit into from
Apr 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ansi-c/scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -1012,11 +1012,12 @@
TOK_CHAR16_T);
}

"__nullptr" { // GNU extension
"__nullptr" { // GNU, clang, VS extension
return conditional_keyword(
PARSER.cpp98 &&
(PARSER.mode==configt::ansi_ct::flavourt::GCC ||
PARSER.mode==configt::ansi_ct::flavourt::CLANG),
PARSER.mode==configt::ansi_ct::flavourt::CLANG ||

Check warning on line 1019 in src/ansi-c/scanner.l

View check run for this annotation

Codecov / codecov/patch

src/ansi-c/scanner.l#L1019

Added line #L1019 was not covered by tests
PARSER.mode==configt::ansi_ct::flavourt::VISUAL_STUDIO),
TOK_NULLPTR);
}

Expand Down
Loading