diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-04-14 02:25:56 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-14 02:25:56 +0000 |
commit | 5466c7b0ca8ce662e2c0bc295cecba2b78d6957d (patch) | |
tree | f2e6d04f1fdd87b396c1508c82eaaad032cfd73b /lib/Sema/SemaDeclObjC.cpp | |
parent | b286a78c8cce4592306dae6abc3656daf6379c77 (diff) |
Audit __private_extern__ handling.
- Exposed quite a few Sema issues and a CodeGen crash.
- See FIXMEs in test case, and in SemaDecl.cpp (PR3983).
I'm skeptical that __private_extern__ should actually be a storage
class value. I think that __private_extern__ basically amounts to
extern A __attribute__((visibility("hidden")))
and would be better off handled (a) as that, or (b) with an extra bit
in the VarDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69020 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index d468c1334e..e95b5d3840 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -1356,8 +1356,7 @@ void Sema::ActOnAtEnd(SourceLocation AtEndLoc, DeclPtrTy classDecl, DeclGroupRef DG = allTUVars[i].getAsVal<DeclGroupRef>(); for (DeclGroupRef::iterator I = DG.begin(), E = DG.end(); I != E; ++I) if (VarDecl *VDecl = dyn_cast<VarDecl>(*I)) { - if (VDecl->getStorageClass() != VarDecl::Extern && - VDecl->getStorageClass() != VarDecl::PrivateExtern) + if (!VDecl->hasExternalStorage()) Diag(VDecl->getLocation(), diag::err_objc_var_decl_inclass); } } |