MyDeveloperDay added a comment.


>> Since you use `== ' '` twice, `remainingLineCharCount` will count only 
>> consecutive spaces, right?
>> But you want to count other characters, no?
>> So, IIUC, the condition you want is `rF[wI] != '\n' && !(rF[wI] == ' ' && 
>> rF[wI - 1] == ' ')` (mind the negation). It will count characters other than 
>> a newline and it will only count a series of consecutive spaces as one char. 
>> WDYT?

That whole while loop leaves me feeling cold, it feels like a bug waiting to 
happen, frankly I don't understand why its necessary.  It would be better to 
move the loop into a function and properly unit test it if there is really no 
other way


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93938/new/

https://reviews.llvm.org/D93938

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to