================
Comment at: lib/Format/UnwrappedLineParser.cpp:1076
@@ +1075,3 @@
+  while (FormatTok->Tok.is(tok::kw_catch)) {
+    nextToken();
+    if (FormatTok->Tok.is(tok::l_paren))
----------------
Manuel Klimek wrote:
> Alexander Rojas wrote:
> > Manuel Klimek wrote:
> > > Same here. The problem is if anybody ever finds a real use case to put 
> > > anything in between (including macros) we might fail to parse the file...
> > I don't get what you mean here. If the token is not tok::kw_catch, it won't 
> > start the while and NeedsUnwrappedLine will be true. Is there any other 
> > case that needs consideration?
> Well, what do we do on this snippet:
>   ...
>   } catch (Type) ANNOTATION_MACRO(something else) {
>      ...
>   }
> As I said, I'm not sure exactly how to resolve this.
> 
> Daniel, do you have ideas here?
Maybe we should just consume everything until the next "{" (possibly 
recognizing a few error cases explicitly - e.g. ";" or "}").


http://llvm-reviews.chandlerc.com/D2555
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to