[PATCH] D16308: clang-tidy Enhance readability-simplify-boolean-expr check to handle implicit conversions of integral types to bool and member pointers

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 10 07:52:06 PST 2016


On Wed, Feb 10, 2016 at 7:19 AM, Richard via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

>
> [Please reply *only* to the list and do not include my email directly
> in the To: or Cc: of your reply; otherwise I will not see your reply.
> Thanks.]
>
> In article <E1aTA3p-0002aM-4v at shell.xmission.com>,
>     Richard via cfe-commits <cfe-commits at lists.llvm.org> writes:
>
> > make check-all passes for me.  I don't see what the problem is in the
> logs
> > either.
>
> OK, I found the problem.  Once again, StringRef bites me on the behind.
>
> I have updated the review in phabricator with the corrected code.
> (The review was closed, so apparently it didn't post to the list
> when I updated it on phabricator?)
>
> I surmised that the buildbots do a release build and when I did
> check-clang-tools in release, I was able to reproduce the failure.
> clang-tidy seg-faults.
>

An effective way to detect this kind of an error early in the process is to
enable ASan in your build (cmake -DLLVM_USE_SANITIZER=Address ...). It
might make sense to enable UBSan as well
(-DLLVM_USE_SANITIZER=Address;Undefined).


>
> It would be nice if we could get the build log output to record that
> fact in the log.  I suspect it is the way that clang-tidy is invoked
> by the check_clang_tidy.py python script.  Somehow the offending SEGV
> message is suppressed.
>

Yeah, that's very unfortunate. I didn't find a way to make the script
output this (or similar) message.


> --
> "The Direct3D Graphics Pipeline" free book <
> http://tinyurl.com/d3d-pipeline>
>      The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
>          The Terminals Wiki <http://terminals.classiccmp.org>
>   Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160210/ce9beae3/attachment-0001.html>


More information about the cfe-commits mailing list