Author: Piotr Zegar Date: 2023-09-06T18:06:59Z New Revision: 93f9f63b2d3e04ec4abd79fb8119a685d9f750c6
URL: https://github.com/llvm/llvm-project/commit/93f9f63b2d3e04ec4abd79fb8119a685d9f750c6 DIFF: https://github.com/llvm/llvm-project/commit/93f9f63b2d3e04ec4abd79fb8119a685d9f750c6.diff LOG: [clang-tidy][NFC] Update documentation for fuchsia-statically-constructed-objects Fix compile errors in example provided in documentation. Fixes: #65118 Added: Modified: clang-tools-extra/docs/clang-tidy/checks/fuchsia/statically-constructed-objects.rst Removed: ################################################################################ diff --git a/clang-tools-extra/docs/clang-tidy/checks/fuchsia/statically-constructed-objects.rst b/clang-tools-extra/docs/clang-tidy/checks/fuchsia/statically-constructed-objects.rst index 4696269e3765532..bed9e5ac0cfd087 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/fuchsia/statically-constructed-objects.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/fuchsia/statically-constructed-objects.rst @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits