[PATCH] D18766: [clang-tidy] Add check misc-multiple-statement-macro

Samuel Benzaquen via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 4 11:27:45 PDT 2016


sbenza created this revision.
sbenza added a reviewer: alexfh.
sbenza added a subscriber: cfe-commits.

The check detects multi-statement macros that are used in unbraced conditionals.
Only the first statement will be part of the conditionals and the rest will fall
outside of it and executed unconditionally.

http://reviews.llvm.org/D18766

Files:
  clang-tidy/misc/CMakeLists.txt
  clang-tidy/misc/MiscTidyModule.cpp
  clang-tidy/misc/MultipleStatementMacroCheck.cpp
  clang-tidy/misc/MultipleStatementMacroCheck.h
  docs/clang-tidy/checks/list.rst
  docs/clang-tidy/checks/misc-multiple-statement-macro.rst
  test/clang-tidy/misc-multiple-statement-macro.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18766.52585.patch
Type: text/x-patch
Size: 9803 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160404/5c8307f5/attachment-0001.bin>


More information about the cfe-commits mailing list