summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/attributes.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-09 22:26:49 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-09 22:26:49 +0000
commitf892c7fe6053e409eff12c97470aded3976fb103 (patch)
treed845a4249f6b4f9c07b86df020e60ef75eaca1c1 /clang/test/SemaTemplate/attributes.cpp
parent0c83c8128b0e0befafb48899f3abff088c9a081c (diff)
downloadbcm5719-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/test/SemaTemplate/attributes.cpp')
-rw-r--r--clang/test/SemaTemplate/attributes.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/attributes.cpp b/clang/test/SemaTemplate/attributes.cpp
index e208bd2b899..495f4a7ad38 100644
--- a/clang/test/SemaTemplate/attributes.cpp
+++ b/clang/test/SemaTemplate/attributes.cpp
@@ -19,3 +19,16 @@ namespace attribute_aligned {
check_alignment<3>::t c3; // expected-note 2 {{in instantiation}}
check_alignment<4>::t c4;
}
+
+namespace PR9049 {
+ extern const void *CFRetain(const void *ref);
+
+ template<typename T> __attribute__((cf_returns_retained))
+ inline T WBCFRetain(T aValue) { return aValue ? (T)CFRetain(aValue) : (T)0; }
+
+
+ extern void CFRelease(const void *ref);
+
+ template<typename T>
+ inline void WBCFRelease(__attribute__((cf_consumed)) T aValue) { if(aValue) CFRelease(aValue); }
+}
OpenPOWER on IntegriCloud