================
@@ -4827,6 +4827,10 @@ bool TokenAnnotator::spaceRequiredBefore(const 
AnnotatedLine &Line,
         Right.is(TT_TemplateOpener)) {
       return true;
     }
+    if (Left.is(tok::identifier) && Right.is(tok::numeric_constant) &&
+        Right.TokenText[0] == '.') {
----------------
owenca wrote:

I suppose a `numeric_constant` can't follow an `identifier` except when they're 
inside attributes. clang-format is allowed to remove spaces between any two 
tokens only if they won't be changed to a single token. That's why we can 
remove the space in `type .5` but not `type 5`.

https://github.com/llvm/llvm-project/pull/86458
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to