summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/cert-static-object-exception.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [ClangTidy] Separate tests for infrastructure and checkersDmitri Gribenko2019-10-111-275/+0
| | | | | | | | | | | | | | | | | | | | Summary: This change moves tests for checkers and infrastructure into separate directories, making it easier to find infrastructure tests. Tests for checkers are already easy to find because they are named after the checker. Tests for infrastructure were difficult to find because they were outnumbered by tests for checkers. Now they are in a separate directory. Reviewers: jfb, jdoerfert, lebedev.ri Subscribers: srhines, nemanjai, aheejin, kbarton, christof, mgrang, arphaman, jfb, lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68807 llvm-svn: 374540
* Adding a FIXME test to document an area for improvement with the ↵Aaron Ballman2018-11-291-0/+12
| | | | | | cert-err58-cpp check; NFC. llvm-svn: 347860
* Fix false positive with lambda assignments in cert-err58-cpp.Aaron Ballman2018-11-281-2/+27
| | | | | | This check is about preventing exceptions from being thrown before main() executes, and assigning a lambda (rather than calling it) to a global object cannot throw any exceptions. llvm-svn: 347761
* Fix a false-positive with cert-err58-cpp.Aaron Ballman2018-11-281-1/+14
| | | | | | If a variable is declared constexpr then its initializer needs to be a constant expression, and thus, cannot throw. This check is about not throwing exceptions before main() runs, and so it doesn't apply if the initializer cannot throw. This silences the diagnostic when initializing a constexpr variable and fixes PR35457. llvm-svn: 347745
* [clang-tidy] When" -fno-exceptions is used", this warning is better to be ↵Yan Wang2017-06-071-48/+79
| | | | | | | | | | | | | | | | | | suppressed. Summary: clang-tidy is better not to issues this warning, which checks where the initializer for the object may throw an exception, when "-fno-exceptions" is used. Reviewers: chh, aaron.ballman Reviewed By: aaron.ballman Subscribers: xazax.hun Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D33917 llvm-svn: 304931
* [clang-tidy] Update cert-err58-cpp to match its new generalised form.Malcolm Parsons2016-10-311-37/+84
| | | | | | | | | | | | | | Summary: Aaron modified cert-err58-cpp to include all exceptions thrown before main() Update the check to match. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25925 llvm-svn: 285653
* [clang-tidy] Use ignoreImplicit in cert-err58-cpp checkMalcolm Parsons2016-10-161-1/+32
| | | | | | | | | | | | | | Summary: Fix a false negative in cert-err58-cpp check when calling a constructor creates objects that require cleanup. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25642 llvm-svn: 284332
* Silence a false positive with the cert-err58-cpp check; now allows objects ↵Aaron Ballman2016-09-261-12/+76
| | | | | | | | with static or thread storage duration at function block scope. Patch by Malcolm Parsons llvm-svn: 282409
* Force test to a target that supports thread_localMatthias Braun2015-12-021-1/+1
| | | | | | This should fix darwin bots. llvm-svn: 254477
* Add a new checker, cert-err58-cpp, that checks for static or thread_local ↵Aaron Ballman2015-12-011-0/+52
objects that use a throwing constructor. This check corresponds to the CERT secure coding rule: https://www.securecoding.cert.org/confluence/display/cplusplus/ERR58-CPP.+Constructors+of+objects+with+static+or+thread+storage+duration+must+not+throw+exceptions llvm-svn: 254415
OpenPOWER on IntegriCloud