diff options
author | Adam Balogh <adam.balogh@ericsson.com> | 2018-10-13 10:34:52 +0000 |
---|---|---|
committer | Adam Balogh <adam.balogh@ericsson.com> | 2018-10-13 10:34:52 +0000 |
commit | eae83353b815bf82240536f06b2c9d2d00e9a5cf (patch) | |
tree | c5e3ae17a1ca5d983311e4aae58d71358cc91c61 /clang-tools-extra/docs | |
parent | 09d8b358e8d6c03dbf4e34ee1bce29db22ddd459 (diff) |
[clang-tidy] Optimize query in bugprone-exception-escape
Checking whether a functions throws indirectly may be very expensive because it
needs to visit its whole call graph. Therefore we should first check whether the
function is forbidden to throw and only check whether it throws afterward. This
also seems to solve bug https://bugs.llvm.org/show_bug.cgi?id=39167 where the
execution time is so long that it seems to hang.
Differential Revision: https://reviews.llvm.org/D53187
Diffstat (limited to 'clang-tools-extra/docs')
-rw-r--r-- | clang-tools-extra/docs/clang-tidy/checks/bugprone-exception-escape.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-exception-escape.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-exception-escape.rst index 3037f5e3ea5..e9653a7e5d5 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-exception-escape.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-exception-escape.rst @@ -21,6 +21,8 @@ are always possible to implement in a non throwing way. Non throwing ``swap()`` operations are also used to create move operations. A throwing ``main()`` function also results in unexpected termination. +WARNING! This check may be expensive on large source files. + Options ------- |