[PATCH] D18575: [clang-tidy] New checker to replace deprecated throw() specifications

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue May 17 06:11:03 PDT 2016


aaron.ballman added inline comments.

================
Comment at: clang-tidy/modernize/UseNoexceptCheck.cpp:39
@@ +38,3 @@
+
+  // FIXME: Add paren matching so we can parse more complex throw statements,
+  // e.g., (examples provided by Aaron Ballman):
----------------
@alexfh, what are your feelings on this FIXME? I am a bit concerned because these examples will cause the replacement range to be incorrect, which will turn working code into ill-formed code. The alternative, as I see it, is to instead properly track the exception specification source range information as part of the FunctionDecl (akin to `FunctionDecl::getReturnTypeSourceRange()`).

================
Comment at: docs/clang-tidy/checks/modernize-use-noexcept.rst:40
@@ +39,3 @@
+``noexcept(false)`` not ``noexcept``, this check will detect, but not
+provide a FixItHint in that case.
+
----------------
This seems to run contrary to one of the examples below where a fixit is provided for ``throw(A, B)``. If I understood properly, this statement is only true when using a ReplacementString. Perhaps it should instead say, "this check will detect, but not
provide a FixItHint for this case when a :option:`ReplacementString` is provided."


http://reviews.llvm.org/D18575





More information about the cfe-commits mailing list