diff --git a/misc/style/run-clang-tidy.py b/misc/style/run-clang-tidy.py index b3c64fd66a..aaaebeefbd 100755 --- a/misc/style/run-clang-tidy.py +++ b/misc/style/run-clang-tidy.py @@ -14,6 +14,7 @@ import utils +LIGHTWEIGHT_TYPES = ["StateID"] IGNORES = [ "'cplex.h' file not found [clang-diagnostic-error]", "'soplex.h' file not found [clang-diagnostic-error]", @@ -98,9 +99,9 @@ def check_search_code_with_clang_tidy(): "readability-static-definition-in-anonymous-namespace", "readability-uniqueptr-delete-release", ] - config = """{CheckOptions: [\ - {key: performance-unnecessary-value-param.AllowedTypes, value: "StateID"},\ - ]}""".replace(" ", "") + config = f"""{{CheckOptions: [\ + {{key: performance-unnecessary-value-param.AllowedTypes, value: "{';'.join(LIGHTWEIGHT_TYPES)}"}},\ + ]}}""".replace(" ", "") cmd = [ "run-clang-tidy-12", "-quiet", diff --git a/src/search/parser/abstract_syntax_tree.cc b/src/search/parser/abstract_syntax_tree.cc index 7bfec782e3..a8656ab628 100644 --- a/src/search/parser/abstract_syntax_tree.cc +++ b/src/search/parser/abstract_syntax_tree.cc @@ -403,8 +403,8 @@ const plugins::Type &ListNode::get_type(DecorateContext &context) const { } } -LiteralNode::LiteralNode(Token value) - : value(move(value)) { +LiteralNode::LiteralNode(const Token &value) + : value(value) { } DecoratedASTNodePtr LiteralNode::decorate(DecorateContext &context) const {