Skip to content

Commit ae9f35b

Browse files
authored
Merge pull request github#1947 from jbj/autoformat-followup
C++: Autoformat five files
2 parents e7d8fa4 + 571c96b commit ae9f35b

File tree

5 files changed

+36
-25
lines changed

5 files changed

+36
-25
lines changed

cpp/ql/src/semmle/code/cpp/Variable.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class ParameterDeclarationEntry extends VariableDeclarationEntry {
315315
* static int c;
316316
* }
317317
* ```
318-
*
318+
*
319319
* Local variables can be static; use the `isStatic` member predicate to
320320
* detect those.
321321
*/
@@ -343,7 +343,7 @@ deprecated class StackVariable extends Variable {
343343
* static int c;
344344
* }
345345
* ```
346-
*
346+
*
347347
* Local variables can be static; use the `isStatic` member predicate to detect
348348
* those.
349349
*
@@ -512,9 +512,9 @@ class TemplateVariable extends Variable {
512512
* void myTemplateFunction() {
513513
* T b;
514514
* }
515-
*
515+
*
516516
* ...
517-
*
517+
*
518518
* myTemplateFunction<int>();
519519
* ```
520520
*/

cpp/ql/src/semmle/code/cpp/commons/CommonType.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,7 @@ class MicrosoftInt64Type extends IntegralType {
174174
* `__builtin_va_copy` and `__builtin_va_arg` expressions.
175175
*/
176176
class BuiltInVarArgsList extends Type {
177-
BuiltInVarArgsList() {
178-
this.hasName("__builtin_va_list")
179-
}
177+
BuiltInVarArgsList() { this.hasName("__builtin_va_list") }
180178

181179
override string getCanonicalQLClass() { result = "BuiltInVarArgsList" }
182180
}
Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
1+
class LambdaCapture extends @lambdacapture {
2+
string toString() { none() }
3+
}
4+
5+
class Lambda extends @lambdaexpr {
6+
string toString() { none() }
7+
}
8+
9+
class Field extends @membervariable {
10+
string toString() { none() }
11+
}
12+
13+
class Location extends @location_default {
14+
string toString() { none() }
15+
}
116

2-
class LambdaCapture extends @lambdacapture { string toString() { none() } }
3-
class Lambda extends @lambdaexpr { string toString() { none() } }
4-
class Field extends @membervariable { string toString() { none() } }
5-
class Location extends @location_default { string toString() { none() } }
6-
class Type extends @usertype { string toString() { none() } }
17+
class Type extends @usertype {
18+
string toString() { none() }
19+
}
720

821
pragma[noopt]
9-
predicate lambda_capture_new(LambdaCapture lc, Lambda l, int i, Field f,
10-
boolean captured_by_reference, boolean is_implicit,
11-
Location loc)
12-
{
22+
predicate lambda_capture_new(
23+
LambdaCapture lc, Lambda l, int i, Field f, boolean captured_by_reference, boolean is_implicit,
24+
Location loc
25+
) {
1326
exists(Type t |
1427
lambda_capture(lc, l, i, captured_by_reference, is_implicit, loc) and
1528
expr_types(l, t, _) and
@@ -19,8 +32,8 @@ predicate lambda_capture_new(LambdaCapture lc, Lambda l, int i, Field f,
1932
)
2033
}
2134

22-
from LambdaCapture lc, Lambda l, int i, Field f,
23-
boolean captured_by_reference, boolean is_implicit,
24-
Location loc
35+
from
36+
LambdaCapture lc, Lambda l, int i, Field f, boolean captured_by_reference, boolean is_implicit,
37+
Location loc
2538
where lambda_capture_new(lc, l, i, f, captured_by_reference, is_implicit, loc)
2639
select lc, l, i, f, captured_by_reference, is_implicit, loc
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
2-
class Value extends @value { string toString() { none() } }
1+
class Value extends @value {
2+
string toString() { none() }
3+
}
34

45
from Value v, string s
56
where values(v, s, _)
67
select v, s
7-
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
2-
class Value extends @value { string toString() { none() } }
1+
class Value extends @value {
2+
string toString() { none() }
3+
}
34

45
from Value v, string s
56
where values(v, _, s)
67
select v, s
7-

0 commit comments

Comments
 (0)