[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I'm kind of with @owenpan on this one, I don't hate the feature, but I think it goes against the sprit of "clang-format", we are only the custodians here (for now), I don't want to break too much the ethos of the original authors which I think was to help end

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-19 Thread bers via Phabricator via cfe-commits
bersbersbers added a comment. That remaining failing unit test (`Flang.Driver::code-gen-rv64.f90`) appears to be independent of my diff, as it appears in other pipelines as well, compare

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-19 Thread bers via Phabricator via cfe-commits
bersbersbers updated this revision to Diff 506357. bersbersbers added a comment. Fix unit tests, add unit tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145435/new/ https://reviews.llvm.org/D145435 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-18 Thread bers via Phabricator via cfe-commits
bersbersbers updated this revision to Diff 506336. bersbersbers added a comment. Rebased patch against main branch (previous patch was against 15.0.7 tag) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145435/new/ https://reviews.llvm.org/D145435 Files:

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-15 Thread bers via Phabricator via cfe-commits
bersbersbers updated this revision to Diff 505615. bersbersbers added a comment. Made comment extraction more strict, made sure special comments not affected by formatting, added unit tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145435/new/ https://reviews.llvm.org/D145435

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-15 Thread bers via Phabricator via cfe-commits
bersbersbers marked an inline comment as done. bersbersbers added a comment. > The disadvantage is that it forces everyone else who needs to review or > maintain the file to deal with a style that's different from that of the > directory. "different", yes, but as explained, not necessarily

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-13 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D145435#4187575 , @bersbersbers wrote: > In D145435#4179662 , @owenpan wrote: > >> Are the settings above hypothetical or are they real-world use cases? > > Real-world - actually, all

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-12 Thread bers via Phabricator via cfe-commits
bersbersbers added a comment. In D145435#4179662 , @owenpan wrote: > Are the settings above hypothetical or are they real-world use cases? Real-world - actually, all of them. > IMO, if people really want to have per-file configurations, they can do so

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-09 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D145435#4181215 , @HazardyKnusperkeks wrote: > Although I don't think I will use that feature, I still think it might be > useful and doesn't really hurt anyone. It would add extra runtime (especially for large files). We

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-09 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D145435#4179662 , @owenpan wrote: > In D145435#4179308 , @bersbersbers > wrote: > >> In D145435#4173875 , @owenpan >> wrote: >>

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-08 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D145435#4179308 , @bersbersbers wrote: > In D145435#4173875 , @owenpan wrote: > >> Please refer to D125171#4167866 >> to make the case that

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-08 Thread bers via Phabricator via cfe-commits
bersbersbers added a comment. All, thanks for considering my patch! I'll answer all messages here, and will work on the patch over the weekend most probably. In D145435#4173875 , @owenpan wrote: > Please refer to D125171#4167866

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-07 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D145435#4176109 , @HazardyKnusperkeks wrote: > I think this would be a great feature. I don't understand why anyone wants to do this. If I'm accustomed to a different style, I'd temporarily change the config file in the

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-07 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/Format.cpp:3542 + +// Prefix found, and at start of file or preceded by white space? +if (PrefixPos != StringRef::npos && I understand the reasoning, but the check down below I think

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-07 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. I think this would be a great feature. But I also think that it needs more documentation. You also need to make sure, that we don't change that comment, that is `SpacesInLineCommentPrefix` and `ColumnLimit` should have no effect on the comment.

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. This is going to need unit tests A full context diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145435/new/ https://reviews.llvm.org/D145435 ___ cfe-commits mailing

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-06 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. Please refer to D125171#4167866 to make the case that such a feature should be added. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145435/new/ https://reviews.llvm.org/D145435

[PATCH] D145435: Choose style (file) from within code for use in IDEs

2023-03-06 Thread bers via Phabricator via cfe-commits
bersbersbers created this revision. bersbersbers added a reviewer: owenpan. bersbersbers created this object with visibility "All Users". bersbersbers added a project: clang-format. Herald added a project: All. bersbersbers requested review of this revision. Herald added a project: clang. Herald