mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
Rust: Repair BadCtorInitialization.ql's StdCall using getCanonicalPath.
This commit is contained in:
@@ -32,8 +32,7 @@ class CtorAttr extends Attr {
|
|||||||
*/
|
*/
|
||||||
class StdCall extends Expr {
|
class StdCall extends Expr {
|
||||||
StdCall() {
|
StdCall() {
|
||||||
this.(CallExpr).getFunction().(PathExpr).getResolvedCrateOrigin() = "lang:std" or
|
this.(CallExprBase).getStaticTarget().getCanonicalPath().matches(["std::%", "<std::%"])
|
||||||
this.(MethodCallExpr).getResolvedCrateOrigin() = "lang:std"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user