Skip to content

Commit 79d7ef2

Browse files
committed
C++: Accept test changes.
1 parent d42e432 commit 79d7ef2

5 files changed

Lines changed: 189 additions & 21 deletions

File tree

‎cpp/ql/test/library-tests/dataflow/external-models/asio_streams.cpp‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -158,23 +158,23 @@ void test_resolve() {
158158
std::string_view host_view(source());
159159
std::string_view service_view("");
160160

161-
sink(resolver.resolve(host, service)); // $ MISSING: ir
162-
sink(resolver.resolve(host, service, error)); // $ MISSING: ir
163-
sink(resolver.resolve(host, service, flags)); // $ MISSING: ir
164-
sink(resolver.resolve(host, service, flags, error)); // $ MISSING: ir
165-
166-
sink(resolver.resolve(host_view, service_view)); // $ MISSING: ir
167-
sink(resolver.resolve(host_view, service_view, error)); // $ MISSING: ir
168-
sink(resolver.resolve(host_view, service_view, flags)); // $ MISSING: ir
169-
sink(resolver.resolve(host_view, service_view, flags, error)); // $ MISSING: ir
170-
171-
sink(resolver.resolve(protocol, host, service)); // $ MISSING: ir
172-
sink(resolver.resolve(protocol, host, service, error)); // $ MISSING: ir
173-
sink(resolver.resolve(protocol, host, service, flags)); // $ MISSING: ir
174-
sink(resolver.resolve(protocol, host, service, flags, error)); // $ MISSING: ir
175-
176-
sink(resolver.resolve(protocol, host_view, service_view)); // $ MISSING: ir
177-
sink(resolver.resolve(protocol, host_view, service_view, error)); // $ MISSING: ir
178-
sink(resolver.resolve(protocol, host_view, service_view, flags)); // $ MISSING: ir
179-
sink(resolver.resolve(protocol, host_view, service_view, flags, error)); // $ MISSING: ir
161+
sink(resolver.resolve(host, service)); // $ ir
162+
sink(resolver.resolve(host, service, error)); // $ ir
163+
sink(resolver.resolve(host, service, flags)); // $ ir
164+
sink(resolver.resolve(host, service, flags, error)); // $ ir
165+
166+
sink(resolver.resolve(host_view, service_view)); // $ ir
167+
sink(resolver.resolve(host_view, service_view, error)); // $ ir
168+
sink(resolver.resolve(host_view, service_view, flags)); // $ ir
169+
sink(resolver.resolve(host_view, service_view, flags, error)); // $ ir
170+
171+
sink(resolver.resolve(protocol, host, service)); // $ ir
172+
sink(resolver.resolve(protocol, host, service, error)); // $ ir
173+
sink(resolver.resolve(protocol, host, service, flags)); // $ ir
174+
sink(resolver.resolve(protocol, host, service, flags, error)); // $ ir
175+
176+
sink(resolver.resolve(protocol, host_view, service_view)); // $ ir
177+
sink(resolver.resolve(protocol, host_view, service_view, error)); // $ ir
178+
sink(resolver.resolve(protocol, host_view, service_view, flags)); // $ ir
179+
sink(resolver.resolve(protocol, host_view, service_view, flags, error)); // $ ir
180180
}

‎cpp/ql/test/library-tests/dataflow/external-models/flow.expected‎

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,23 @@ models
102102
| 101 | Summary: BloombergLP::bdlbb; BlobUtil; true; copy; (Blob *,int,const char *,int); ; Argument[*2]; Argument[*0]; taint; manual |
103103
| 102 | Summary: BloombergLP::bdlbb; BlobUtil; true; copy; (char *,const Blob &,int,int); ; Argument[*1]; Argument[*0]; taint; manual |
104104
| 103 | Summary: BloombergLP::bdlbb; BlobUtil; true; getContiguousRangeOrCopy; ; ; Argument[*1]; ReturnValue[*]; taint; manual |
105-
| 104 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual |
105+
| 104 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (const InternetProtocol &,const string &,const string &); ; Argument[*1]; ReturnValue; taint; manual |
106+
| 105 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (const InternetProtocol &,const string &,const string &,error_code &); ; Argument[*1]; ReturnValue; taint; manual |
107+
| 106 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (const InternetProtocol &,const string &,const string &,flags); ; Argument[*1]; ReturnValue; taint; manual |
108+
| 107 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (const InternetProtocol &,const string &,const string &,flags,error_code &); ; Argument[*1]; ReturnValue; taint; manual |
109+
| 108 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (const InternetProtocol &,string_view,string_view); ; Argument[1]; ReturnValue; taint; manual |
110+
| 109 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (const InternetProtocol &,string_view,string_view,error_code &); ; Argument[1]; ReturnValue; taint; manual |
111+
| 110 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (const InternetProtocol &,string_view,string_view,flags); ; Argument[1]; ReturnValue; taint; manual |
112+
| 111 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (const InternetProtocol &,string_view,string_view,flags,error_code &); ; Argument[1]; ReturnValue; taint; manual |
113+
| 112 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (const string &,const string &); ; Argument[*0]; ReturnValue; taint; manual |
114+
| 113 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (const string &,const string &,error_code &); ; Argument[*0]; ReturnValue; taint; manual |
115+
| 114 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (const string &,const string &,flags); ; Argument[*0]; ReturnValue; taint; manual |
116+
| 115 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (const string &,const string &,flags,error_code &); ; Argument[*0]; ReturnValue; taint; manual |
117+
| 116 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (string_view,string_view); ; Argument[0]; ReturnValue; taint; manual |
118+
| 117 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (string_view,string_view,error_code &); ; Argument[0]; ReturnValue; taint; manual |
119+
| 118 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (string_view,string_view,flags); ; Argument[0]; ReturnValue; taint; manual |
120+
| 119 | Summary: boost::asio::ip; basic_resolver<InternetProtocol>; false; resolve; (string_view,string_view,flags,error_code &); ; Argument[0]; ReturnValue; taint; manual |
121+
| 120 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual |
106122
edges
107123
| asio_streams.cpp:129:34:129:44 | read_until output argument | asio_streams.cpp:133:7:133:17 | recv_buffer | provenance | Src:MaD:56 |
108124
| asio_streams.cpp:129:34:129:44 | read_until output argument | asio_streams.cpp:135:29:135:39 | recv_buffer | provenance | Src:MaD:56 Sink:MaD:4 |
@@ -111,7 +127,39 @@ edges
111127
| asio_streams.cpp:142:44:142:62 | call to buffer | asio_streams.cpp:142:44:142:62 | call to buffer | provenance | |
112128
| asio_streams.cpp:142:44:142:62 | call to buffer | asio_streams.cpp:143:7:143:17 | send_buffer | provenance | |
113129
| asio_streams.cpp:142:44:142:62 | call to buffer | asio_streams.cpp:145:29:145:39 | send_buffer | provenance | Sink:MaD:4 |
114-
| asio_streams.cpp:142:64:142:71 | *send_str | asio_streams.cpp:142:44:142:62 | call to buffer | provenance | MaD:104 |
130+
| asio_streams.cpp:142:64:142:71 | *send_str | asio_streams.cpp:142:44:142:62 | call to buffer | provenance | MaD:120 |
131+
| asio_streams.cpp:156:19:156:26 | call to source | asio_streams.cpp:161:24:161:27 | *host | provenance | TaintFunction |
132+
| asio_streams.cpp:156:19:156:26 | call to source | asio_streams.cpp:162:24:162:27 | *host | provenance | TaintFunction |
133+
| asio_streams.cpp:156:19:156:26 | call to source | asio_streams.cpp:163:24:163:27 | *host | provenance | TaintFunction |
134+
| asio_streams.cpp:156:19:156:26 | call to source | asio_streams.cpp:164:24:164:27 | *host | provenance | TaintFunction |
135+
| asio_streams.cpp:156:19:156:26 | call to source | asio_streams.cpp:171:34:171:37 | *host | provenance | TaintFunction |
136+
| asio_streams.cpp:156:19:156:26 | call to source | asio_streams.cpp:172:34:172:37 | *host | provenance | TaintFunction |
137+
| asio_streams.cpp:156:19:156:26 | call to source | asio_streams.cpp:173:34:173:37 | *host | provenance | TaintFunction |
138+
| asio_streams.cpp:156:19:156:26 | call to source | asio_streams.cpp:174:34:174:37 | *host | provenance | TaintFunction |
139+
| asio_streams.cpp:158:29:158:36 | call to source | asio_streams.cpp:166:24:166:32 | host_view | provenance | TaintFunction |
140+
| asio_streams.cpp:158:29:158:36 | call to source | asio_streams.cpp:167:24:167:32 | host_view | provenance | TaintFunction |
141+
| asio_streams.cpp:158:29:158:36 | call to source | asio_streams.cpp:168:24:168:32 | host_view | provenance | TaintFunction |
142+
| asio_streams.cpp:158:29:158:36 | call to source | asio_streams.cpp:169:24:169:32 | host_view | provenance | TaintFunction |
143+
| asio_streams.cpp:158:29:158:36 | call to source | asio_streams.cpp:176:34:176:42 | host_view | provenance | TaintFunction |
144+
| asio_streams.cpp:158:29:158:36 | call to source | asio_streams.cpp:177:34:177:42 | host_view | provenance | TaintFunction |
145+
| asio_streams.cpp:158:29:158:36 | call to source | asio_streams.cpp:178:34:178:42 | host_view | provenance | TaintFunction |
146+
| asio_streams.cpp:158:29:158:36 | call to source | asio_streams.cpp:179:34:179:42 | host_view | provenance | TaintFunction |
147+
| asio_streams.cpp:161:24:161:27 | *host | asio_streams.cpp:161:16:161:22 | call to resolve | provenance | MaD:112 |
148+
| asio_streams.cpp:162:24:162:27 | *host | asio_streams.cpp:162:16:162:22 | call to resolve | provenance | MaD:113 |
149+
| asio_streams.cpp:163:24:163:27 | *host | asio_streams.cpp:163:16:163:22 | call to resolve | provenance | MaD:114 |
150+
| asio_streams.cpp:164:24:164:27 | *host | asio_streams.cpp:164:16:164:22 | call to resolve | provenance | MaD:115 |
151+
| asio_streams.cpp:166:24:166:32 | host_view | asio_streams.cpp:166:16:166:22 | call to resolve | provenance | MaD:116 |
152+
| asio_streams.cpp:167:24:167:32 | host_view | asio_streams.cpp:167:16:167:22 | call to resolve | provenance | MaD:117 |
153+
| asio_streams.cpp:168:24:168:32 | host_view | asio_streams.cpp:168:16:168:22 | call to resolve | provenance | MaD:118 |
154+
| asio_streams.cpp:169:24:169:32 | host_view | asio_streams.cpp:169:16:169:22 | call to resolve | provenance | MaD:119 |
155+
| asio_streams.cpp:171:34:171:37 | *host | asio_streams.cpp:171:16:171:22 | call to resolve | provenance | MaD:104 |
156+
| asio_streams.cpp:172:34:172:37 | *host | asio_streams.cpp:172:16:172:22 | call to resolve | provenance | MaD:105 |
157+
| asio_streams.cpp:173:34:173:37 | *host | asio_streams.cpp:173:16:173:22 | call to resolve | provenance | MaD:106 |
158+
| asio_streams.cpp:174:34:174:37 | *host | asio_streams.cpp:174:16:174:22 | call to resolve | provenance | MaD:107 |
159+
| asio_streams.cpp:176:34:176:42 | host_view | asio_streams.cpp:176:16:176:22 | call to resolve | provenance | MaD:108 |
160+
| asio_streams.cpp:177:34:177:42 | host_view | asio_streams.cpp:177:16:177:22 | call to resolve | provenance | MaD:109 |
161+
| asio_streams.cpp:178:34:178:42 | host_view | asio_streams.cpp:178:16:178:22 | call to resolve | provenance | MaD:110 |
162+
| asio_streams.cpp:179:34:179:42 | host_view | asio_streams.cpp:179:16:179:22 | call to resolve | provenance | MaD:111 |
115163
| azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:257:5:257:8 | *resp | provenance | |
116164
| azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:262:5:262:8 | *resp | provenance | |
117165
| azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:266:38:266:41 | *resp | provenance | |
@@ -536,6 +584,40 @@ nodes
536584
| asio_streams.cpp:142:64:142:71 | *send_str | semmle.label | *send_str |
537585
| asio_streams.cpp:143:7:143:17 | send_buffer | semmle.label | send_buffer |
538586
| asio_streams.cpp:145:29:145:39 | send_buffer | semmle.label | send_buffer |
587+
| asio_streams.cpp:156:19:156:26 | call to source | semmle.label | call to source |
588+
| asio_streams.cpp:158:29:158:36 | call to source | semmle.label | call to source |
589+
| asio_streams.cpp:161:16:161:22 | call to resolve | semmle.label | call to resolve |
590+
| asio_streams.cpp:161:24:161:27 | *host | semmle.label | *host |
591+
| asio_streams.cpp:162:16:162:22 | call to resolve | semmle.label | call to resolve |
592+
| asio_streams.cpp:162:24:162:27 | *host | semmle.label | *host |
593+
| asio_streams.cpp:163:16:163:22 | call to resolve | semmle.label | call to resolve |
594+
| asio_streams.cpp:163:24:163:27 | *host | semmle.label | *host |
595+
| asio_streams.cpp:164:16:164:22 | call to resolve | semmle.label | call to resolve |
596+
| asio_streams.cpp:164:24:164:27 | *host | semmle.label | *host |
597+
| asio_streams.cpp:166:16:166:22 | call to resolve | semmle.label | call to resolve |
598+
| asio_streams.cpp:166:24:166:32 | host_view | semmle.label | host_view |
599+
| asio_streams.cpp:167:16:167:22 | call to resolve | semmle.label | call to resolve |
600+
| asio_streams.cpp:167:24:167:32 | host_view | semmle.label | host_view |
601+
| asio_streams.cpp:168:16:168:22 | call to resolve | semmle.label | call to resolve |
602+
| asio_streams.cpp:168:24:168:32 | host_view | semmle.label | host_view |
603+
| asio_streams.cpp:169:16:169:22 | call to resolve | semmle.label | call to resolve |
604+
| asio_streams.cpp:169:24:169:32 | host_view | semmle.label | host_view |
605+
| asio_streams.cpp:171:16:171:22 | call to resolve | semmle.label | call to resolve |
606+
| asio_streams.cpp:171:34:171:37 | *host | semmle.label | *host |
607+
| asio_streams.cpp:172:16:172:22 | call to resolve | semmle.label | call to resolve |
608+
| asio_streams.cpp:172:34:172:37 | *host | semmle.label | *host |
609+
| asio_streams.cpp:173:16:173:22 | call to resolve | semmle.label | call to resolve |
610+
| asio_streams.cpp:173:34:173:37 | *host | semmle.label | *host |
611+
| asio_streams.cpp:174:16:174:22 | call to resolve | semmle.label | call to resolve |
612+
| asio_streams.cpp:174:34:174:37 | *host | semmle.label | *host |
613+
| asio_streams.cpp:176:16:176:22 | call to resolve | semmle.label | call to resolve |
614+
| asio_streams.cpp:176:34:176:42 | host_view | semmle.label | host_view |
615+
| asio_streams.cpp:177:16:177:22 | call to resolve | semmle.label | call to resolve |
616+
| asio_streams.cpp:177:34:177:42 | host_view | semmle.label | host_view |
617+
| asio_streams.cpp:178:16:178:22 | call to resolve | semmle.label | call to resolve |
618+
| asio_streams.cpp:178:34:178:42 | host_view | semmle.label | host_view |
619+
| asio_streams.cpp:179:16:179:22 | call to resolve | semmle.label | call to resolve |
620+
| asio_streams.cpp:179:34:179:42 | host_view | semmle.label | host_view |
539621
| azure.cpp:253:48:253:60 | *call to GetBodyStream | semmle.label | *call to GetBodyStream |
540622
| azure.cpp:253:48:253:60 | call to GetBodyStream | semmle.label | call to GetBodyStream |
541623
| azure.cpp:257:5:257:8 | *resp | semmle.label | *resp |

‎cpp/ql/test/library-tests/dataflow/external-models/steps.expected‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
| asio_streams.cpp:142:64:142:71 | *send_str | asio_streams.cpp:142:44:142:62 | call to buffer |
2+
| asio_streams.cpp:161:24:161:27 | *host | asio_streams.cpp:161:16:161:22 | call to resolve |
3+
| asio_streams.cpp:162:24:162:27 | *host | asio_streams.cpp:162:16:162:22 | call to resolve |
4+
| asio_streams.cpp:163:24:163:27 | *host | asio_streams.cpp:163:16:163:22 | call to resolve |
5+
| asio_streams.cpp:164:24:164:27 | *host | asio_streams.cpp:164:16:164:22 | call to resolve |
6+
| asio_streams.cpp:166:24:166:32 | host_view | asio_streams.cpp:166:16:166:22 | call to resolve |
7+
| asio_streams.cpp:167:24:167:32 | host_view | asio_streams.cpp:167:16:167:22 | call to resolve |
8+
| asio_streams.cpp:168:24:168:32 | host_view | asio_streams.cpp:168:16:168:22 | call to resolve |
9+
| asio_streams.cpp:169:24:169:32 | host_view | asio_streams.cpp:169:16:169:22 | call to resolve |
10+
| asio_streams.cpp:171:34:171:37 | *host | asio_streams.cpp:171:16:171:22 | call to resolve |
11+
| asio_streams.cpp:172:34:172:37 | *host | asio_streams.cpp:172:16:172:22 | call to resolve |
12+
| asio_streams.cpp:173:34:173:37 | *host | asio_streams.cpp:173:16:173:22 | call to resolve |
13+
| asio_streams.cpp:174:34:174:37 | *host | asio_streams.cpp:174:16:174:22 | call to resolve |
14+
| asio_streams.cpp:176:34:176:42 | host_view | asio_streams.cpp:176:16:176:22 | call to resolve |
15+
| asio_streams.cpp:177:34:177:42 | host_view | asio_streams.cpp:177:16:177:22 | call to resolve |
16+
| asio_streams.cpp:178:34:178:42 | host_view | asio_streams.cpp:178:16:178:22 | call to resolve |
17+
| asio_streams.cpp:179:34:179:42 | host_view | asio_streams.cpp:179:16:179:22 | call to resolve |
218
| azure.cpp:252:79:252:98 | call to string | azure.cpp:252:62:252:99 | call to Url |
319
| azure.cpp:257:5:257:8 | *resp | azure.cpp:257:16:257:21 | Read output argument |
420
| azure.cpp:262:5:262:8 | *resp | azure.cpp:262:23:262:28 | ReadToCount output argument |

