[PATCH] D27284: [ClangTidy] Add new performance-type-promotion-in-math-fn check.

Justin Lebar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 30 14:55:49 PST 2016


jlebar created this revision.
jlebar added a subscriber: cfe-commits.
Herald added a subscriber: mgorny.

This checks for calls to double-precision math.h with single-precision
arguments.  For example, it suggests replacing ::sin(0.f) with
::sinf(0.f).


https://reviews.llvm.org/D27284

Files:
  clang-tools-extra/clang-tidy/performance/CMakeLists.txt
  clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp
  clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp
  clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.h
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/docs/clang-tidy/checks/performance-type-promotion-in-math-fn.rst
  clang-tools-extra/test/clang-tidy/performance-type-promotion-in-math-fn.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27284.79823.patch
Type: text/x-patch
Size: 27410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161130/a2e80927/attachment-0001.bin>


More information about the cfe-commits mailing list