New clang warns about boolean checks for |this| pointer in RenderObject debug methods
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Sep 2014 16:04:25 +0000 (16:04 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Sep 2014 16:04:25 +0000 (16:04 +0000)
commitd84d74152e87456cb793a60290e0f1ac2d8e075f
tree160bd7e7602bdf5d8b0b0e0266b5a56821f11e9b
parent8148309c566b4f44bd16b678b2d01a3d81d58965
New clang warns about boolean checks for |this| pointer in RenderObject debug methods
<http://webkit.org/b/136599>

Reviewed by Zalan Bujtas.

Ignores the following static analyzer warnings:

    Source/WebCore/rendering/RenderObject.cpp:1465:10: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
        if (!this) {
            ~^~~~
    Source/WebCore/rendering/RenderObject.cpp:1584:10: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
        if (!this)
            ~^~~~

* rendering/RenderObject.cpp:
(WebCore::RenderObject::showRenderObject):
(WebCore::RenderObject::showRenderSubTreeAndMark):
Add "#pragma clang" preprocessor macros to ignore this warning
since the code is only compiled for Debug builds.  Also add a
pragma for the pragma so older clangs don't complain about an
unkonwn pragma.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderObject.cpp