mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
C++: Fix the XMLParent Constructor.
This commit is contained in:
@@ -31,6 +31,12 @@ abstract class XMLLocatable extends @xmllocatable {
|
||||
* both of which can contain other elements.
|
||||
*/
|
||||
class XMLParent extends @xmlparent {
|
||||
XMLParent() {
|
||||
// explicitly restrict `this` to be either an `XMLElement` or an `XMLFile`;
|
||||
// the type `@xmlparent` currently also includes non-XML files
|
||||
this instanceof @xmlelement or xmlEncoding(this, _)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a printable representation of this XML parent.
|
||||
* (Intended to be overridden in subclasses.)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
| c.c | library-tests/files/c.c | CFile, MetricFile | C, XMLParent | | |
|
||||
| files1.cpp | library-tests/files/files1.cpp | CppFile, MetricFile | C++, XMLParent | swap | t |
|
||||
| files1.h | library-tests/files/files1.h | HeaderFile, MetricFile | XMLParent | swap | |
|
||||
| files2.cpp | library-tests/files/files2.cpp | CppFile, MetricFile | C++, XMLParent | g | x, y |
|
||||
| c.c | library-tests/files/c.c | CFile, MetricFile | C | | |
|
||||
| files1.cpp | library-tests/files/files1.cpp | CppFile, MetricFile | C++ | swap | t |
|
||||
| files1.h | library-tests/files/files1.h | HeaderFile, MetricFile | | swap | |
|
||||
| files2.cpp | library-tests/files/files2.cpp | CppFile, MetricFile | C++ | g | x, y |
|
||||
|
||||
Reference in New Issue
Block a user