File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
ql/src/semmle/code/csharp Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1- using Microsoft . CodeAnalysis ;
21using Microsoft . CodeAnalysis . CSharp . Syntax ;
32using Semmle . Extraction . CSharp . Entities . Expressions ;
43using Semmle . Extraction . Kinds ;
@@ -9,9 +8,11 @@ class LocalDeclaration : Statement<LocalDeclarationStatementSyntax>
98 {
109 static StmtKind GetKind ( LocalDeclarationStatementSyntax declStmt )
1110 {
12- if ( declStmt . UsingKeyword . RawKind != 0 ) return StmtKind . USING_DECL ;
11+ if ( declStmt . UsingKeyword . RawKind != 0 )
12+ return StmtKind . USING_DECL ;
1313
14- if ( declStmt . IsConst ) return StmtKind . CONST_DECL ;
14+ if ( declStmt . IsConst )
15+ return StmtKind . CONST_DECL ;
1516
1617 return StmtKind . VAR_DECL ;
1718 }
Original file line number Diff line number Diff line change @@ -1115,15 +1115,15 @@ class LockStmt extends Stmt, @lock_stmt {
11151115}
11161116
11171117/**
1118- * A using block or declaration. Either a using declaration (`UsingDecStmt `) or
1118+ * A using block or declaration. Either a using declaration (`UsingDeclStmt `) or
11191119 * a using block (`UsingBlockStmt`).
11201120 */
11211121class UsingStmt extends Stmt , @using_stmt {
11221122 /** Gets the `i`th local variable declaration of this `using` statement. */
11231123 LocalVariableDeclExpr getVariableDeclExpr ( int i ) { none ( ) }
11241124
11251125 /** Gets a local variable declaration of this `using` statement. */
1126- LocalVariableDeclExpr getAVariableDeclExpr ( ) { none ( ) }
1126+ LocalVariableDeclExpr getAVariableDeclExpr ( ) { result = this . getVariableDeclExpr ( _ ) }
11271127
11281128 /**
11291129 * DEPRECATED: Use UsingBlockStmt.getExpr() instead.
@@ -1165,9 +1165,6 @@ class UsingBlockStmt extends UsingStmt, @using_block_stmt {
11651165 /** Gets the `i`th local variable declaration of this `using` statement. */
11661166 override LocalVariableDeclExpr getVariableDeclExpr ( int i ) { result = this .getChild ( - i - 1 ) }
11671167
1168- /** Gets a local variable declaration of this `using` statement. */
1169- override LocalVariableDeclExpr getAVariableDeclExpr ( ) { result = this .getVariableDeclExpr ( _) }
1170-
11711168 /**
11721169 * Gets the expression directly used by this `using` statement, if any. For
11731170 * example, `f` on line 2 in
You can’t perform that action at this time.
0 commit comments