diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-10-09 22:26:49 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-10-09 22:26:49 +0000 |
commit | f892c7fe6053e409eff12c97470aded3976fb103 (patch) | |
tree | d845a4249f6b4f9c07b86df020e60ef75eaca1c1 /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | 0c83c8128b0e0befafb48899f3abff088c9a081c (diff) | |
download | bcm5719-llvm-f892c7fe6053e409eff12c97470aded3976fb103.tar.gz bcm5719-llvm-f892c7fe6053e409eff12c97470aded3976fb103.zip |
For the various CF and NS attributes, don't complain if the parameter
or return types are dependent. Fixes PR9049.
llvm-svn: 141518
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 38c0c4aef59..f76bb5879ac 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -3136,10 +3136,14 @@ static void handleLaunchBoundsAttr(Sema &S, Decl *D, const AttributeList &Attr){ //===----------------------------------------------------------------------===// static bool isValidSubjectOfNSAttribute(Sema &S, QualType type) { - return type->isObjCObjectPointerType() || S.Context.isObjCNSObjectType(type); + return type->isDependentType() || + type->isObjCObjectPointerType() || + S.Context.isObjCNSObjectType(type); } static bool isValidSubjectOfCFAttribute(Sema &S, QualType type) { - return type->isPointerType() || isValidSubjectOfNSAttribute(S, type); + return type->isDependentType() || + type->isPointerType() || + isValidSubjectOfNSAttribute(S, type); } static void handleNSConsumedAttr(Sema &S, Decl *D, const AttributeList &Attr) { |