fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

at tngl 2.5 kB View raw
1// Build with "cl.exe /Zi /GR- /GX- every-type.cpp /link /debug /nodefaultlib /entry:main" 2 3// clang-format off 4void *__purecall = 0; 5 6void __cdecl operator delete(void *,unsigned int) {} 7void __cdecl operator delete(void *,unsigned __int64) {} 8 9struct FooStruct { }; // LF_STRUCTURE 10 11class FooClass { // LF_CLASS 12public: 13 // LF_FIELDLIST 14 enum NestedEnum { // LF_ENUM 15 // LF_NESTTYPE 16 A, B, C // LF_ENUMERATE 17 }; 18 19 void RegularMethod() {} // LF_ARGLIST 20 // LF_ONEMETHOD 21 // LF_MFUNCTION 22 23 void OverloadedMethod(int) {} // LF_METHODLIST 24 // LF_METHOD 25 void OverloadedMethod(int, int) {} 26 27 int HiNibble : 4; // LF_BITFIELD 28 int LoNibble : 4; 29 NestedEnum EnumVariable; // LF_MEMBER 30 static void *StaticMember; // LF_POINTER 31 // LF_STMEMBER 32}; 33 34void *FooClass::StaticMember = nullptr; 35 36class Inherit : public FooClass { // LF_BCLASS 37public: 38 virtual ~Inherit() {} // LF_VTSHAPE 39 // LF_VFUNCTAB 40}; 41 42class VInherit : public virtual FooClass { // LF_VBCLASS 43 44}; 45 46class IVInherit : public VInherit { // LF_IVBCLASS 47}; 48 49union TheUnion { 50 int X; // LF_UNION 51}; 52 53int SomeArray[7] = {1, 2, 3, 4, 5, 6, 7}; // LF_ARRAY 54 55template<typename T> 56void Reference(T &t) { } 57 58const volatile FooStruct FS; // LF_MODIFIER with struct 59const volatile FooClass FC; // LF_MODIFIER with class 60const volatile TheUnion TU; // LF_MODIFIER with union 61const volatile FooClass::NestedEnum FCNE = FooClass::A; // LF_MODIFIER with enum 62 63 64int main(int argc, char **argv) { // LF_PROCEDURE 65 const int X = 7; // LF_MODIFIER 66 67 FooStruct FooStructInstance; 68 FooClass FooClassInstance; 69 Inherit InheritInstance; 70 VInherit VInheritInstance; 71 IVInherit IVInheritInstance; 72 TheUnion UnionInstance; 73 Reference(FS); // LF_MODIFIER with struct 74 Reference(FC); // LF_MODIFIER with class 75 Reference(TU); // LF_MODIFIER with union 76 Reference(FCNE); // LF_MODIFIER with enum 77 return SomeArray[argc]; 78} 79