Enable -Wmisleading-indentation for chromium_code on Chrome OS and Chromecast builds.
This requires changing wayland/fuzzer/wayland_templater.py a bit. -Wmisleading-indentation used to fire on harness.cc (see try jobs on https://chromium-review.googlesource.com/c/chromium/src/+/2063736/1), because harness.cc.tmpl is indentede according to jinja directive level, not indented according to generated output code level. That makes the .tmpl files readable, but the generated code looks weird. As a fix, pipe the jinja output through clang-format before writing it to disk, so that the output looks readable too (to both compilers and humans). This is the approach we use in other code generators in Chromium as well. While here, also change the script to only write its output if the contents change. This allows ninja to not run the compile step for the generated cc files if the file contents don't change (due to a no-op change to the generator, or due to a whitespace-only change to the .tmpl file that clang-format now normalizes away). The wayland_templater.py change is meant to be behavior-preserving. Bug: 031169 Change-Id: I045070be3c1649e8752b6e09bb6655b1f3f60fb4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2066108Reviewed-by:Nic Hollingum <hollingum@google.com> Commit-Queue: Nico Weber <thakis@chromium.org> Auto-Submit: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/master@{#743412}
Showing
Please register or sign in to comment