Skip to content

Commit f1aac04

Browse files
committed
C++: Deprecate overly specific parts of Type.qll.
1 parent e43ddd3 commit f1aac04

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

cpp/ql/src/semmle/code/cpp/Type.qll

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,35 +1087,43 @@ class DerivedType extends Type, @derivedtype {
10871087
/**
10881088
* Holds if this type has the `__autoreleasing` specifier or if it points to
10891089
* a type with the `__autoreleasing` specifier.
1090+
*
1091+
* DEPRECATED: use `hasSpecifier` directly instead.
10901092
*/
1091-
predicate isAutoReleasing() {
1093+
deprecated predicate isAutoReleasing() {
10921094
this.hasSpecifier("__autoreleasing") or
10931095
this.(PointerType).getBaseType().hasSpecifier("__autoreleasing")
10941096
}
10951097

10961098
/**
10971099
* Holds if this type has the `__strong` specifier or if it points to
10981100
* a type with the `__strong` specifier.
1101+
*
1102+
* DEPRECATED: use `hasSpecifier` directly instead.
10991103
*/
1100-
predicate isStrong() {
1104+
deprecated predicate isStrong() {
11011105
this.hasSpecifier("__strong") or
11021106
this.(PointerType).getBaseType().hasSpecifier("__strong")
11031107
}
11041108

11051109
/**
11061110
* Holds if this type has the `__unsafe_unretained` specifier or if it points
11071111
* to a type with the `__unsafe_unretained` specifier.
1112+
*
1113+
* DEPRECATED: use `hasSpecifier` directly instead.
11081114
*/
1109-
predicate isUnsafeRetained() {
1115+
deprecated predicate isUnsafeRetained() {
11101116
this.hasSpecifier("__unsafe_unretained") or
11111117
this.(PointerType).getBaseType().hasSpecifier("__unsafe_unretained")
11121118
}
11131119

11141120
/**
11151121
* Holds if this type has the `__weak` specifier or if it points to
11161122
* a type with the `__weak` specifier.
1123+
*
1124+
* DEPRECATED: use `hasSpecifier` directly instead.
11171125
*/
1118-
predicate isWeak() {
1126+
deprecated predicate isWeak() {
11191127
this.hasSpecifier("__weak") or
11201128
this.(PointerType).getBaseType().hasSpecifier("__weak")
11211129
}

0 commit comments

Comments
 (0)