summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/salunicodeliteral.cxx
AgeCommit message (Collapse)Author
2017-11-07Clean away temporarily added using declarationsStephan Bergmann
Change-Id: I26734c13515394162d88351a1cbe2b20abdac865
2017-10-11Use unique class names for better FlameGraph resultsStephan Bergmann
...of measuring loplugin performance, when gathering data with perf and all plugins that used "Visitor" as class name were lumped together. (Cf. <https://whatofhow.wordpress.com/2016/06/28/plugin-flamed/>.) Change-Id: Ie482f443faced7469528da4772e735bc2eda596d Reviewed-on: https://gerrit.libreoffice.org/43324 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-02Improved loplugin:redundantcast static_cast handlingStephan Bergmann
Change-Id: I74e4ebda40f95661c5ae344132fcabbbf08ab0a4
2017-04-28loplugin:salunicodeliteralStephan Bergmann
For the c-char in the u'...' literal, the preceding commits consistently use: * a simple-escape-sequence if the original code already used one * \0 for U+0000 * the (\ escaped, for ' and \) source character matching U+0020..7E (even if it is not a basic source character) * a consistently four-digit hexadecimal-escape-sequence otherwise, \xNNNN For non-surrogate code points, the last case could probably also use \uNNNN universal-character-names. However, for one, it isn't quite clear to me whether conversion of such to members of the execution chacacter set in character literals (in translation phase 5) is implementation-specific. And for another, the current C++ standard references the dated (no pun intended) ISO/IEC 10646-1:1993 specification, rather than the current ISO/IEC 10646:2014, and requires that a universal-characrer-name designate a character with a specific "character short name in ISO/IEC 10646", but I do not find a specification of a "short name" in ISO/IEC 10646:2014 and don't have access to ISO/IEC 10646-1:1993, so am not sure whether that would e.g. cover noncharacters like U+FFFF. (The only exception is one occurrence of u'\x6C' in bestFitOpenSymbolToMSFont, filter/source/msfilter/util.cxx, where it is clear from the context that the value denotes neither a Unicode code point nor a UTF-16 code unit, but rather an index into the Wingdings font glyph table.) Change-Id: If36b94168428ba1e05977c370aceaa7e90131e90