Author: F. Jahanian
Log:
Implement parsing of objective-c's new @property declaration.
Modified:
include/clang/Basic/DiagnosticKinds.def
include/clang/Parse/Parser.h
Parse/ParseObjc.cpp
Parse/Parser.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41644 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Parse/Parser.cpp b/Parse/Parser.cpp
index 581d585..0a7ea58 100644
--- a/Parse/Parser.cpp
+++ b/Parse/Parser.cpp
@@ -258,6 +258,18 @@
ObjcTypeQuals[objc_bycopy] = &PP.getIdentifierTable().get("bycopy");
ObjcTypeQuals[objc_byref] = &PP.getIdentifierTable().get("byref");
}
+ if (getLang().ObjC2) {
+ ObjcPropertyAttrs[objc_readonly] = &PP.getIdentifierTable().get("readonly");
+ ObjcPropertyAttrs[objc_getter] = &PP.getIdentifierTable().get("getter");
+ ObjcPropertyAttrs[objc_setter] = &PP.getIdentifierTable().get("setter");
+ ObjcPropertyAttrs[objc_assign] = &PP.getIdentifierTable().get("assign");
+ ObjcPropertyAttrs[objc_readwrite] =
+ &PP.getIdentifierTable().get("readwrite");
+ ObjcPropertyAttrs[objc_retain] = &PP.getIdentifierTable().get("retain");
+ ObjcPropertyAttrs[objc_copy] = &PP.getIdentifierTable().get("copy");
+ ObjcPropertyAttrs[objc_nonatomic] =
+ &PP.getIdentifierTable().get("nonatomic");
+ }
}
/// ParseTopLevelDecl - Parse one top-level declaration, return whatever the