Ver Fonte

clang-tidy: enable cmStrLen() check and fix violations

Kyle Edwards há 3 anos atrás
pai
commit
b4e8ddbc2f
2 ficheiros alterados com 2 adições e 1 exclusões
  1. 1 0
      .clang-tidy
  2. 1 1
      Source/cmGeneratorTarget.cxx

+ 1 - 0
.clang-tidy

@@ -33,6 +33,7 @@ readability-*,\
 -readability-redundant-member-init,\
 -readability-redundant-member-init,\
 -readability-suspicious-call-argument,\
 -readability-suspicious-call-argument,\
 -readability-uppercase-literal-suffix,\
 -readability-uppercase-literal-suffix,\
+cmake-*,\
 "
 "
 HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$'
 HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$'
 CheckOptions:
 CheckOptions:

+ 1 - 1
Source/cmGeneratorTarget.cxx

@@ -5532,7 +5532,7 @@ cmGeneratorTarget::GetTargetSourceFileFlags(const cmSourceFile* sf) const
       } else if (cmHasLiteralPrefix(*location, "Resources/")) {
       } else if (cmHasLiteralPrefix(*location, "Resources/")) {
         flags.Type = cmGeneratorTarget::SourceFileTypeDeepResource;
         flags.Type = cmGeneratorTarget::SourceFileTypeDeepResource;
         if (stripResources) {
         if (stripResources) {
-          flags.MacFolder += strlen("Resources/");
+          flags.MacFolder += cmStrLen("Resources/");
         }
         }
       } else {
       } else {
         flags.Type = cmGeneratorTarget::SourceFileTypeMacContent;
         flags.Type = cmGeneratorTarget::SourceFileTypeMacContent;