Index: cfe/trunk/lib/AST/ExprClassification.cpp =================================================================== --- cfe/trunk/lib/AST/ExprClassification.cpp +++ cfe/trunk/lib/AST/ExprClassification.cpp @@ -418,9 +418,10 @@ islvalue = NTTParm->getType()->isReferenceType(); else islvalue = isa(D) || isa(D) || - isa(D) || - (Ctx.getLangOpts().CPlusPlus && - (isa(D) || isa(D))); + isa(D) || + (Ctx.getLangOpts().CPlusPlus && + (isa(D) || isa(D) || + isa(D))); return islvalue ? Cl::CL_LValue : Cl::CL_PRValue; } Index: cfe/trunk/lib/Sema/SemaExpr.cpp =================================================================== --- cfe/trunk/lib/Sema/SemaExpr.cpp +++ cfe/trunk/lib/Sema/SemaExpr.cpp @@ -9352,6 +9352,8 @@ !getLangOpts().CPlusPlus) { AddressOfError = AO_Register_Variable; } + } else if (isa(dcl)) { + AddressOfError = AO_Property_Expansion; } else if (isa(dcl)) { return Context.OverloadTy; } else if (isa(dcl) || isa(dcl)) { Index: cfe/trunk/test/SemaCXX/MicrosoftExtensions.cpp =================================================================== --- cfe/trunk/test/SemaCXX/MicrosoftExtensions.cpp +++ cfe/trunk/test/SemaCXX/MicrosoftExtensions.cpp @@ -344,6 +344,18 @@ __declspec(property(get=GetV)) int : 10; // expected-error {{anonymous property is not supported}} }; +struct MSPropertyClass { + int get() { return 42; } + int __declspec(property(get = get)) n; +}; + +int *f(MSPropertyClass &x) { + return &x.n; // expected-error {{address of property expression requested}} +} +int MSPropertyClass::*g() { + return &MSPropertyClass::n; // expected-error {{address of property expression requested}} +} + namespace rdar14250378 { class Bar {};