================
Comment at: lib/Format/TokenAnnotator.cpp:1543
@@ -1542,3 +1542,3 @@
     if (!Current->MustBreakBefore && InFunctionDecl &&
-        Current->is(TT_FunctionDeclarationName)) {
+        Current->isOneOf(tok::kw_operator, TT_FunctionDeclarationName)) {
       // FIXME: Line.Last points to other characters than tok::semi
----------------
poiru wrote:
> This will (incorrectly) turn code like:
> ```
> A& A::operator=(const A&) {
>   return *this;
> }
> ```
> into:
> ```
> A& A::
> operator=(const A&) {
>   return *this;
> }
> ```
Cool. I'll add tests and figure something out.

http://reviews.llvm.org/D10860

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to