https://bugs.llvm.org/show_bug.cgi?id=43908
Bug ID: 43908
Summary: constexpr and __declspec(property(...))) don't work
together
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Created attachment 22773
--> https://bugs.llvm.org/attachment.cgi?id=22773&action=edit
testcase showing the problem
clang's support of __declspec(property(...)) does not work well with constexpr.
(with or without -std=c++17)
The attached example triggers following error in clang:
<source>:24:28: error: constexpr variable 'tmp' must be initialized by a
constant expression
constexpr unsigned tmp = gFoo.real; // Works in MSVC19.22 but not in
clang-9
^~~~~~~~~
1 error generated.
MSVC v19.22 works as expected.
(Also see https://www.godbolt.org/z/ltXqZA )
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs