diff --git a/cpp/ql/src/semmle/code/cpp/TypedefType.qll b/cpp/ql/src/semmle/code/cpp/TypedefType.qll index 0cdce8f971d..257211e224d 100644 --- a/cpp/ql/src/semmle/code/cpp/TypedefType.qll +++ b/cpp/ql/src/semmle/code/cpp/TypedefType.qll @@ -74,19 +74,22 @@ class NestedTypedefType extends TypedefType { override string getCanonicalQLClass() { result = "NestedTypedefType" } /** - * DEPRECATED + * DEPRECATED: use `.hasSpecifier("private")` instead. + * * Holds if this member is private. */ deprecated predicate isPrivate() { this.hasSpecifier("private") } /** - * DEPRECATED + * DEPRECATED: `.hasSpecifier("protected")` instead. + * * Holds if this member is protected. */ deprecated predicate isProtected() { this.hasSpecifier("protected") } /** - * DEPRECATED + * DEPRECATED: use `.hasSpecifier("public")` instead. + * * Holds if this member is public. */ deprecated predicate isPublic() { this.hasSpecifier("public") } diff --git a/cpp/ql/test/library-tests/typedefs/Typedefs3.expected b/cpp/ql/test/library-tests/typedefs/Typedefs3.expected index f3af3c430a0..c0f584a04e6 100644 --- a/cpp/ql/test/library-tests/typedefs/Typedefs3.expected +++ b/cpp/ql/test/library-tests/typedefs/Typedefs3.expected @@ -1,6 +1,3 @@ -WARNING: Predicate isPrivate has been deprecated and may be removed in future (Typedefs3.ql:11,27-36) -WARNING: Predicate isProtected has been deprecated and may be removed in future (Typedefs3.ql:14,27-38) -WARNING: Predicate isPublic has been deprecated and may be removed in future (Typedefs3.ql:17,27-35) | ODASA-6095-A.hpp:5:25:5:30 | mytype | MyTemplate::mytype | NestedTypedefType, getBaseType() = MyTemplate, member of MyTemplate | | ODASA-6095-B.hpp:6:43:6:49 | mytype2 | MyTemplate2::mytype2 | NestedTypedefType, getBaseType() = decltype(...), member of MyTemplate2 | | file://:0:0:0:0 | mytype | MyTemplate::mytype | NestedTypedefType, getBaseType() = MyTemplate, member of MyTemplate | diff --git a/cpp/ql/test/library-tests/typedefs/Typedefs3.ql b/cpp/ql/test/library-tests/typedefs/Typedefs3.ql index 8345b494ddb..15cfbf2fa41 100644 --- a/cpp/ql/test/library-tests/typedefs/Typedefs3.ql +++ b/cpp/ql/test/library-tests/typedefs/Typedefs3.ql @@ -8,13 +8,13 @@ string describe(TypedefType t) { t instanceof NestedTypedefType and result = "NestedTypedefType" ) or ( - t.(NestedTypedefType).isPrivate() and + t.(NestedTypedefType).hasSpecifier("private") and result = "(NestedTypedefType).isPrivate()" ) or ( - t.(NestedTypedefType).isProtected() and + t.(NestedTypedefType).hasSpecifier("protected") and result = "(NestedTypedefType).isProtected()" ) or ( - t.(NestedTypedefType).isPublic() and + t.(NestedTypedefType).hasSpecifier("public") and result = "(NestedTypedefType).isPublic()" ) or exists(Type base | base = t.getBaseType() and