[PATCH] D17387: Add check for CERT FLP30-C

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 18 09:20:42 PST 2016


aaron.ballman created this revision.
aaron.ballman added reviewers: alexfh, sbenza.
aaron.ballman added a subscriber: cfe-commits.

This patch adds a check for the CERT secure coding rule: FLP30-C. Do not use floating-point variables as loop counters. It flags any for loop induction expression that has floating-point type.

https://www.securecoding.cert.org/confluence/display/c/FLP30-C.+Do+not+use+floating-point+variables+as+loop+counters

http://reviews.llvm.org/D17387

Files:
  clang-tidy/cert/CERTTidyModule.cpp
  clang-tidy/cert/CMakeLists.txt
  clang-tidy/cert/FloatLoopCounter.cpp
  clang-tidy/cert/FloatLoopCounter.h
  docs/clang-tidy/checks/cert-flp30-c.rst
  docs/clang-tidy/checks/list.rst
  test/clang-tidy/cert-flp30-c.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17387.48339.patch
Type: text/x-patch
Size: 6050 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160218/5acab58e/attachment.bin>


More information about the cfe-commits mailing list