<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJylVF1vmzAU_TXOi1VEgaTJAw9pmmh52NSt0V4rY9-AO4OZr2mbf79rk2xTmlaTJllg389zjw9UVh1KzmbpcaV3LF16aHsjPHCWr_yhh060kCQJ3yHL12OI7ozugK-ds45LBxT94J3u6mhh2Ry9YvmSFgTDo7SKolcsW3HZCEqxHXrOsuWm9dEYzzsk0yy0-i4Mjp3OsElhDAbAe-ta4YOd0l8aLRtuO3PgOPS9dR756gr9wQAfAzlGeBR8rDM4Cq6ckMAvxHGNvLP-VA3U2yyKQE1EHbjuPLjeAYVxgZy40x338OqPE8TnhoiCV0EJcHGwAUPbQDX2obwxzy3Lb0fn8uFh_W33uP5KzHr7cBxlfol43RGXz-C8rgxE44q4JwfLFoEqlmXs5jZlN3dhR4br6Ii-c-fiN4AzsONz1wTWjLEvAfpeE4mtxgEBuSfX8n4bJBBDt_xpoAsmvIojEDxhYgImfMuVVpFs2YD8wemCRxcVofugchcE9heKM2jGqIplG7SDkzT25pNFUthG2ra1HW2-CK-f4d5ZCYj08lZak8i-_2DQ0ww41DXQGN5GWILmqeE1HBGEIwWShiL-AUUN3O4vfRpHAYpOHQfW-0jXG_2NXKp3IQhFcutOoiIVcmVfDzV0vLEvJ4xvAPAX7ZtjsyDYsd9Elbla5AsxEYNvrCsbaIT9qUU3IcmXjfc9hsvMNrRqqjBUCVFKh6jT8XXVO_sEMtCtEQdA2kzzfFFMmhIKmebpHmB6M8-L2UwWaSHkbK7mRaqqopoYUYHBkk1v2fRu8v8tdZmlWZZeZ9O0yLPrRaJmUhRpfj0T04WazQtWpNAKbZJQJ7GunrgylqyGGslpNHr84xSIuu4ATgi99gbKLX1tzhGAD6_8n_-GfPN59-7vMFtM4oxlHPAXRXXUTA>53394</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Incorrect usage of createStringError(std::error_code EC, char const * FMT, const Ts &... Vals)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          hehaoqian
      </td>
    </tr>
</table>

<pre>
     ```
template <typename... Ts>
inline Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals
```
calls `format`, which only supports C-style format string,
curly brace style format string is not supported
curly brace is simply interpreted as plain text

For example
```
using namespace llvm;
ASSERT_EQ(toString(createStringError(inconvertibleErrorCode(), "{0}", 1)),  "{0}");
```

The following file misuses the API:
I just read several files. I did not check all files that use createStringError

```
lldb/source/Host/common/NativeProcessProtocol.cpp
```


I suggest to use a regex to search for all usage of createStringError,
and check if the format string is misused

I suggest to add an example in doxygen how to use createStringError with formatted string
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNU11vmzAU_TXmxSriI0nDAw9pGrQ8bNrWaK-VwTfgzmDma5rk3-9ikm1K02qSBfb9PPf4uDTylHO2iM4remTRykHba-GAs3TtTj10ooUwDPkOWbqZQlSnVQd8Y62xvLJA0U_Oqq72FpYs0UmWrmjBaHiujKToNUvWvGoEpZgOHWfJqmidN_rzDsm0GFv9EBqnTlfYKqE1joD3xrbCjXZKPzSqarjp9Inj0PfGOuTrO3QnDXwK5OjhUfC5zmApuLSiAn4jjivknXGXaiDfZlEEKiLqxFXnwPYWKIwL5MSd6riDoztP4L8FEQVHQQlwc7ABx7Yj1diP5bV-bVn6MDlXT0-b77vnzTdi1pmn8yjLW8Srjrh8BetUqcEb18Q9OViSjVSxJGH3DxG7fxx3ZIi9w_uundkfAFdgp--uGVnT2hxG6HtFJLYKBwTkjlyrr9tRAj50y18GumDCKzkCwRPaJ2DIt1wq6cmuGqh-crrgyUVF6D6o3A2B_YPiCprWsmRJgWawFY1dfDJICisq07amo80X4dQrfLWmAkT6OVMZHVZ9_8GglxlwqGugMZzxsATNU8NxPCIISwokDXn8A4oauNnfehpnAYpOngdWe0_XG_1NXMp3IQhJcusuoiIVcmmOpxo63pjDBeMbAPygXHNuNgp26hfIPJVZmonAKach35KKrIXKfTjKf79yXnzevfvMkyygZ5U3zvU4VksKWjWhHMqQro0O_i1Mv7vemhfCRUeFOAClF_M0zWZBk1cLkUA5KyMhFmVUxtE-BZD7eQzLMo7LZaBFCRpzNn9g88dA5UmUJFGczKNZmsRZKBeVmEVpvBDzTC6WMzaLoBVKh2Pj0Ng6sLnHUA41klMrdPjXKRBV3QFc6ovBNcbmDTTC_FKiCzzg3KP9Dby8v6o">