From 9c4e940564af9aa61c3f57f309115cc0b874a3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 13 Nov 2024 22:53:42 +0100 Subject: [PATCH] nixos-option: enable modernize-* checks in clang-tidy --- pkgs/tools/nix/nixos-option/.clang-tidy | 2 +- pkgs/tools/nix/nixos-option/src/nixos-option.cc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/nix/nixos-option/.clang-tidy b/pkgs/tools/nix/nixos-option/.clang-tidy index cdc32d73afdf..6818a5afbe4c 100644 --- a/pkgs/tools/nix/nixos-option/.clang-tidy +++ b/pkgs/tools/nix/nixos-option/.clang-tidy @@ -5,8 +5,8 @@ Checks: # don't find them too problematic - -bugprone-easily-swappable-parameters - performance-* +- modernize-* # TODO -# - modernize-* # - readability-* # - misc-* # - portability-* diff --git a/pkgs/tools/nix/nixos-option/src/nixos-option.cc b/pkgs/tools/nix/nixos-option/src/nixos-option.cc index cc285b0d24ad..34acb78c66b6 100644 --- a/pkgs/tools/nix/nixos-option/src/nixos-option.cc +++ b/pkgs/tools/nix/nixos-option/src/nixos-option.cc @@ -82,8 +82,8 @@ class Out {} Out(const Out &) = delete; Out(Out &&) = default; - Out & operator=(const Out &) = delete; - Out & operator=(Out &&) = delete; + auto operator=(const Out &) -> Out & = delete; + auto operator=(Out &&) -> Out & = delete; ~Out() { ostream << end; } private: @@ -92,9 +92,9 @@ class Out std::string end; LinePolicy policy; bool writeSinceSep; - template friend Out & operator<<(Out & o, T thing); + template friend auto operator<<(Out & o, T thing) -> Out &; - friend void printValue(Context & ctx, Out & out, std::variant maybeValue, const std::string & path); + friend auto printValue(Context & ctx, Out & out, std::variant maybeValue, const std::string & path) -> void; }; template Out & operator<<(Out & o, T thing)