浏览代码

clang-tidy: Silence use-equals-default warning

clang-tidy 7 has an option to suppress this warning in macros which
defaults to '1'.  Set the option to '0' and silence the warning
explicitly.
Regina Pfeifer 6 年之前
父节点
当前提交
3f9822ff6d
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 0
      .clang-tidy
  2. 1 1
      Source/cmGeneratorExpressionNode.cxx

+ 2 - 0
.clang-tidy

@@ -34,4 +34,6 @@ HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$'
 CheckOptions:
   - key:   modernize-use-default-member-init.UseAssignment
     value: '1'
+  - key:   modernize-use-equals-default.IgnoreMacros
+    value: '0'
 ...

+ 1 - 1
Source/cmGeneratorExpressionNode.cxx

@@ -95,7 +95,7 @@ static const struct ZeroNode installInterfaceNode;
 #define BOOLEAN_OP_NODE(OPNAME, OP, SUCCESS_VALUE, FAILURE_VALUE)             \
   static const struct OP##Node : public cmGeneratorExpressionNode             \
   {                                                                           \
-    OP##Node() {}                                                             \
+    OP##Node() {} /* NOLINT(modernize-use-equals-default) */                  \
     virtual int NumExpectedParameters() const { return OneOrMoreParameters; } \
                                                                               \
     std::string Evaluate(const std::vector<std::string>& parameters,          \