[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-04-14 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. This appears to be failing on the PS4 linux bot likely due to the PS4 target has exceptions disabled by default. Can you take a look? https://lab.llvm.org/buildbot/#/builders/139/builds/2441 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-04-14 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG530456caf908: [clang-tidy] Add new check bugprone-unhandled-exception-at-new. (authored by balazske). Repository: rG LLVM Github Monorepo

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-04-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 337344. balazske added a comment. Add another test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97196/new/ https://reviews.llvm.org/D97196 Files:

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-04-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-exception-at-new.rst:7 +Finds calls to ``new`` that may throw ``std::bad_alloc``

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-04-13 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-unhandled-exception-at-new.cpp:20 +using badalloc3 = std::bad_alloc &; + +void *operator new(std::size_t, int, int); aaron.ballman wrote: > Another interesting test

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-04-13 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-exception-at-new.rst:7 +Finds calls to ``new`` that may throw ``std::bad_alloc`` exception and +the exception handler is missing. + aaron.ballman wrote: >

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-04-13 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 337078. balazske marked 8 inline comments as done. balazske added a comment. Rebase, changed documentation, small fix in the code, more tests added. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97196/new/

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-04-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnhandledExceptionAtNewCheck.cpp:28-30 +// Generic catch handler should match anything. +if (CatchS->getCaughtType().isNull()) + return true; I think this should

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-04-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Ping. The check now handles only check of allocation failure at `new`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97196/new/ https://reviews.llvm.org/D97196 ___ cfe-commits

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-04-07 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 335767. balazske added a comment. Fix a crash, update documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97196/new/ https://reviews.llvm.org/D97196 Files:

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-04-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Rename the check to "unhandled-bad_alloc" (or similar")? And the error message to " missing exception handler 'std::bad_alloc' "? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97196/new/ https://reviews.llvm.org/D97196

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-04-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 335505. balazske added a comment. Removed check of possible exceptions from constructor call. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97196/new/ https://reviews.llvm.org/D97196 Files:

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-03-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-unhandled-exception-at-new.cpp:143 + f_est_noexcept_dependent_used(); +} balazske wrote: > balazske wrote: > > aaron.ballman wrote: > > > You have tests for

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-03-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 334156. balazske added a comment. Use `mayThrow`, improve test (user and class-specific cases). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97196/new/ https://reviews.llvm.org/D97196 Files:

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-03-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-unhandled-exception-at-new.cpp:143 + f_est_noexcept_dependent_used(); +} balazske wrote: > aaron.ballman wrote: > > You have tests for placement new with

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-03-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-unhandled-exception-at-new.cpp:143 + f_est_noexcept_dependent_used(); +} aaron.ballman wrote: > You have tests for placement new with `nothrow_t`, but I think other

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-03-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-exception-at-new.rst:17 +Calls to ``new`` can throw exception of type ``bad_alloc`` that should be +handled by the code. Alternatively the nonthrowing form of ``new``

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-03-09 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97196/new/ https://reviews.llvm.org/D97196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-02-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 326642. balazske added a comment. Rebase, fixes according to review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97196/new/ https://reviews.llvm.org/D97196 Files:

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnhandledExceptionAtNewCheck.cpp:23-24 +const CXXCatchStmt *CatchS = Node.getHandler(I); +if (InnerMatcher.matches(CatchS->getCaughtType(), Finder, Builder)) + return true; +//

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-02-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:73 + +New checks +^^ Please rebase from trunk. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:79 + +Finds calls to ``new`` that may throw

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-02-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: martong, gamesh411, Szelethus, dkrupp, xazax.hun, whisperity, mgorny. balazske requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo