Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Could this possibly be an issue for more esoteric underscore-less UDLs, like i?
Does the code need to search for a suffix, could it not detect the absence of a digit? Sorry if the questions are silly, I haven't really looked at this part of the formatter in depth
Good questions. I had chosen searching for suffixes instead of the absence of digits/separators because the former is simpler and runs a little faster. I'll switch to the latter if and when there is a need for inserting separators into integer literals with ud-suffixes that don't start with an underscore, which are allowed in the standard library only.
clang/lib/Format/IntegerLiteralSeparatorFixer.cpp | ||
---|---|---|
125 | There is no need to search the prefix. Will update it when landing. |
Treats imaginary number suffixes (starting with an i) just like any user-defined suffixes (starting with an underscore). Also handles ud-suffixes (e.g. _km and _Pa) containing letters that can be part of a floating-point number.
There is no need to search the prefix. Will update it when landing.