skia2/tools/gpu/vk
John Stiles c1c3c6d70d Enable ClangTidy flag bugprone-suspicious-string-compare.
https://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-string-compare.html

Find suspicious usage of runtime string comparison functions.
This check is valid in C and C++.

Checks for calls with implicit comparator and proposed to
explicitly add it:

  if (strcmp(...))       // Implicitly compare to zero
  if (!strcmp(...))      // Won't warn
  if (strcmp(...) != 0)  // Won't warn

Checks that compare function results (i,e, strcmp) are compared to valid
constant. The resulting value is

  <  0    when lower than,
  >  0    when greater than,
  == 0    when equals.

A common mistake is to compare the result to 1 or -1:

  if (strcmp(...) == -1)  // Incorrect usage of the returned value.

Additionally, the check warns if the results value is implicitly cast
to a suspicious non-integer type. It’s happening when the returned
value is used in a wrong context:

  if (strcmp(...) < 0.)  // Incorrect usage of the returned value.

Change-Id: I001b88d06cc4f3eb5846103885be675f9b78e126
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310761
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-16 03:54:08 +00:00
..
GrVulkanDefines.h Revert "Revert "Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots"""" 2020-03-20 17:11:58 +00:00
VkTestContext.cpp Add Context factories to GrDirectContext 2020-07-14 12:40:46 +00:00
VkTestContext.h Enable ClangTidy flag modernize-use-override. 2020-08-14 10:54:45 +00:00
VkTestHelper.cpp Add Context factories to GrDirectContext 2020-07-14 12:40:46 +00:00
VkTestHelper.h Remove all internal uses of (and deprecate) SkSurface::getContext 2020-07-08 16:09:27 +00:00
VkTestUtils.cpp Enable ClangTidy flag bugprone-suspicious-string-compare. 2020-08-16 03:54:08 +00:00
VkTestUtils.h Enable ClangTidy check llvm-namespace-comment. 2020-08-06 19:07:52 +00:00
VkYcbcrSamplerHelper.cpp Clean up some GrContext uses in the GMs 2020-07-17 17:11:20 +00:00
VkYcbcrSamplerHelper.h Clean up some GrContext uses in the GMs 2020-07-17 17:11:20 +00:00