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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon May 16 14:29:34 PDT 2016

aaron.ballman added inline comments.

Comment at: test/clang-tidy/modernize-use-noexcept-macro.cpp:11
@@ +10,3 @@
+// Should not trigger a FixItHint
+class A {};
hintonda wrote:
> aaron.ballman wrote:
> > I may have missed some context in the discussion, but why shouldn't this trigger a FixItHint?
> Because the user provided a macro.  The only reason you would do that is if you want the macro to expand to something different depending on whether or not 'noexcept' is supported.  
> Perhaps this can be done more elegantly, but the use case for this entire checker was libcxx.  It defines _NOEXCEPT as either noexcept or throw() depending on whether or not noexcept is supported.  I don't see a good way of doing that, other than removing it completely, so I just reported it without supplying a FixItHint.
Ah, thank you for the context! That information should probably go in the user facing documentation somewhere.


More information about the cfe-commits mailing list