CPP: Resolve remaining comments from the original PR.

This commit is contained in:
Geoffrey White
2019-11-13 09:45:31 +00:00
parent 5cc92b7502
commit a5d2fbd25d
2 changed files with 4 additions and 4 deletions

View File

@@ -209,9 +209,9 @@ class AssignPointerSubExpr extends AssignOperation, @assignpsubexpr {
}
/**
* A C++ variable declaration inside the conditional expression of a `while` or `if`
* compound statement. Declaring a variable this way narrows its lifetime and scope
* to be strictly the compound statement itself. For example:
* A C++ variable declaration inside the conditional expression of a `while`, `if` or
* `for` compound statement. Declaring a variable this way narrows its lifetime and
* scope to be strictly the compound statement itself. For example:
* ```
* extern int x, y;
* if (bool c = x < y) { do_something_with(c); }

View File

@@ -1064,7 +1064,7 @@ private Expr getStmtResultExpr(Stmt stmt) {
}
/**
* The C++ `this` pointer.
* The C++ `this` expression.
*/
class ThisExpr extends Expr, @thisaccess {
override string toString() { result = "this" }