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

don hinton via cfe-commits cfe-commits at lists.llvm.org
Mon May 23 17:07:12 PDT 2016


hintonda added a comment.

Actually, this will never work correctly -- in fact, raw lexing will always be problematic.  Consider:

void foo()
#if !__has_feature(cxx_noexcept)

  throw(std::bad_alloc)

#endif
{}

In this case we *could* figure out if __has_feature(cxx_noexcept) evaluated to true or false, but what if it was a macro instead?  We can't reliably handle it without reparsing the whole thing.

I'll leave it as is for now, but once http://reviews.llvm.org/D20428 is available, I'll start a new diff using it.


http://reviews.llvm.org/D18575





More information about the cfe-commits mailing list