From 04203a26757d26814a18c3251d1a97f6ded64a62 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Fri, 11 Sep 2020 22:05:12 +0200 Subject: Replace remaining uses of sal_Char + remove sal_Char check on compilerplugins Change-Id: I0f7da14e620f0c3d031d038aa8345ba4080fb3e9 Change-Id: Ia6dba4f27b47bc9e0c89159182ad80a5aee17166 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102499 Tested-by: Jenkins Reviewed-by: Noel Grandin --- compilerplugins/clang/store/rtlconstasciimacro.cxx | 2 +- compilerplugins/clang/store/valueof.cxx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/store/rtlconstasciimacro.cxx b/compilerplugins/clang/store/rtlconstasciimacro.cxx index 66e202ce266f..c930fbfd1c32 100644 --- a/compilerplugins/clang/store/rtlconstasciimacro.cxx +++ b/compilerplugins/clang/store/rtlconstasciimacro.cxx @@ -63,7 +63,7 @@ void RtlConstAsciiMacro::MacroExpands( const Token& macro, const MacroDirective* } /* Remove use with the following ctor: - OUString( const sal_Char * value, sal_Int32 length, + OUString( const char * value, sal_Int32 length, rtl_TextEncoding encoding, sal_uInt32 convertFlags = OSTRING_TO_OUSTRING_CVTFLAGS ) This means searching for CXXConstructExpr. diff --git a/compilerplugins/clang/store/valueof.cxx b/compilerplugins/clang/store/valueof.cxx index 2b769a3e8cac..808e0c158c92 100644 --- a/compilerplugins/clang/store/valueof.cxx +++ b/compilerplugins/clang/store/valueof.cxx @@ -67,8 +67,6 @@ bool ConvertValueOf::VisitCallExpr( const CallExpr* call ) string arg0 = func->getParamDecl( 0 )->getType().getAsString(); if( arg0 == "sal_Bool" ) replaceText( call->getCallee()->getSourceRange(), "OString::boolean" ); - else if( arg0 == "sal_Char" ) - replaceText( call->getCallee()->getSourceRange(), "OString" ); else { replaceText( call->getCallee()->getSourceRange(), "OString::number" ); @@ -116,7 +114,7 @@ void ConvertValueOf::removeCast( const Expr* arg ) if( cast->getType()->isIntegerType() && castFrom->getType()->isIntegerType()) { string fromType = castFrom->getType().getAsString(); - if( fromType != "sal_Bool" && fromType != "bool" && fromType != "sal_Char" && fromType != "sal_Unicode" ) + if( fromType != "sal_Bool" && fromType != "bool" && fromType != "sal_Unicode" ) { if( const CXXFunctionalCastExpr* funcCast = dyn_cast< CXXFunctionalCastExpr >( cast )) { -- cgit