-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer
Description
Pardon the large demo, this came up when resting something with a library I've been writing.
In this example, https://godbolt.org/z/1o4nr958b, clang errors
<source>:1232:5: error: no matching function for call to 'foo'
foo<bar(2)>();
^~~~~~~~~~~
<source>:1224:22: note: candidate template ignored: invalid explicitly-specified argument for template parameter 'X'
template<int X> void foo() {}
^Without providing a reason why the explicitly-specified argument is invalid. GCC reports that the macro is expanding to have a problematic local static variable.
Similarly after removing the static qualifiers there are other problems with calling non-constexpr functions but clang still does not provide a diagnostic as to why the explicitly-specified argument is invalid https://godbolt.org/z/7xGrecxfe.
Metadata
Metadata
Assignees
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer