[llvm-bugs] [Bug 35627] New: Incorrect "expression is not assignable" error for dependent __is_[X_]assignable type trait expressions in function template signatures
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Dec 11 08:38:58 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35627
Bug ID: 35627
Summary: Incorrect "expression is not assignable" error for
dependent __is_[X_]assignable type trait expressions
in function template signatures
Product: clang
Version: 5.0
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: thonerma at synopsys.com
CC: llvm-bugs at lists.llvm.org,
sig-rnd-sat-clang-bugs at synopsys.com
This issue reproduces for Clang 3.2-5.0 and current Clang 6.0 trunk.
Clang appears to incorrectly parse dependent __is_assignable,
__is_nothrow_assignable, and __is_trivially_assignable type trait helper
expressions that appear within the signature of a function template. The
following test case fails for each of these traits:
$ cat t.cpp
template<typename T>
decltype(__is_assignable(T,T)) ft();
auto x = &ft<int>;
$ clang --version
clang version 6.0.0 (trunk 312994)
Target: x86_64-unknown-linux-gnu
...
$ clang -c -fms-extensions -std=c++11 t.cpp
t.cpp:2:29: error: expression is not assignable
decltype(__is_assignable(T,T)) ft();
^
1 error generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171211/214037da/attachment.html>
More information about the llvm-bugs
mailing list