Skip to content

C++: Autoformat five files #1947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cpp/ql/src/semmle/code/cpp/Variable.qll
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ class ParameterDeclarationEntry extends VariableDeclarationEntry {
* static int c;
* }
* ```
*
*
* Local variables can be static; use the `isStatic` member predicate to
* detect those.
*/
Expand Down Expand Up @@ -343,7 +343,7 @@ deprecated class StackVariable extends Variable {
* static int c;
* }
* ```
*
*
* Local variables can be static; use the `isStatic` member predicate to detect
* those.
*
Expand Down Expand Up @@ -512,9 +512,9 @@ class TemplateVariable extends Variable {
* void myTemplateFunction() {
* T b;
* }
*
*
* ...
*
*
* myTemplateFunction<int>();
* ```
*/
Expand Down
4 changes: 1 addition & 3 deletions cpp/ql/src/semmle/code/cpp/commons/CommonType.qll
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,7 @@ class MicrosoftInt64Type extends IntegralType {
* `__builtin_va_copy` and `__builtin_va_arg` expressions.
*/
class BuiltInVarArgsList extends Type {
BuiltInVarArgsList() {
this.hasName("__builtin_va_list")
}
BuiltInVarArgsList() { this.hasName("__builtin_va_list") }

override string getCanonicalQLClass() { result = "BuiltInVarArgsList" }
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
class LambdaCapture extends @lambdacapture {
string toString() { none() }
}

class Lambda extends @lambdaexpr {
string toString() { none() }
}

class Field extends @membervariable {
string toString() { none() }
}

class Location extends @location_default {
string toString() { none() }
}

class LambdaCapture extends @lambdacapture { string toString() { none() } }
class Lambda extends @lambdaexpr { string toString() { none() } }
class Field extends @membervariable { string toString() { none() } }
class Location extends @location_default { string toString() { none() } }
class Type extends @usertype { string toString() { none() } }
class Type extends @usertype {
string toString() { none() }
}

pragma[noopt]
predicate lambda_capture_new(LambdaCapture lc, Lambda l, int i, Field f,
boolean captured_by_reference, boolean is_implicit,
Location loc)
{
predicate lambda_capture_new(
LambdaCapture lc, Lambda l, int i, Field f, boolean captured_by_reference, boolean is_implicit,
Location loc
) {
exists(Type t |
lambda_capture(lc, l, i, captured_by_reference, is_implicit, loc) and
expr_types(l, t, _) and
Expand All @@ -19,8 +32,8 @@ predicate lambda_capture_new(LambdaCapture lc, Lambda l, int i, Field f,
)
}

from LambdaCapture lc, Lambda l, int i, Field f,
boolean captured_by_reference, boolean is_implicit,
Location loc
from
LambdaCapture lc, Lambda l, int i, Field f, boolean captured_by_reference, boolean is_implicit,
Location loc
where lambda_capture_new(lc, l, i, f, captured_by_reference, is_implicit, loc)
select lc, l, i, f, captured_by_reference, is_implicit, loc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

class Value extends @value { string toString() { none() } }
class Value extends @value {
string toString() { none() }
}

from Value v, string s
where values(v, s, _)
select v, s

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

class Value extends @value { string toString() { none() } }
class Value extends @value {
string toString() { none() }
}

from Value v, string s
where values(v, _, s)
select v, s