This snippet of code:
if constexpr (n == 1) {
return 2;
} else if constexpr (n == 2) {
int x = 2;
int y = 2;
return x + y;
}
was triggering the warning:
If/else bodies with multiple statements require braces [readability/braces]
And, in general, cpplint.py was assuming that `if (cond)` was
the only `if` construction to expect, forgetting about
`if constexpr(cond)`.
Change-Id: I4cdc8e7f134c1ebd14d00354a8baadf87c796763
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3644147
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>