[cfe-dev] clang-format WebKit style breaks C++11 raw string literals

Reid Kleckner rnk at google.com
Thu Dec 18 11:42:48 PST 2014


Probably because WebKit style uses C++03 instead of C++11:

FormatStyle getWebKitStyle() {
  FormatStyle Style = getLLVMStyle();
...
  Style.Standard = FormatStyle::LS_Cpp03;
  return Style;
}

If WebKit is using C++11 then that should be updated.

On Wed, Dec 17, 2014 at 4:30 AM, İsmail Dönmez <ismail at donmez.ws> wrote:
>
> [~]> cat r.cpp
> static const char* progressCSS = R"(QProgressBar::chunk{
>                                  background-color: #3add36;
>                                  width: 1px;
>                                  }
>                                  QProgressBar{
>                                  border: 2px solid grey;
>                                  border-radius: 0px;
>                                  font: bold;
>                                  text-align: center;
>                                  })";
>
> [~]> clang-format -style=WebKit r.cpp
> static const char* progressCSS = R "(QProgressBar::chunk{
>     background - color : #3add36;
> width:
> 1px;
> }
> QProgressBar
> {
> border:
>     2px solid grey;
>     border - radius : 0px;
> font:
>     bold;
>     text - align : center;
> })";
>
> Seems to confuse cpp with css.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141218/401c41cc/attachment.html>


More information about the cfe-dev mailing list