‎cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3350,6 +3350,14 @@
33503350
| Dubious signature "(const IPAddressRange *,unsigned char **)" in summary model. |
33513351
| Dubious signature "(const ISSUER_SIGN_TOOL *,unsigned char **)" in summary model. |
33523352
| Dubious signature "(const ISSUING_DIST_POINT *,unsigned char **)" in summary model. |
3353+
| Dubious signature "(const InternetProtocol &,const string &,const string &)" in summary model. |
3354+
| Dubious signature "(const InternetProtocol &,const string &,const string &,error_code &)" in summary model. |
3355+
| Dubious signature "(const InternetProtocol &,const string &,const string &,flags)" in summary model. |
3356+
| Dubious signature "(const InternetProtocol &,const string &,const string &,flags,error_code &)" in summary model. |
3357+
| Dubious signature "(const InternetProtocol &,string_view,string_view)" in summary model. |
3358+
| Dubious signature "(const InternetProtocol &,string_view,string_view,error_code &)" in summary model. |
3359+
| Dubious signature "(const InternetProtocol &,string_view,string_view,flags)" in summary model. |
3360+
| Dubious signature "(const InternetProtocol &,string_view,string_view,flags,error_code &)" in summary model. |
33533361
| Dubious signature "(const MATRIX *,const VECTOR *,VECTOR *)" in summary model. |
33543362
| Dubious signature "(const MD5_params *)" in summary model. |
33553363
| Dubious signature "(const ML_DSA_KEY *)" in summary model. |
@@ -4153,6 +4161,10 @@
41534161
| Dubious signature "(const stack_st_X509_EXTENSION *,int,int)" in summary model. |
41544162
| Dubious signature "(const stack_st_X509_NAME *)" in summary model. |
41554163
| Dubious signature "(const stat *)" in summary model. |
4164+
| Dubious signature "(const string &,const string &)" in summary model. |
4165+
| Dubious signature "(const string &,const string &,error_code &)" in summary model. |
4166+
| Dubious signature "(const string &,const string &,flags)" in summary model. |
4167+
| Dubious signature "(const string &,const string &,flags,error_code &)" in summary model. |
41564168
| Dubious signature "(const td_thragent_t *,lwpid_t,td_thrhandle_t *)" in summary model. |
41574169
| Dubious signature "(const td_thragent_t *,ps_prochandle **)" in summary model. |
41584170
| Dubious signature "(const td_thragent_t *,pthread_t,td_thrhandle_t *)" in summary model. |
@@ -5180,6 +5192,8 @@
51805192
| Dubious signature "(string_buf *,uint32_t *)" in summary model. |
51815193
| Dubious signature "(string_buf *,unsigned char *)" in summary model. |
51825194
| Dubious signature "(string_buf *,unsigned char **,size_t *)" in summary model. |
5195+
| Dubious signature "(string_view,string_view,error_code &)" in summary model. |
5196+
| Dubious signature "(string_view,string_view,flags,error_code &)" in summary model. |
51835197
| Dubious signature "(stringtable *,const char *)" in summary model. |
51845198
| Dubious signature "(stringtable *,stringtable_finalized *)" in summary model. |
51855199
| Dubious signature "(support_descriptors *,const char *,FILE *)" in summary model. |

0 commit comments

Comments
 (0)