[clang-tidy][NFC] Update documentation for fuchsia-statically-constructed-objects

Fix compile errors in example provided in
documentation.

Fixes: #65118
This commit is contained in:
Piotr Zegar 2023-09-06 17:38:33 +00:00
parent 2e3d694018
commit 93f9f63b2d

View File

@ -22,8 +22,8 @@ For example:
class C {
public:
C(int Val) : Val(Val) {}
constexpr C() : Val(0) {}
constexpr C(int Val) : Val(Val) {}
C(int Val1, int Val2) : Val(Val1+Val2) {}
private:
int Val;
@ -38,6 +38,6 @@ For example:
static int i; // No warning, as it is trivial
extern int get_i();
static C(get_i()) // Warning, as the constructor is dynamically initialized
static C c3(get_i());// Warning, as the constructor is dynamically initialized
See the features disallowed in Fuchsia at https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/cxx?hl=en