[PATCH] D59466: [clang-tidy] openmp-exception-escape - a new check

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 16 13:53:15 PDT 2019


lebedev.ri created this revision.
lebedev.ri added reviewers: JonasToth, aaron.ballman, baloghadamsoftware.
lebedev.ri added projects: clang-tools-extra, OpenMP.
Herald added subscribers: jdoerfert, guansong, rnkovacs, xazax.hun, mgorny.
Herald added a project: clang.

Finally, we are here!

Analyzes OpenMP Structured Blocks and checks that no exception escapes
out of the Structured Block it was thrown in.

As per the OpenMP specification, structured block is an executable statement,
possibly compound, with a single entry at the top and a single exit at the
bottom. Which means, ``throw`` may not be used to to 'exit' out of the
structured block. If an exception is not caught in the same structured block
it was thrown in, the behaviour is undefined / implementation defined,
the program will likely terminate.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D59466

Files:
  clang-tidy/openmp/CMakeLists.txt
  clang-tidy/openmp/ExceptionEscapeCheck.cpp
  clang-tidy/openmp/ExceptionEscapeCheck.h
  clang-tidy/openmp/OpenMPTidyModule.cpp
  clang-tidy/utils/ExceptionAnalyzer.cpp
  clang-tidy/utils/ExceptionAnalyzer.h
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/list.rst
  docs/clang-tidy/checks/openmp-exception-escape.rst
  test/clang-tidy/bugprone-exception-escape-openmp.cpp
  test/clang-tidy/openmp-exception-escape.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59466.190999.patch
Type: text/x-patch
Size: 15566 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190316/f6049ae2/attachment-0001.bin>


More information about the cfe-commits mailing list