https://bugs.llvm.org/show_bug.cgi?id=18874
NODA, Kai <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |[email protected]
Resolution|--- |FIXED
--- Comment #3 from NODA, Kai <[email protected]> ---
As of today, clang trunk@306691 seems to be producing satisfactory results:
/tmp/i.cpp:17:15: error: constexpr function never produces a constant
expression [-Winvalid-constexpr]
constexpr int func2() {
^
/tmp/i.cpp:18:17: note: non-constexpr constructor 'test' cannot be used in a
constant expression
test<int,3> test1 ;
^
/tmp/i.cpp:4:8: note: declared here
struct test
^
/tmp/i.cpp:27:19: error: constexpr variable 'x' must be initialized by a
constant expression
constexpr int x = func<int>();
^ ~~~~~~~~~~~
/tmp/i.cpp:11:15: note: non-constexpr constructor 'test' cannot be used in a
constant expression
test<T,3> test1 ;
^
/tmp/i.cpp:27:23: note: in call to 'func()'
constexpr int x = func<int>();
^
/tmp/i.cpp:4:8: note: declared here
struct test
^
2 errors generated.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs