mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
C++: Don't use deprecated predicates in test
This made the `expected` file contain QL line numbers.
This commit is contained in:
@@ -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") }
|
||||
|
||||
@@ -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<X>::mytype | NestedTypedefType, getBaseType() = MyTemplate<X>, member of MyTemplate<X> |
|
||||
| ODASA-6095-B.hpp:6:43:6:49 | mytype2 | MyTemplate2<X>::mytype2 | NestedTypedefType, getBaseType() = decltype(...), member of MyTemplate2<X> |
|
||||
| file://:0:0:0:0 | mytype | MyTemplate<char>::mytype | NestedTypedefType, getBaseType() = MyTemplate<char>, member of MyTemplate<char> |
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user