<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 8/23/2018 12:53 PM, Marcus Johnson
      via cfe-dev wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFWGNQWBJv2-gmEgm12M3snAAt6aLHBYi8RpVmMjJngHg-VCWg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div class="gmail_default" style="font-size:large">I was looking
          over the code for Clang's format specifier checking (Primarily
          the FormatStringHandler class) and I noticed that the issue is
          that everything is built on standard C strings.<br>
        </div>
        <div class="gmail_default" style="font-size:large"><br>
        </div>
        <div class="gmail_default" style="font-size:large">Does
          Clang/LLVM even have a string class that supports Unicode (at
          least UTF-16, and hopefully UTF-32)?</div>
      </div>
    </blockquote>
    <br>
    Not specifically.  You can use ArrayRef/SmallVector to store
    "strings" if necessary.  And include/llvm/Support/ConvertUTF.h has
    conversions.<br>
    <br>
    <blockquote type="cite"
cite="mid:CAFWGNQWBJv2-gmEgm12M3snAAt6aLHBYi8RpVmMjJngHg-VCWg@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_default" style="font-size:large">In order to
          support wprintf, we'd have to support UTF-16 in the API, which
          would amount to a massive patch set for pretty much
          everything.</div>
      </div>
    </blockquote>
    <br>
    I don't follow; can't you just convert the format string from
    UTF-16/UTF-32 to UTF-8 before checking it?  (Granted, that's not
    particularly efficient, but it's rare enough that it probably
    doesn't matter.)<br>
    <br>
    -Eli<br>
    <pre class="moz-signature" cols="72">-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
  </body>
</html>