diff --git a/xls/common/casts_nc.cc b/xls/common/casts_nc.cc index 9414de301f..0505d7162e 100644 --- a/xls/common/casts_nc.cc +++ b/xls/common/casts_nc.cc @@ -105,6 +105,7 @@ Derived3 WontCompile(Base& r) { return down_cast(r); } // Finally, tests that good code does compile (i.e. the compiler is // not blindly failing everything). +// NOLINTNEXTLINE(clang-diagnostic-unused-function) static int Identity(int x) { return x; } #endif diff --git a/xls/common/strong_int_nc.cc b/xls/common/strong_int_nc.cc index e2013709ec..02caf2dc0e 100644 --- a/xls/common/strong_int_nc.cc +++ b/xls/common/strong_int_nc.cc @@ -27,6 +27,7 @@ class Explicit { }; // Each case specified under each symbol must fail to compile. +// NOLINTNEXTLINE(clang-diagnostic-unused-function) static void MustNotCompile() { USD dollars(1); (void)dollars; // Avoid unused variable warning.