mirror of
https://github.com/github/codeql.git
synced 2026-05-05 21:55:19 +02:00
C++: Force LF for .c,.cpp,.h,.hpp
This commit is contained in:
@@ -1,41 +1,41 @@
|
||||
class A {
|
||||
|
||||
};
|
||||
|
||||
|
||||
class B {
|
||||
|
||||
};
|
||||
|
||||
class C: A, B {
|
||||
|
||||
};
|
||||
|
||||
class D: C {
|
||||
|
||||
class E;
|
||||
|
||||
};
|
||||
|
||||
class D::E {
|
||||
|
||||
class F;
|
||||
|
||||
class G {
|
||||
public:
|
||||
/* Non-trivial constructor and destructor */
|
||||
G() { 0; }
|
||||
~G() { 0; }
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
class D::E::F: D::E::G {
|
||||
/* Should have generated constructor and destructor, because of D::E::G */
|
||||
|
||||
static int m() {
|
||||
D::E::F def; /* Should trigger creation of D::E::F's generated constructor and destructor. */
|
||||
}
|
||||
};
|
||||
|
||||
// semmle-extractor-options: --microsoft
|
||||
class A {
|
||||
|
||||
};
|
||||
|
||||
|
||||
class B {
|
||||
|
||||
};
|
||||
|
||||
class C: A, B {
|
||||
|
||||
};
|
||||
|
||||
class D: C {
|
||||
|
||||
class E;
|
||||
|
||||
};
|
||||
|
||||
class D::E {
|
||||
|
||||
class F;
|
||||
|
||||
class G {
|
||||
public:
|
||||
/* Non-trivial constructor and destructor */
|
||||
G() { 0; }
|
||||
~G() { 0; }
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
class D::E::F: D::E::G {
|
||||
/* Should have generated constructor and destructor, because of D::E::G */
|
||||
|
||||
static int m() {
|
||||
D::E::F def; /* Should trigger creation of D::E::F's generated constructor and destructor. */
|
||||
}
|
||||
};
|
||||
|
||||
// semmle-extractor-options: --microsoft
|
||||
|
||||
@@ -1,84 +1,84 @@
|
||||
struct Base {
|
||||
int b1;
|
||||
float b1f;
|
||||
};
|
||||
|
||||
struct SingleInheritance : Base {
|
||||
int si1;
|
||||
float si1f;
|
||||
};
|
||||
|
||||
struct Base2 {
|
||||
int b2;
|
||||
float b2f;
|
||||
};
|
||||
|
||||
struct MultipleInheritance : Base, Base2 {
|
||||
int mi1;
|
||||
float mi1f;
|
||||
};
|
||||
|
||||
struct DeepInheritance : MultipleInheritance, SingleInheritance {
|
||||
int di1;
|
||||
float di1f;
|
||||
};
|
||||
|
||||
struct VirtualInheritance1 : virtual Base {
|
||||
int vi1;
|
||||
float vi1f;
|
||||
};
|
||||
|
||||
struct VirtualInheritance2 : VirtualInheritance1, virtual Base, virtual Base2 {
|
||||
int vi2;
|
||||
float vi2f;
|
||||
};
|
||||
|
||||
struct EffectivelyVirtual : virtual SingleInheritance, MultipleInheritance {
|
||||
int ev1;
|
||||
float ev1f;
|
||||
};
|
||||
|
||||
struct PolymorphicBase {
|
||||
virtual ~PolymorphicBase();
|
||||
int pb1;
|
||||
float pb1f;
|
||||
};
|
||||
|
||||
struct InheritsVTable : PolymorphicBase {
|
||||
int iv1;
|
||||
float iv1f;
|
||||
};
|
||||
|
||||
struct IntroducesVTable : Base {
|
||||
virtual ~IntroducesVTable();
|
||||
int iv2;
|
||||
float iv2f;
|
||||
};
|
||||
|
||||
struct Left : virtual Base {
|
||||
int l1;
|
||||
float l1f;
|
||||
};
|
||||
|
||||
struct Right : virtual Base {
|
||||
int r1;
|
||||
float r1f;
|
||||
};
|
||||
|
||||
struct Bottom : Left, Right {
|
||||
int b1;
|
||||
float b1f;
|
||||
};
|
||||
|
||||
struct DeepSingleInheritance : SingleInheritance {
|
||||
int dsi1;
|
||||
float dsi1f;
|
||||
};
|
||||
|
||||
struct Incomplete;
|
||||
Incomplete* p;
|
||||
|
||||
template<typename T>
|
||||
struct TemplateClass : Base
|
||||
{
|
||||
};
|
||||
struct Base {
|
||||
int b1;
|
||||
float b1f;
|
||||
};
|
||||
|
||||
struct SingleInheritance : Base {
|
||||
int si1;
|
||||
float si1f;
|
||||
};
|
||||
|
||||
struct Base2 {
|
||||
int b2;
|
||||
float b2f;
|
||||
};
|
||||
|
||||
struct MultipleInheritance : Base, Base2 {
|
||||
int mi1;
|
||||
float mi1f;
|
||||
};
|
||||
|
||||
struct DeepInheritance : MultipleInheritance, SingleInheritance {
|
||||
int di1;
|
||||
float di1f;
|
||||
};
|
||||
|
||||
struct VirtualInheritance1 : virtual Base {
|
||||
int vi1;
|
||||
float vi1f;
|
||||
};
|
||||
|
||||
struct VirtualInheritance2 : VirtualInheritance1, virtual Base, virtual Base2 {
|
||||
int vi2;
|
||||
float vi2f;
|
||||
};
|
||||
|
||||
struct EffectivelyVirtual : virtual SingleInheritance, MultipleInheritance {
|
||||
int ev1;
|
||||
float ev1f;
|
||||
};
|
||||
|
||||
struct PolymorphicBase {
|
||||
virtual ~PolymorphicBase();
|
||||
int pb1;
|
||||
float pb1f;
|
||||
};
|
||||
|
||||
struct InheritsVTable : PolymorphicBase {
|
||||
int iv1;
|
||||
float iv1f;
|
||||
};
|
||||
|
||||
struct IntroducesVTable : Base {
|
||||
virtual ~IntroducesVTable();
|
||||
int iv2;
|
||||
float iv2f;
|
||||
};
|
||||
|
||||
struct Left : virtual Base {
|
||||
int l1;
|
||||
float l1f;
|
||||
};
|
||||
|
||||
struct Right : virtual Base {
|
||||
int r1;
|
||||
float r1f;
|
||||
};
|
||||
|
||||
struct Bottom : Left, Right {
|
||||
int b1;
|
||||
float b1f;
|
||||
};
|
||||
|
||||
struct DeepSingleInheritance : SingleInheritance {
|
||||
int dsi1;
|
||||
float dsi1f;
|
||||
};
|
||||
|
||||
struct Incomplete;
|
||||
Incomplete* p;
|
||||
|
||||
template<typename T>
|
||||
struct TemplateClass : Base
|
||||
{
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user