Re:Clang accepts MSVC arguments and targets Windows if its b...
by ekeane on Saturday March 02, 2024 @04:26PM
(#39575912)
The clang driver is particularly bad at this. There is a frequent 'just add one more thing here!' in every section of the driver. Additionally, it is large, somewhat complex, and not very exciting, so those refactors/simplifications don't happen nearly as often as other parts of the clang code base.
The tablegen/macro-gen stuff DID get added at one point fortunately, but before that it was pretty rough as well.
[edit: a lot of the older code involves huge single functions, webkit, etc are similar and I suspect it’s true of most projects. It seems like a fairly standard code evolution pattern: a function is written, and keeps have logic added so it becomes bigger and bigger, until eventually someone adds something where refactoring makes enough sense that the functions are broken up. I wonder if someone has ever just done an analysis of commit history vs function size to see just how common this actually is. Something like “how old vs how recently modified vs function size” - I’m genuinely curious]