We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
sizeof
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
Title: Can't use sizeof.
Minimal reproducer (https://cpp2.godbolt.org/z/8bs65Tzcz): main: () -> int = sizeof(i32);
main: () -> int = sizeof(i32);
cppfront main.cpp2 clang++17 -std=c++23 -stdlib=libc++ -lc++abi -pedantic-errors -Wall -Wextra -Wconversion -fsanitize=undefined -Werror=unused-result -I . main.cpp
Expected result: Program returned: 4.
Program returned: 4
Actual result and error: main.cpp2(1,25): error: use 'sizeof(()', not 'sizeof ('.
main.cpp2(1,25): error: use 'sizeof(()', not 'sizeof ('
The text was updated successfully, but these errors were encountered:
Fix sizeof/new hint with parentheses
a75c5ce
Fixes hsutter#566.
272489e
sizeof<T>
Thanks. That's a migration diagnostic, and it should check that the next character isn't ( before complaining!
(
Sorry, something went wrong.
5665255
Fix bug that was diagnosing non-paren sizeof incorrectly, closes hs…
02da37c
…utter#566
Successfully merging a pull request may close this issue.
Title: Can't use
sizeof
.Minimal reproducer (https://cpp2.godbolt.org/z/8bs65Tzcz):
main: () -> int = sizeof(i32);
Commands:
cppfront main.cpp2 clang++17 -std=c++23 -stdlib=libc++ -lc++abi -pedantic-errors -Wall -Wextra -Wconversion -fsanitize=undefined -Werror=unused-result -I . main.cpp
Expected result:
Program returned: 4
.Actual result and error:
main.cpp2(1,25): error: use 'sizeof(()', not 'sizeof ('
.The text was updated successfully, but these errors were encountered: