1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
// First comment
// Second comment
// First comment
// Second comment
// Issue #1134
class MyClass : public BaseClass
{
//@{ BaseClass interface
#if VERY_LONG_AND_COMPLICATED_DEFINE
void foo();
#endif // VERY_LONG_AND_COMPLICATED_DEFINE
//@}
};
// Issue #1287
void foo()
{
#if defined(SUPPORT_FEATURE)
bar();
#endif // SUPPORT_FEATURE
// Handle error
if (error != 0)
{
}
#if defined(SUPPORT_FEATURE)
bar();
#endif // SUPPORT_FEATURE
// Handle error
// Handle error
if (error != 0)
{
}
# if defined(SUPPORT_FEATURE)
bar();
# endif // SUPPORT_FEATURE
// SUPPORT_FEATURE
// Handle error
// Handle error
if (error != 0)
{
}
# if defined(SUPPORT_FEATURE)
bar();
# endif // SUPPORT_FEATURE
// SUPPORT_FEATURE
// Handle error
// Handle error
if (error != 0)
{
}
#if defined(SUPPORT_FEATURE)
bar();
#endif /* SUPPORT_FEATURE
SUPPORT_FEATURE */
// Handle error
// Handle error
if (error != 0)
{
}
}
// ----- Some namespace scope --------------------------------------------------
// ----- FooNamespace scope ----------------------------------------------------
namespace FooNamespace
{
// ----- Some classes scope ----------------------------------------------------
// ----- FooClass scope --------------------------------------------------------
class FooClass
{
using FooUsing = FooTemplate<
param1,
param2
>; // FooTemplate
// Foo description
void foo()
{
if (a == b)
{
// Col1 comment
// Col1 comment
// Col1 comment
// Baz description
baz(); // Baz trailing comment begin
// Baz trailing comment ...
// Baz trailing comment end
} // if (a == b)
// Bar description begin
// Bar description ...
// Bar description end
bar(
a,
b
); // bar trailing comment begin
// bar trailing comment ...
// Baz trailing comment end
/*! Baz description begin
*Baz description ...
* Baz description end */
baz(a,
b); /* Baz trailing comment begin
Baz trailing comment ...
Baz trailing comment end */
// Bar description
bar(); // bar trailing comment begin
// bar trailing comment ...
// Baz trailing comment end
// Baz description
baz();
}
void bar();
// Many methods
void baz();
}; // FooClass
// ----- FooClass scope --------------------------------------------------------
// Many classes
// Many classes
// Many classes
class BazClass
{
void foo();
// Many methods
// Many methods
// Many methods
// Overrides
// Overrides
//Overrides
protected:
// Bar description
void baz();
//Overrides
}; // BazClass trailing comment begin
// BazClass trailing comment ...
// BazClass trailing comment end
// ----- Some classes scope ----------------------------------------------------
} // FooNamespace trailing comment begin
// FooNamespace trailing comment end
// ----- FooNamespace scope ----------------------------------------------------
// BarNamespace description
namespace BarNamespace
{
} // namespace BarNamespace
// ----- Some namespace scope --------------------------------------------------
|