[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 6 13:51:41 PST 2023


jhuber6 wrote:

> > Just do what the formatter says, not every file is 100% clang-formatted so there's bits of old code that haven't been properly cleaned yet. This was the same line that I thought looked wrong so it should probably be fixed. Using `git clang-format HEAD~1` only formats what you've changed, so you don't need to worry about spurious edits.
> 
> Isn't the standard to follow the existing style, not re-format small sections of code during a commit to a different style?
> 
> [Always follow the golden rule:
> 
> If you are extending, enhancing, or bug fixing already implemented code, use the style that is already being used so that the source is uniform and easy to follow.](https://llvm.org/docs/CodingStandards.html)

Yes, but this doesn't really apply since you changed the function signature so it needs to be reformatted. That rule primarily applies to sections that have been manually formatted but don't exactly match the `clang-format` rules. Another reason we don't do bulk `clang-format` everywhere is because it confuses `git blame`. However, in this case there's really no reason not to.

https://github.com/llvm/llvm-project/pull/69371


More information about the cfe-commits mailing list