False positive warning warning: instantiation of variable 'declvar<A>' required here, but no definition is available
, when the definition is not required
#128657
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
Consider the following code: https://gcc.godbolt.org/z/acd5W9YMn
This compiles correctly on all 3 bug compilers including Clang (and seems to be the only good way of doing this).
But Clang emits a useless warning:
The variable definition isn't needed here, so it shouldn't warn.
The text was updated successfully, but these errors were encountered: