Skip to content

Commit

Permalink
[clang-tidy][NFC] Update documentation for fuchsia-statically-constru…
Browse files Browse the repository at this point in the history
…cted-objects

Fix compile errors in example provided in
documentation.

Fixes: #65118
  • Loading branch information
PiotrZSL committed Sep 6, 2023
1 parent 2e3d694 commit 93f9f63
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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

0 comments on commit 93f9f63

Please sign in to comment.