[PATCH] D32298: [clang-format] Replace IncompleteFormat by a struct with Line

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 21 06:38:58 PDT 2017


krasimir added inline comments.


================
Comment at: include/clang/Format/Format.h:1524
+  /// best-effort analysis, and could be imprecise.
+  unsigned Line = 0;
+};
----------------
djasper wrote:
> Hm. Something we might need to be thinking about here is whether this should be the line before or after formatting. So specifically, if I format:
> 
>   int a
>       = 1;
>   f(
> 
> Then, this gets reformatted to:
> 
>   int a = 1;
>   f(
> 
> Would we want the Line to be 2 or 3?
I'd go with the original line, because I think it might be more useful and because it's easier to implement.


https://reviews.llvm.org/D32298





More information about the cfe-commits mailing list