[PATCH] D15174: [MSVC] Fix for http://llvm.org/PR25636: indexed accessor property not supported correctly.
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 6 23:10:48 PST 2015
John,
Your example won't be compiled at all. Clang and MSVC emit error
messages in this case.
The next code
struct A {
__declspec(property(get=GetX,put=SetX)) int x;
int GetX() const { return 0; }
void SetX(long y) {}
};
a.x = 5;
compiled fine by MSVC and clang and provides correct result on clang
(i.e. the result value can't be captured at all, because SetX() returns
void)
return a.x = 5;
clang: error: cannot initialize return object of type 'int' with an
rvalue of type 'void'
More information about the cfe-commits
mailing list