[all-commits] [llvm/llvm-project] b7d557: [clang-tidy][#51939] Exempt placement-new expressi...
zero9178 via All-commits
all-commits at lists.llvm.org
Wed Dec 15 07:59:29 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b7d55771ce3ecc5c1768bd5877dbdd312f9ab0d7
https://github.com/llvm/llvm-project/commit/b7d55771ce3ecc5c1768bd5877dbdd312f9ab0d7
Author: Markus Böck <markus.boeck02 at gmail.com>
Date: 2021-12-15 (Wed, 15 Dec 2021)
Changed paths:
M clang-tools-extra/clang-tidy/bugprone/ThrowKeywordMissingCheck.cpp
M clang-tools-extra/docs/ReleaseNotes.rst
M clang-tools-extra/test/clang-tidy/checkers/bugprone-throw-keyword-missing.cpp
Log Message:
-----------
[clang-tidy][#51939] Exempt placement-new expressions from 'bugprone-throw-keyword-missing'
The purpose of this checker is to flag a missing throw keyword, and does so by checking for the construction of an exception class that is then unused.
This works great except that placement new expressions are also flagged as those lead to the construction of an object as well, even though they are not temporary (as that is dependent on the storage).
This patch fixes the issue by exempting the match if it is within a placement-new.
Fixes https://github.com/llvm/llvm-project/issues/51939
Differential Revision: https://reviews.llvm.org/D115576
More information about the All-commits
mailing list