[PATCH] D20693: [clang-tidy] New checker to replace dynamic exception specifications

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 7 01:48:18 PDT 2017


alexfh added a comment.

In https://reviews.llvm.org/D20693#774693, @hintonda wrote:

> In order to fix diagnostic corruption in some of the buildbot tests
>  (unable to reproduce locally):
>
> - make NoexceptMacro a static variable so it's lifetime doesn't end when UseNoexceptCheck is destroyed.
> - pass a const char* instead of a StringRef to DiagnosticBuilder so it won't create a temporary std::string and cache the address of the temporary char * it owns.


That's pretty hacky, even if this fixes the immediate issue (which I'm somewhat skeptical about). Do you have failure logs saved somewhere, by chance? If not, I'd suggest to resubmit the original patch (without these two hacks) and grab the fresh failure logs. Another suggestion is to run the tests with asan (and maybe with msan) to see, whether the issue can be detected by the sanitizers.


https://reviews.llvm.org/D20693





More information about the cfe-commits mailing list