[llvm] fix some warnings in SmallPtrSetTest (PR #77956)
Isaac Turner via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 12 20:14:10 PST 2024
spacey-sooty wrote:
> > Warnings are related to places which should use braces
>
> Could you paste a few of these warnings to here? I don't see warnings with my build and I'm curious what the compiler is complaining about.
>
> In general, the llvm coding style doesn't require braces around single-line if/for statements like this: https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements.
>
> I think it makes sense to add these with `for (...) if (...) ... ; else (...);` like you did in a few places, but not to add it everywhere.
I probably should've specified the warnings were from Clangd. The warnings were a lot of "Statement should be inside braces (fix available) [readability-braces-around-statement]"
https://github.com/llvm/llvm-project/pull/77956
More information about the llvm-commits
mailing list