mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Merge pull request #1519 from geoffw0/depkind
CPP: Deprecate Expr.getKind() and Stmt.getKind().
This commit is contained in:
@@ -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() }
|
||||
|
||||
@@ -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() }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user