mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: more documentation for implict destructor calls
This commit is contained in:
@@ -62,11 +62,23 @@ class Stmt extends StmtParent, @stmt {
|
||||
/**
|
||||
* Gets the `n`th compiler-generated destructor call that is performed after this statement, in
|
||||
* order of destruction.
|
||||
*
|
||||
* For instance, in the following code, `getImplicitDestructorCall(0)` for the block will be the
|
||||
* destructor call for `c2`:
|
||||
* ```cpp
|
||||
* {
|
||||
* MyClass c1;
|
||||
* MyClass c2;
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
DestructorCall getImplicitDestructorCall(int n) {
|
||||
synthetic_destructor_call(this, max(int i | synthetic_destructor_call(this, i, _)) - n, result)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a compiler-generated destructor call that is performed after this statement.
|
||||
*/
|
||||
DestructorCall getAnImplicitDestructorCall() {
|
||||
synthetic_destructor_call(this, _, result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user