@@ -307,21 +307,30 @@ class ParameterDeclarationEntry extends VariableDeclarationEntry {
307307 * }
308308 * ```
309309 *
310- * Local variables can be static; use the `isStatic` member predicate to
311- * detect those .
310+ * See also `StackVariable`, which is the class of local-scope variables
311+ * without statics and thread-locals .
312312 */
313313class LocalScopeVariable extends Variable , @localscopevariable {
314314 /** Gets the function to which this variable belongs. */
315315 /*abstract*/ Function getFunction ( ) { none ( ) }
316316}
317317
318318/**
319- * DEPRECATED: use `LocalScopeVariable` instead.
319+ * A C/C++ variable with _automatic storage duration_. In other words, a
320+ * function parameter or a local variable that is not static or thread-local.
321+ * For example, the variables `a` and `b` in the following code.
322+ * ```
323+ * void myFunction(int a) {
324+ * int b;
325+ * static int c;
326+ * }
327+ * ```
320328 */
321- deprecated class StackVariable extends Variable {
322- StackVariable ( ) { this instanceof LocalScopeVariable }
323-
324- Function getFunction ( ) { result = this .( LocalScopeVariable ) .getFunction ( ) }
329+ class StackVariable extends LocalScopeVariable {
330+ StackVariable ( ) {
331+ not this .isStatic ( ) and
332+ not this .isThreadLocal ( )
333+ }
325334}
326335
327336/**
@@ -496,7 +505,7 @@ class TemplateVariable extends Variable {
496505 * `myTemplateFunction<T>`:
497506 * ```
498507 * void myFunction() {
499- * T a;
508+ * float a;
500509 * }
501510 *
502511 * template<type T>
@@ -509,9 +518,6 @@ class TemplateVariable extends Variable {
509518 * myTemplateFunction<int>();
510519 * ```
511520 */
512- class SemanticStackVariable extends LocalScopeVariable {
513- SemanticStackVariable ( ) {
514- not this .isStatic ( ) and
515- not this .isFromUninstantiatedTemplate ( _)
516- }
521+ class SemanticStackVariable extends StackVariable {
522+ SemanticStackVariable ( ) { not this .isFromUninstantiatedTemplate ( _) }
517523}
0 commit comments