This is an archive of the discontinued LLVM Phabricator instance.

[MS Compat]Allow __interfaces to have properties.
ClosedPublic

Authored by erichkeane on Sep 20 2017, 11:58 AM.

Details

Summary

__interface types are allowed in MSVC to have "property" data members
(marked with declspec property). This patch alters Sema to allow property
data members.

Diff Detail

Repository
rL LLVM

Event Timeline

erichkeane created this revision.Sep 20 2017, 11:58 AM
erichkeane added inline comments.
lib/Sema/SemaDeclCXX.cpp
2871 ↗(On Diff #116046)

Note: Clang format did this craziness... I'm open to whatever format you guys would prefer.

rnk accepted this revision.Sep 20 2017, 2:44 PM

lgtm

lib/Sema/SemaDeclCXX.cpp
2871 ↗(On Diff #116046)

Maybe this would be better expressed in an if /else if chain like:

if (!isFunc && (DS.getStorageClassSpec() == SCS_typedef || MSPropertyAttr))
  InvalidDecl = 0;
else if (!isFunc)
  InvalidDecl = 1;

...

This revision is now accepted and ready to land.Sep 20 2017, 2:44 PM
This revision was automatically updated to reflect the committed changes.