[PATCH] Trivial patch that cleans up some function signatures from unused parameters.

David Blaikie dblaikie at gmail.com
Mon Jun 16 13:38:46 PDT 2014


Have you looked at the commit history of why this was present in the first place? Given that there's not much you can /do/ with a MutexGuard, I'm guessing the original author had it this way to indicate which functions had to be called with a MutexGuard already owned... - a poor man's thread safety check, as it were.

Not that I necessarily agree, but might be useful to understand (if it had previously had a use and was since removed, or at least the person who added it (assuming it was added for the reason I guessed above) is long gone, or if they're a current contributor maybe check with them to see why it was there)

But that's up to you - I'd probably be happy committing this without doing that work & happy to sign off on you doing the same. Maybe at least add comments to the functions you're removing the parameter from to document the precondition that the lock must be held, or maybe you could even add clang's thread safety attributes... (which would also mean turning on the warning in the build systems, etc, probably... blah blah blah)

http://reviews.llvm.org/D4162






More information about the llvm-commits mailing list