[PATCH] D66564: [clang-tidy] new FPGA struct pack align check

Frank Derry Wanye via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 08:45:44 PDT 2019


ffrankies updated this revision to Diff 219358.
ffrankies added a comment.
Herald added subscribers: kadircet, jkorous.

Sorry for the delay.

I was mostly having trouble building clang-tidy after pulling from master and having it recognize that the struct-pack-align check exists. I finally realized that the check had to be "registered" in more files, and those changes are a part of the update.

I have also updated the ReleaseNotes to use the word "checks" instead of "lint checks", and implemented the suggestions from @alexfh for adhering to the style guide and being more concise (thanks for those comments! They'll be useful to most if not all of the other checks we're planning to submit).

Regarding the comment by @riccibruno: Our current plan is to submit checks as part of two modules: "OpenCL" and "FPGA", where the "OpenCL" checks are taken from OpenCL specifications, and "FPGA" checks are taken from Altera best practices and restrictions guides. That said, the struct-pack-align check is not specific to FPGAs; it's useful whenever a struct is moved from host to device, which could be something other than an FPGA. We are unaware of another module where this check would be more appropriate, so we stuck it here, but we're open to other suggestions, including moving it to the OpenCL module.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66564/new/

https://reviews.llvm.org/D66564

Files:
  clang-tidy/CMakeLists.txt
  clang-tidy/ClangTidyForceLinker.h
  clang-tidy/fpga/CMakeLists.txt
  clang-tidy/fpga/FPGATidyModule.cpp
  clang-tidy/fpga/StructPackAlignCheck.cpp
  clang-tidy/fpga/StructPackAlignCheck.h
  clang-tidy/plugin/CMakeLists.txt
  clang-tidy/tool/CMakeLists.txt
  clangd/CMakeLists.txt
  clangd/ClangdUnit.cpp
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/fpga-struct-pack-align.rst
  docs/clang-tidy/checks/list.rst
  docs/clang-tidy/index.rst
  test/clang-tidy/fpga-struct-pack-align.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66564.219358.patch
Type: text/x-patch
Size: 17288 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190909/e24ee54f/attachment-0001.bin>


More information about the cfe-commits mailing list