Skip to content

Commit ae8e237

Browse files
authored
Merge pull request github#14494 from atorralba/atorralba/remove-library
Java/C/C#: Remove library annotations
2 parents d723905 + 0cea3f8 commit ae8e237

File tree

22 files changed

+35
-37
lines changed

22 files changed

+35
-37
lines changed

cpp/ql/lib/semmle/code/cpp/NameQualifiers.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,7 @@ class NameQualifyingElement extends Element, @namequalifyingelement {
158158
/**
159159
* A special name-qualifying element. For example: `__super`.
160160
*/
161-
library class SpecialNameQualifyingElement extends NameQualifyingElement,
162-
@specialnamequalifyingelement
163-
{
161+
class SpecialNameQualifyingElement extends NameQualifyingElement, @specialnamequalifyingelement {
164162
/** Gets the name of this special qualifying element. */
165163
override string getName() { specialnamequalifyingelements(underlyingElement(this), result) }
166164

cpp/ql/lib/semmle/code/cpp/controlflow/DefinitionsAndUses.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ predicate parameterUsePair(Parameter p, VariableAccess va) {
7878
/**
7979
* Utility class: A definition or use of a stack variable.
8080
*/
81-
library class DefOrUse extends ControlFlowNodeBase {
81+
class DefOrUse extends ControlFlowNodeBase {
8282
DefOrUse() {
8383
// Uninstantiated templates are purely syntax, and only on instantiation
8484
// will they be complete with information about types, conversions, call
@@ -140,7 +140,7 @@ library class DefOrUse extends ControlFlowNodeBase {
140140
}
141141

142142
/** A definition of a stack variable. */
143-
library class Def extends DefOrUse {
143+
class Def extends DefOrUse {
144144
Def() { definition(_, this) }
145145

146146
override SemanticStackVariable getVariable(boolean isDef) {
@@ -155,7 +155,7 @@ private predicate parameterIsOverwritten(Function f, Parameter p) {
155155
}
156156

157157
/** A definition of a parameter. */
158-
library class ParameterDef extends DefOrUse {
158+
class ParameterDef extends DefOrUse {
159159
ParameterDef() {
160160
// Optimization: parameters that are not overwritten do not require
161161
// reachability analysis
@@ -169,7 +169,7 @@ library class ParameterDef extends DefOrUse {
169169
}
170170

171171
/** A use of a stack variable. */
172-
library class Use extends DefOrUse {
172+
class Use extends DefOrUse {
173173
Use() { useOfVar(_, this) }
174174

175175
override SemanticStackVariable getVariable(boolean isDef) {

cpp/ql/lib/semmle/code/cpp/controlflow/SSA.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import SSAUtils
1010
* The SSA logic comes in two versions: the standard SSA and range-analysis RangeSSA.
1111
* This class provides the standard SSA logic.
1212
*/
13-
library class StandardSsa extends SsaHelper {
13+
class StandardSsa extends SsaHelper {
1414
StandardSsa() { this = 0 }
1515
}
1616

cpp/ql/lib/semmle/code/cpp/controlflow/SSAUtils.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ private predicate live_at_exit_of_bb(StackVariable v, BasicBlock b) {
114114

115115
/** Common SSA logic for standard SSA and range-analysis SSA. */
116116
cached
117-
library class SsaHelper extends int {
117+
class SsaHelper extends int {
118118
/* 0 = StandardSSA, 1 = RangeSSA */
119119
cached
120120
SsaHelper() { this in [0 .. 1] }

cpp/ql/lib/semmle/code/cpp/controlflow/internal/ConstantExprs.qll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,12 @@ class CompileTimeConstantInt extends Expr {
366366
int getIntValue() { result = val }
367367
}
368368

369-
library class CompileTimeVariableExpr extends Expr {
369+
class CompileTimeVariableExpr extends Expr {
370370
CompileTimeVariableExpr() { not this instanceof CompileTimeConstantInt }
371371
}
372372

373373
/** A helper class for evaluation of expressions. */
374-
library class ExprEvaluator extends int {
374+
class ExprEvaluator extends int {
375375
/*
376376
* 0 = ConditionEvaluator,
377377
* 1 = SwitchEvaluator,
@@ -956,7 +956,7 @@ private predicate returnStmt(Function f, Expr value) {
956956
}
957957

958958
/** A helper class for evaluation of conditions. */
959-
library class ConditionEvaluator extends ExprEvaluator {
959+
class ConditionEvaluator extends ExprEvaluator {
960960
ConditionEvaluator() { this = 0 }
961961

962962
override predicate interesting(Expr e) {
@@ -967,7 +967,7 @@ library class ConditionEvaluator extends ExprEvaluator {
967967
}
968968

969969
/** A helper class for evaluation of switch expressions. */
970-
library class SwitchEvaluator extends ExprEvaluator {
970+
class SwitchEvaluator extends ExprEvaluator {
971971
SwitchEvaluator() { this = 1 }
972972

973973
override predicate interesting(Expr e) { e = getASwitchExpr(_, _) }
@@ -976,7 +976,7 @@ library class SwitchEvaluator extends ExprEvaluator {
976976
private int getSwitchValue(Expr e) { exists(SwitchEvaluator x | result = x.getValue(e)) }
977977

978978
/** A helper class for evaluation of loop entry conditions. */
979-
library class LoopEntryConditionEvaluator extends ExprEvaluator {
979+
class LoopEntryConditionEvaluator extends ExprEvaluator {
980980
LoopEntryConditionEvaluator() { this in [2 .. 3] }
981981

982982
abstract override predicate interesting(Expr e);
@@ -1149,7 +1149,7 @@ library class LoopEntryConditionEvaluator extends ExprEvaluator {
11491149
}
11501150

11511151
/** A helper class for evaluation of while-loop entry conditions. */
1152-
library class WhileLoopEntryConditionEvaluator extends LoopEntryConditionEvaluator {
1152+
class WhileLoopEntryConditionEvaluator extends LoopEntryConditionEvaluator {
11531153
WhileLoopEntryConditionEvaluator() { this = 2 }
11541154

11551155
override predicate interesting(Expr e) { exists(WhileStmt while | e = while.getCondition()) }
@@ -1162,7 +1162,7 @@ library class WhileLoopEntryConditionEvaluator extends LoopEntryConditionEvaluat
11621162
}
11631163

11641164
/** A helper class for evaluation of for-loop entry conditions. */
1165-
library class ForLoopEntryConditionEvaluator extends LoopEntryConditionEvaluator {
1165+
class ForLoopEntryConditionEvaluator extends LoopEntryConditionEvaluator {
11661166
ForLoopEntryConditionEvaluator() { this = 3 }
11671167

11681168
override predicate interesting(Expr e) { exists(ForStmt for | e = for.getCondition()) }

cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeSSA.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ private import RangeAnalysisUtils
2929
* The SSA logic comes in two versions: the standard SSA and range-analysis RangeSSA.
3030
* This class provides the range-analysis SSA logic.
3131
*/
32-
library class RangeSsa extends SsaHelper {
32+
class RangeSsa extends SsaHelper {
3333
RangeSsa() { this = 1 }
3434

3535
/**

cpp/ql/src/Microsoft/SAL.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private predicate annotatesAtPosition(SalPosition pos, DeclarationEntry d, File
161161
* A SAL element, that is, a SAL annotation or a declaration entry
162162
* that may have SAL annotations.
163163
*/
164-
library class SalElement extends Element {
164+
class SalElement extends Element {
165165
SalElement() {
166166
containsSalAnnotation(this.(DeclarationEntry).getFile()) or
167167
this instanceof SalAnnotation

csharp/ql/lib/semmle/code/csharp/exprs/Access.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ class MemberConstantAccess extends FieldAccess {
398398
* An internal helper class to share logic between `PropertyAccess` and
399399
* `PropertyCall`.
400400
*/
401-
library class PropertyAccessExpr extends Expr, @property_access_expr {
401+
class PropertyAccessExpr extends Expr, @property_access_expr {
402402
/** Gets the target of this property access. */
403403
Property getProperty() { expr_access(this, result) }
404404

@@ -540,7 +540,7 @@ class ElementWrite extends ElementAccess, AssignableWrite { }
540540
* An internal helper class to share logic between `IndexerAccess` and
541541
* `IndexerCall`.
542542
*/
543-
library class IndexerAccessExpr extends Expr, @indexer_access_expr {
543+
class IndexerAccessExpr extends Expr, @indexer_access_expr {
544544
/** Gets the target of this indexer access. */
545545
Indexer getIndexer() { expr_access(this, result) }
546546

@@ -628,7 +628,7 @@ class VirtualIndexerAccess extends IndexerAccess {
628628
* An internal helper class to share logic between `EventAccess` and
629629
* `EventCall`.
630630
*/
631-
library class EventAccessExpr extends Expr, @event_access_expr {
631+
class EventAccessExpr extends Expr, @event_access_expr {
632632
/** Gets the target of this event access. */
633633
Event getEvent() { expr_access(this, result) }
634634

csharp/ql/lib/semmle/code/csharp/frameworks/System.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ class DisposeMethod extends Method {
654654
}
655655

656656
/** A method with the signature `void Dispose(bool)`. */
657-
library class DisposeBoolMethod extends Method {
657+
class DisposeBoolMethod extends Method {
658658
DisposeBoolMethod() {
659659
this.hasName("Dispose") and
660660
this.getReturnType() instanceof VoidType and

java/ql/lib/semmle/code/java/GeneratedFiles.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ abstract class GeneratedFile extends File { }
4444
/**
4545
* A file detected as generated based on commonly-used marker comments.
4646
*/
47-
library class MarkerCommentGeneratedFile extends GeneratedFile {
47+
class MarkerCommentGeneratedFile extends GeneratedFile {
4848
MarkerCommentGeneratedFile() { any(GeneratedFileMarker t).getFile() = this }
4949
}
5050

0 commit comments

Comments
 (0)