Skip to content

Commit 763d53a

Browse files
committed
C#: Remove the override and ext column from the summaries printing test.
1 parent b1329fd commit 763d53a

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/internal/ExternalFlow.qll

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,10 +516,13 @@ string asPartialModel(UnboundCallable c) {
516516
)
517517
}
518518

519-
/** Computes the first 4 columns for neutral CSV rows of `c`. */
520-
string asPartialNeutralModel(UnboundCallable c) {
519+
/**
520+
* Gets the signature of `c` in the format `namespace;type;name;parameters`.
521+
*/
522+
string getSignature(UnboundCallable c) {
521523
exists(string namespace, string type, string name, string parameters |
522-
partialModel(c, namespace, type, name, parameters) and
524+
partialModel(c, namespace, type, name, parameters)
525+
|
523526
result =
524527
namespace + ";" //
525528
+ type + ";" //

csharp/ql/src/utils/modelgenerator/internal/CaptureModelsSpecific.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ class TargetApiSpecific extends CS::Callable {
8080

8181
predicate asPartialModel = ExternalFlow::asPartialModel/1;
8282

83-
predicate asPartialNeutralModel = ExternalFlow::asPartialNeutralModel/1;
83+
/** Computes the first 4 columns for neutral CSV rows of `c`. */
84+
predicate asPartialNeutralModel = ExternalFlow::getSignature/1;
8485

8586
/**
8687
* Holds if `t` is a type that is generally used for bulk data in collection types.

csharp/ql/test/library-tests/dataflow/library/FlowSummaries.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import semmle.code.csharp.dataflow.internal.ExternalFlow
44
final private class NeutralCallableFinal = NeutralCallable;
55

66
class RelevantNeutralCallable extends NeutralCallableFinal {
7-
final string getCallableCsv() { result = asPartialNeutralModel(this) }
7+
final string getCallableCsv() { result = getSignature(this) }
88
}
99

1010
class RelevantSourceCallable extends SourceCallable {
11-
string getCallableCsv() { result = asPartialModel(this) }
11+
string getCallableCsv() { result = getSignature(this) }
1212
}
1313

1414
class RelevantSinkCallable extends SinkCallable {
15-
string getCallableCsv() { result = asPartialModel(this) }
15+
string getCallableCsv() { result = getSignature(this) }
1616
}
1717

1818
import TestSummaryOutput<IncludeSummarizedCallable>

csharp/ql/test/shared/FlowSummaries.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class IncludeSummarizedCallable extends SummarizedCallableImplFinal {
1010
}
1111

1212
/** Gets a string representing the callable in semi-colon separated format for use in flow summaries. */
13-
final string getCallableCsv() { result = asPartialModel(this) }
13+
final string getCallableCsv() { result = getSignature(this) }
1414

1515
predicate relevantSummary(
1616
SummaryComponentStack input, SummaryComponentStack output, boolean preservesValue

0 commit comments

Comments
 (0)