C++: autoformat for first-class destructors

This commit is contained in:
Robert Marsh
2024-01-23 18:11:12 +00:00
parent 56c9566867
commit 0bc023139b
4 changed files with 10 additions and 13 deletions

View File

@@ -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 + ")"
)
)
)

View File

@@ -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() {

View File

@@ -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) }