diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2013-11-27 16:34:09 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2013-11-27 16:34:09 +0000 |
commit | 4a611153e1ffbe27e379c66fd46003c755bf34ce (patch) | |
tree | 9b7a0795930432a64b7d086390768f0f581261d4 /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | 3c8e147a6bb107eb7b5d5d71efc7880953d44f91 (diff) | |
download | bcm5719-llvm-4a611153e1ffbe27e379c66fd46003c755bf34ce.tar.gz bcm5719-llvm-4a611153e1ffbe27e379c66fd46003c755bf34ce.zip |
Adding in the subject for the init_priority attribute.
llvm-svn: 195850
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 046054df517..57b8eba6afa 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -2700,12 +2700,12 @@ static void handleInitPriorityAttr(Sema &S, Decl *D, return; } - if (!isa<VarDecl>(D) || S.getCurFunctionOrMethodDecl()) { + if (S.getCurFunctionOrMethodDecl()) { S.Diag(Attr.getLoc(), diag::err_init_priority_object_attr); Attr.setInvalid(); return; } - QualType T = dyn_cast<VarDecl>(D)->getType(); + QualType T = cast<VarDecl>(D)->getType(); if (S.Context.getAsArrayType(T)) T = S.Context.getBaseElementType(T); if (!T->getAs<RecordType>()) { |