Skip to content

Commit 93f9f63

Browse files
committed
[clang-tidy][NFC] Update documentation for fuchsia-statically-constructed-objects
Fix compile errors in example provided in documentation. Fixes: #65118
1 parent 2e3d694 commit 93f9f63

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang-tools-extra/docs/clang-tidy/checks/fuchsia/statically-constructed-objects.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ For example:
2222

2323
class C {
2424
public:
25-
C(int Val) : Val(Val) {}
26-
constexpr C() : Val(0) {}
25+
constexpr C(int Val) : Val(Val) {}
26+
C(int Val1, int Val2) : Val(Val1+Val2) {}
2727

2828
private:
2929
int Val;
@@ -38,6 +38,6 @@ For example:
3838
static int i; // No warning, as it is trivial
3939

4040
extern int get_i();
41-
static C(get_i()) // Warning, as the constructor is dynamically initialized
41+
static C c3(get_i());// Warning, as the constructor is dynamically initialized
4242

4343
See the features disallowed in Fuchsia at https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/cxx?hl=en

0 commit comments

Comments
 (0)