diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-02-29 22:18:55 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-02-29 22:18:55 +0000 |
commit | 77bfb8b43ec3f7dee3a71f6e854b03ad29dab84f (patch) | |
tree | 3f8f072cf0145794270c21859a13d633bbaa4981 /include/clang/AST/DeclObjC.h | |
parent | fd819783aafa39b3bfdfcc095270352074ef4734 (diff) |
objective-c: provide fixit hint when atomic property does not
have matching user defined setter/getter and a warning is issued.
In this case, a fixit note is displayed. // rdar://10267155
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/DeclObjC.h')
-rw-r--r-- | include/clang/AST/DeclObjC.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 3158ef992f..cf46fa4226 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -1737,6 +1737,7 @@ public: enum PropertyControl { None, Required, Optional }; private: SourceLocation AtLoc; // location of @property + SourceLocation LParenLoc; // location of '(' starting attribute list or null. TypeSourceInfo *DeclType; unsigned PropertyAttributes : NumPropertyAttrsBits; unsigned PropertyAttributesAsWritten : NumPropertyAttrsBits; @@ -1751,8 +1752,10 @@ private: ObjCIvarDecl *PropertyIvarDecl; // Synthesize ivar for this property ObjCPropertyDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id, - SourceLocation AtLocation, TypeSourceInfo *T) - : NamedDecl(ObjCProperty, DC, L, Id), AtLoc(AtLocation), DeclType(T), + SourceLocation AtLocation, SourceLocation LParenLocation, + TypeSourceInfo *T) + : NamedDecl(ObjCProperty, DC, L, Id), AtLoc(AtLocation), + LParenLoc(LParenLocation), DeclType(T), PropertyAttributes(OBJC_PR_noattr), PropertyAttributesAsWritten(OBJC_PR_noattr), PropertyImplementation(None), @@ -1763,6 +1766,7 @@ public: static ObjCPropertyDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, SourceLocation AtLocation, + SourceLocation LParenLocation, TypeSourceInfo *T, PropertyControl propControl = None); @@ -1770,6 +1774,9 @@ public: SourceLocation getAtLoc() const { return AtLoc; } void setAtLoc(SourceLocation L) { AtLoc = L; } + + SourceLocation getLParenLoc() const { return LParenLoc; } + void setLParenLoc(SourceLocation L) { LParenLoc = L; } TypeSourceInfo *getTypeSourceInfo() const { return DeclType; } QualType getType() const { return DeclType->getType(); } |