diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-07-25 21:12:27 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-07-25 21:12:27 +0000 |
commit | dcf1011876d8a472aeb05617c1a84c3d74fbd7ce (patch) | |
tree | 38cf5d911055dc6d5d01b7a161554bf7089d24b9 /lib/Sema/SemaDecl.cpp | |
parent | 642116259e8df6286063a17361c20e95b5017a0a (diff) |
objective-c: Provide a 'fixit' when class was used
to declare a static object. // rdar://9603056
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135970 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 8b02390b58..d231d3ccab 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -3937,7 +3937,8 @@ void Sema::CheckVariableDeclaration(VarDecl *NewVD, QualType T = NewVD->getType(); if (T->isObjCObjectType()) { - Diag(NewVD->getLocation(), diag::err_statically_allocated_object); + Diag(NewVD->getLocation(), diag::err_statically_allocated_object) + << FixItHint::CreateInsertion(NewVD->getLocation(), "*"); return NewVD->setInvalidDecl(); } |