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
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
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:
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``
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
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:
>
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/
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
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
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:
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
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:
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
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:
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
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
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``
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
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:
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;
+//
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
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
22 matches
Mail list logo