compilerplugins/clang/derefnullptr.cxx |    2 +-
 vcl/source/outdev/textline.cxx         |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit ff209b1446c7923c9e8675611a392c9d280d1440
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Wed Jul 30 16:21:17 2014 +0200

    Avoid needless truncation to int
    
    Change-Id: Ibb9088e73e3e48952ce7f2f4ec42392f7633e8a7

diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 4e0add0..5cf5978 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -792,8 +792,8 @@ void OutputDevice::ImplDrawTextLines( SalLayout& 
rSalLayout, FontStrikeout eStri
     else
     {
         Point aStartPt = rSalLayout.GetDrawPosition();
-        int nWidth = rSalLayout.GetTextWidth() / rSalLayout.GetUnitsPerPixel();
-        ImplDrawTextLine( aStartPt.X(), aStartPt.Y(), 0, nWidth,
+        ImplDrawTextLine( aStartPt.X(), aStartPt.Y(), 0,
+                          rSalLayout.GetTextWidth() / 
rSalLayout.GetUnitsPerPixel(),
                           eStrikeout, eUnderline, eOverline, bUnderlineAbove );
     }
 }
commit 222c94f5a40a8bb4134b31ed6dbfb5e3913197a6
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Wed Jul 30 16:17:54 2014 +0200

    Adapt loplugin:derefnullptr to old Clang versions
    
    ...where prior to r183883 "Implement core issue 903: only integer literals 
with
    value 0 and prvalues of type std::nullptr_t are null pointer constants from
    C++11 onwards," Expr::isNullPointerConstant with NPC_NeverValueDependent 
could
    go into an llvm_unreachable case.
    
    Change-Id: I29cf093f18ece4cd83fd759e30f72c2a71f69554

diff --git a/compilerplugins/clang/derefnullptr.cxx 
b/compilerplugins/clang/derefnullptr.cxx
index 5663e4f..83fa5c4 100644
--- a/compilerplugins/clang/derefnullptr.cxx
+++ b/compilerplugins/clang/derefnullptr.cxx
@@ -26,7 +26,7 @@ public:
 bool DerefNullPtr::VisitUnaryDeref(UnaryOperator const * op) {
     if (!ignoreLocation(op)
         && (op->getSubExpr()->IgnoreParenCasts()->isNullPointerConstant(
-                compiler.getASTContext(), 
Expr::NPC_NeverValueDependent/*TODO*/)
+                compiler.getASTContext(), 
Expr::NPC_ValueDependentIsNotNull/*TODO*/)
             != Expr::NPCK_NotNull))
     {
         report(
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to