Skip to content

Commit 4606587

Browse files
author
Matthew Gretton-Dann
committed
C++: Apply style guide to TypedefType.qll
1 parent af3b0d9 commit 4606587

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

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

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ private import semmle.code.cpp.internal.ResolveClass
1010
* * UsingAliasTypedefType: using <name> = <type>;
1111
*/
1212
class TypedefType extends UserType {
13-
1413
TypedefType() {
15-
usertypes(underlyingElement(this),_,5) or
16-
usertypes(underlyingElement(this),_,14)
14+
usertypes(underlyingElement(this), _, 5) or
15+
usertypes(underlyingElement(this), _, 14)
1716
}
1817

1918
/**
@@ -52,28 +51,26 @@ class TypedefType extends UserType {
5251
* A traditional C/C++ typedef type. See 4.9.1.
5352
*/
5453
class CTypedefType extends TypedefType {
55-
56-
CTypedefType() {
57-
usertypes(underlyingElement(this),_,5)
58-
}
54+
CTypedefType() { usertypes(underlyingElement(this), _, 5) }
5955

6056
override string getCanonicalQLClass() { result = "CTypedefType" }
6157

62-
override string explain() { result = "typedef {" + this.getBaseType().explain() + "} as \"" + this.getName() + "\"" }
58+
override string explain() {
59+
result = "typedef {" + this.getBaseType().explain() + "} as \"" + this.getName() + "\""
60+
}
6361
}
6462

6563
/**
6664
* A using alias C++ typedef type.
6765
*/
6866
class UsingAliasTypedefType extends TypedefType {
69-
70-
UsingAliasTypedefType() {
71-
usertypes(underlyingElement(this),_,14)
72-
}
67+
UsingAliasTypedefType() { usertypes(underlyingElement(this), _, 14) }
7368

7469
override string getCanonicalQLClass() { result = "UsingAliasTypedefType" }
7570

76-
override string explain() { result = "using {" + this.getBaseType().explain() + "} as \"" + this.getName() + "\"" }
71+
override string explain() {
72+
result = "using {" + this.getBaseType().explain() + "} as \"" + this.getName() + "\""
73+
}
7774
}
7875

7976
/**

0 commit comments

Comments
 (0)