Merge pull request #1519 from geoffw0/depkind

CPP: Deprecate Expr.getKind() and Stmt.getKind().
This commit is contained in:
Pavel Avgustinov
2019-06-27 19:22:57 +01:00
committed by GitHub
2 changed files with 9 additions and 5 deletions

View File

@@ -76,10 +76,10 @@ class Expr extends StmtParent, @expr {
/**
* Gets an integer indicating the type of expression that this represents.
*
* Consider using subclasses of `Expr` rather than relying on this predicate.
*
* DEPRECATED: use the subclasses of `Expr` rather than relying on this predicate.
*/
int getKind() { exprs(underlyingElement(this),result,_) }
deprecated int getKind() { exprs(underlyingElement(this),result,_) }
/** Gets a textual representation of this expression. */
override string toString() { none() }

View File

@@ -57,8 +57,12 @@ class Stmt extends StmtParent, @stmt {
override Location getLocation() { stmts(underlyingElement(this),_,result) }
/** Gets an int indicating the type of statement that this represents. */
int getKind() { stmts(underlyingElement(this),result,_) }
/**
* Gets an int indicating the type of statement that this represents.
*
* DEPRECATED: use the subclasses of `Stmt` rather than relying on this predicate.
*/
deprecated int getKind() { stmts(underlyingElement(this),result,_) }
override string toString() { none() }