Skip to content

Commit 80f8928

Browse files
committed
C#: Add summary for System.Text.StringBuilder.Clear.
1 parent e3bfc4b commit 80f8928

File tree

1 file changed

+1
-12
lines changed
  • csharp/ql/lib/semmle/code/csharp/frameworks/system

1 file changed

+1
-12
lines changed

csharp/ql/lib/semmle/code/csharp/frameworks/system/Text.qll

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@ class SystemTextStringBuilderClass extends SystemTextClass {
2626
Method getAppendFormatMethod() { result = this.getAMethod("AppendFormat") }
2727
}
2828

29-
/** Clear content for `System.Text.StringBuilder.Clear`. */
30-
private class SystemTextStringBuilderClearFlow extends SummarizedCallable {
31-
SystemTextStringBuilderClearFlow() {
32-
this = any(SystemTextStringBuilderClass s).getAMethod("Clear")
33-
}
34-
35-
override predicate clearsContent(ParameterPosition pos, DataFlow::ContentSet content) {
36-
pos.isThisParameter() and
37-
content instanceof DataFlow::ElementContent
38-
}
39-
}
40-
4129
/** Data flow for `System.Text.StringBuilder`. */
4230
private class SystemTextStringBuilderFlowModelCsv extends SummaryModelCsv {
4331
override predicate row(string row) {
@@ -120,6 +108,7 @@ private class SystemTextStringBuilderFlowModelCsv extends SummaryModelCsv {
120108
"System.Text;StringBuilder;false;AppendLine;();;Argument[this];ReturnValue;value;manual",
121109
"System.Text;StringBuilder;false;AppendLine;(System.String);;Argument[0];Argument[this].Element;value;manual",
122110
"System.Text;StringBuilder;false;AppendLine;(System.String);;Argument[this];ReturnValue;value;manual",
111+
"System.Text;StringBuilder;false;Clear;();;Argument[this].WithoutElement;Argument[this];value;manual",
123112
"System.Text;StringBuilder;false;StringBuilder;(System.String);;Argument[0];Argument[this].Element;value;manual",
124113
"System.Text;StringBuilder;false;StringBuilder;(System.String,System.Int32);;Argument[0];Argument[this].Element;value;manual",
125114
"System.Text;StringBuilder;false;StringBuilder;(System.String,System.Int32,System.Int32,System.Int32);;Argument[0];Argument[this].Element;value;manual",

0 commit comments

Comments
 (0)