[LLVMbugs] [Bug 14550] explicit specialization omits functions that call constexpr strlen
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Dec 8 22:01:15 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=14550
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> 2012-12-09 00:01:15 CST ---
Fixed in r169689. Here's a clue as to what was going on:
$ CXX="clang++ -Wsystem-headers" ./buildit
[...]
../include/string:644:29: error: constexpr function never produces a constant
expression [-Winvalid-constexpr]
static constexpr size_t length(const char_type* __s) {return strlen(__s);}
^
../include/string:644:66: note: subexpression not valid in a constant
expression
static constexpr size_t length(const char_type* __s) {return strlen(__s);}
^
To support libstdc++, we allow such bogus constexpr function definitions in
system headers. We were accidentally marking the function as invalid in this
case, leading to us not emitting any caller of it.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list