mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: autoformat for first-class destructors
This commit is contained in:
@@ -687,7 +687,8 @@ private string getChildAccessorWithoutConversions(Locatable parent, Element chil
|
||||
exists(int n | expr.getChild(n) = child and result = "getChild(" + n + ")")
|
||||
or
|
||||
exists(int n |
|
||||
expr.getImplicitDestructorCall(n) = child and result = "getImplicitDestructorCall(" + n + ")"
|
||||
expr.getImplicitDestructorCall(n) = child and
|
||||
result = "getImplicitDestructorCall(" + n + ")"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -69,9 +69,7 @@ class Expr extends StmtParent, @expr {
|
||||
/**
|
||||
* Gets a compiler-generated destructor call that is performed after this expression.
|
||||
*/
|
||||
DestructorCall getAnImplicitDestructorCall() {
|
||||
synthetic_destructor_call(this, _, result)
|
||||
}
|
||||
DestructorCall getAnImplicitDestructorCall() { synthetic_destructor_call(this, _, result) }
|
||||
|
||||
/** Gets the location of this expression. */
|
||||
override Location getLocation() {
|
||||
|
||||
@@ -79,9 +79,7 @@ class Stmt extends StmtParent, @stmt {
|
||||
/**
|
||||
* Gets a compiler-generated destructor call that is performed after this statement.
|
||||
*/
|
||||
DestructorCall getAnImplicitDestructorCall() {
|
||||
synthetic_destructor_call(this, _, result)
|
||||
}
|
||||
DestructorCall getAnImplicitDestructorCall() { synthetic_destructor_call(this, _, result) }
|
||||
|
||||
override Location getLocation() { stmts(underlyingElement(this), _, result) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user