static_assert() condition cannot result in unsafe buffer access #92665
Labels
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
false-positive
Warning fires when it should not
In issue 92191 we discovered
-Wunsafe-buffer-usage
warns on conditions insidestatic_assert
s despite the fact that they are not executed at runtime and thus cannot result in an unsafe buffer access. The following snippet demonstrates this.Live repro: https://godbolt.org/z/Y5onbr88W
@haoNoQ @jkorous-apple
The text was updated successfully, but these errors were encountered: