[PATCH] D99456: [C++2b] Support size_t literals
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 31 05:27:33 PDT 2021
aaron.ballman added a comment.
Generally LGTM but I did have a question about the feature testing macro.
================
Comment at: clang/lib/Frontend/InitPreprocessor.cpp:593-594
+ // C++2b features.
+ if (LangOpts.CPlusPlus2b)
+ Builder.defineMacro("__cpp_size_t_suffix", "202011L");
if (LangOpts.Char8)
----------------
Because we allow this as an extension in all C++ modes, should this be enabled always rather than gated on C++2b?
================
Comment at: clang/lib/Lex/LiteralSupport.cpp:678
+ if (isFPConstant)
+ break; // invalid for floats.
+ if (HasSize)
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99456/new/
https://reviews.llvm.org/D99456
More information about the cfe-commits
mailing list