mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
Remove Content::NoContent
This commit is contained in:
@@ -390,8 +390,7 @@ private module Cached {
|
||||
class TContentSet = TSingletonContent or TAnyElementContent or TElementLowerBoundContent;
|
||||
|
||||
cached
|
||||
newtype TOptionalContent =
|
||||
TNoContent() or
|
||||
newtype TContent =
|
||||
TKnownElementContent(ConstantValue cv) {
|
||||
not cv.isInt(_) or
|
||||
cv.getInt() in [0 .. 10]
|
||||
@@ -418,11 +417,6 @@ private module Cached {
|
||||
// Only used by type-tracking
|
||||
TAttributeName(string name) { name = any(AST::SetterMethodCall c).getTargetName() }
|
||||
|
||||
cached
|
||||
class TContent =
|
||||
TKnownElementContent or TUnknownElementContent or TKnownPairValueContent or
|
||||
TUnknownPairValueContent or TFieldContent or TAttributeName;
|
||||
|
||||
/**
|
||||
* Holds if `e` is an `ExprNode` that may be returned by a call to `c`.
|
||||
*/
|
||||
|
||||
@@ -235,8 +235,8 @@ predicate localExprFlow(CfgNodes::ExprCfgNode e1, CfgNodes::ExprCfgNode e2) {
|
||||
localFlow(exprNode(e1), exprNode(e2))
|
||||
}
|
||||
|
||||
/** A reference contained in an object, or the `noContent()` value. */
|
||||
class OptionalContent extends TOptionalContent {
|
||||
/** A reference contained in an object. */
|
||||
class Content extends TContent {
|
||||
/** Gets a textual representation of this content. */
|
||||
string toString() { none() }
|
||||
|
||||
@@ -244,9 +244,6 @@ class OptionalContent extends TOptionalContent {
|
||||
Location getLocation() { none() }
|
||||
}
|
||||
|
||||
/** A reference contained in an object. */
|
||||
class Content extends OptionalContent, TContent { }
|
||||
|
||||
/** Provides different sub classes of `Content`. */
|
||||
module Content {
|
||||
/** An element in a collection, for example an element in an array or in a hash. */
|
||||
@@ -337,14 +334,6 @@ module Content {
|
||||
|
||||
/** Gets `AttributeNameContent` of the given name. */
|
||||
AttributeNameContent getAttributeName(string name) { result.getName() = name }
|
||||
|
||||
/** A value representing no content. */
|
||||
class NoContent extends OptionalContent, TNoContent {
|
||||
override string toString() { result = "noContent()" }
|
||||
}
|
||||
|
||||
/** Gets the `noContent()` value. */
|
||||
NoContent noContent() { any() }
|
||||
}
|
||||
|
||||
class OptionalContentSet extends TOptionalContentSet {
|
||||
|
||||
Reference in New Issue
Block a user