Skip to content

Commit 9976825

Browse files
committed
C++: Slightly more logical layout.
1 parent 19d1578 commit 9976825

File tree

1 file changed

+43
-43
lines changed

1 file changed

+43
-43
lines changed

cpp/ql/src/Security/CWE/CWE-611/Xerces.qll

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -56,49 +56,6 @@ class XercesDOMParserClass extends Class {
5656
XercesDOMParserClass() { this.hasName("XercesDOMParser") }
5757
}
5858

59-
/**
60-
* The `DOMLSParser` class.
61-
*/
62-
class DomLSParserClass extends Class {
63-
DomLSParserClass() { this.hasName("DOMLSParser") }
64-
}
65-
66-
/**
67-
* The `SAXParser` class.
68-
*/
69-
class SaxParserClass extends Class {
70-
SaxParserClass() { this.hasName("SAXParser") }
71-
}
72-
73-
/**
74-
* The `SAX2XMLReader` class.
75-
*/
76-
class Sax2XmlReader extends Class {
77-
Sax2XmlReader() { this.hasName("SAX2XMLReader") }
78-
}
79-
80-
/**
81-
* The `createLSParser` function that returns a newly created `DOMLSParser`
82-
* object.
83-
*/
84-
class CreateLSParser extends Function {
85-
CreateLSParser() {
86-
this.hasName("createLSParser") and
87-
this.getUnspecifiedType().(PointerType).getBaseType() instanceof DomLSParserClass // returns a `DOMLSParser *`.
88-
}
89-
}
90-
91-
/**
92-
* The `createXMLReader` function that returns a newly created `SAX2XMLReader`
93-
* object.
94-
*/
95-
class CreateXmlReader extends Function {
96-
CreateXmlReader() {
97-
this.hasName("createXMLReader") and
98-
this.getUnspecifiedType().(PointerType).getBaseType() instanceof Sax2XmlReader // returns a `SAX2XMLReader *`.
99-
}
100-
}
101-
10259
/**
10360
* The `XercesDOMParser` interface for the Xerces XML library.
10461
*/
@@ -127,6 +84,24 @@ class XercesDomParserLibrary extends XmlLibrary {
12784
}
12885
}
12986

87+
/**
88+
* The `DOMLSParser` class.
89+
*/
90+
class DomLSParserClass extends Class {
91+
DomLSParserClass() { this.hasName("DOMLSParser") }
92+
}
93+
94+
/**
95+
* The `createLSParser` function that returns a newly created `DOMLSParser`
96+
* object.
97+
*/
98+
class CreateLSParser extends Function {
99+
CreateLSParser() {
100+
this.hasName("createLSParser") and
101+
this.getUnspecifiedType().(PointerType).getBaseType() instanceof DomLSParserClass // returns a `DOMLSParser *`.
102+
}
103+
}
104+
130105
/**
131106
* The createLSParser interface for the Xerces XML library.
132107
*/
@@ -153,6 +128,20 @@ class CreateLSParserLibrary extends XmlLibrary {
153128
}
154129
}
155130

131+
/**
132+
* The `SAXParser` class.
133+
*/
134+
class SaxParserClass extends Class {
135+
SaxParserClass() { this.hasName("SAXParser") }
136+
}
137+
138+
/**
139+
* The `SAX2XMLReader` class.
140+
*/
141+
class Sax2XmlReader extends Class {
142+
Sax2XmlReader() { this.hasName("SAX2XMLReader") }
143+
}
144+
156145
/**
157146
* The SAXParser interface for the Xerces XML library.
158147
*/
@@ -181,6 +170,17 @@ class SaxParserLibrary extends XmlLibrary {
181170
}
182171
}
183172

173+
/**
174+
* The `createXMLReader` function that returns a newly created `SAX2XMLReader`
175+
* object.
176+
*/
177+
class CreateXmlReader extends Function {
178+
CreateXmlReader() {
179+
this.hasName("createXMLReader") and
180+
this.getUnspecifiedType().(PointerType).getBaseType() instanceof Sax2XmlReader // returns a `SAX2XMLReader *`.
181+
}
182+
}
183+
184184
/**
185185
* The SAX2XMLReader interface for the Xerces XML library.
186186
*/

0 commit comments

Comments
 (0)