mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge pull request #20150 from geoffw0/ctorinit
Rust: Update BadCtorInitialization.ql to use getCanonicalPath.
This commit is contained in:
@@ -32,8 +32,7 @@ class CtorAttr extends Attr {
|
||||
*/
|
||||
class StdCall extends Expr {
|
||||
StdCall() {
|
||||
this.(CallExpr).getFunction().(PathExpr).getResolvedCrateOrigin() = "lang:std" or
|
||||
this.(MethodCallExpr).getResolvedCrateOrigin() = "lang:std"
|
||||
this.(CallExprBase).getStaticTarget().getCanonicalPath().matches(["std::%", "<std::%"])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user