[PATCH] D33440: clang-format: better handle statement macros

2019-01-28 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. @Typz I think this should be part of the release notes for v8. This is changing the output on some code base and this is a new feature. By the way, an example in the doc would be great (including with the configuration) merci! Repository: rL LLVM CHANGES

[PATCH] D33440: clang-format: better handle statement macros

2018-10-02 Thread Francois Ferrand via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343602: clang-format: better handle statement macros (authored by Typz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D33440: clang-format: better handle statement macros

2018-07-31 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 158308. Typz marked an inline comment as done. Typz added a comment. Herald added a subscriber: acoomans. Regenerate documentation Repository: rC Clang https://reviews.llvm.org/D33440 Files: docs/ClangFormatStyleOptions.rst

[PATCH] D33440: clang-format: better handle statement macros

2018-05-17 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 147293. Typz marked an inline comment as done. Typz added a comment. Address review comments Repository: rC Clang https://reviews.llvm.org/D33440 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/FormatToken.h

[PATCH] D33440: clang-format: better handle statement macros

2018-05-17 Thread Francois Ferrand via Phabricator via cfe-commits
Typz marked an inline comment as done. Typz added inline comments. Comment at: lib/Format/Format.cpp:647-648 LLVMStyle.SortUsingDeclarations = true; + LLVMStyle.StatementMacros.push_back("Q_UNUSED"); + LLVMStyle.StatementMacros.push_back("QT_REQUIRE_VERSION");

[PATCH] D33440: clang-format: better handle statement macros

2018-05-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. There are still outstanding comments. Repository: rC Clang https://reviews.llvm.org/D33440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33440: clang-format: better handle statement macros

2018-05-16 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 147024. Typz added a comment. Herald added a subscriber: mgrang. Rebase on latest master Repository: rC Clang https://reviews.llvm.org/D33440 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/FormatToken.h

[PATCH] D33440: clang-format: better handle statement macros

2018-03-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: lib/Format/Format.cpp:647-648 LLVMStyle.SortUsingDeclarations = true; + LLVMStyle.StatementMacros.push_back("Q_UNUSED"); + LLVMStyle.StatementMacros.push_back("QT_REQUIRE_VERSION"); What's the reason to have these

[PATCH] D33440: clang-format: better handle statement macros

2018-02-05 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 132837. Typz added a comment. Use StatementMacro detection to improve brace type detection heuristics (in UnwrappedLineParser::calculateBraceTypes). https://reviews.llvm.org/D33440 Files: include/clang/Format/Format.h lib/Format/Format.cpp

[PATCH] D33440: clang-format: better handle statement macros

2017-12-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? https://reviews.llvm.org/D33440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33440: clang-format: better handle statement macros

2017-11-20 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? https://reviews.llvm.org/D33440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33440: clang-format: better handle statement macros

2017-11-09 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 18. Typz marked 5 inline comments as done. Typz added a comment. Address review comments https://reviews.llvm.org/D33440 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/FormatToken.h lib/Format/FormatTokenLexer.cpp

[PATCH] D33440: clang-format: better handle statement macros

2017-11-09 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D33440#920205, @djasper wrote: > Out of curiosity, will this be able to fix the two situations that you get > for python extension? > There, you usually have a PyObject_HEAD with out semicolon in a struct and > than a PyObject_HEAD_INIT(..) in

[PATCH] D33440: clang-format: better handle statement macros

2017-11-09 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Out of curiosity, will this be able to fix the two situations that you get for python extension? There, you usually have a PyObject_HEAD with out semicolon in a struct and than a PyObject_HEAD_INIT(..) in a braced init list. More info:

[PATCH] D33440: clang-format: better handle statement macros

2017-11-09 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. ping? https://reviews.llvm.org/D33440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33440: clang-format: better handle statement macros

2017-10-24 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 120084. Typz added a comment. rebase https://reviews.llvm.org/D33440 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/FormatToken.h lib/Format/FormatTokenLexer.cpp lib/Format/FormatTokenLexer.h

[PATCH] D33440: clang-format: better handle statement macros

2017-09-19 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 115801. Typz marked 5 inline comments as done. Typz added a comment. Add tests. Replace sorted list with hashtable. https://reviews.llvm.org/D33440 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/FormatToken.h

[PATCH] D33440: clang-format: better handle statement macros

2017-09-19 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added inline comments. Comment at: lib/Format/FormatTokenLexer.cpp:642 tok::pp_define) && -std::find(ForEachMacros.begin(), ForEachMacros.end(), - FormatTok->Tok.getIdentifierInfo()) != ForEachMacros.end()) { - FormatTok->Type =

[PATCH] D33440: clang-format: better handle statement macros

2017-09-14 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/FormatTokenLexer.cpp:642 tok::pp_define) && -std::find(ForEachMacros.begin(), ForEachMacros.end(), - FormatTok->Tok.getIdentifierInfo()) != ForEachMacros.end()) { - FormatTok->Type

[PATCH] D33440: clang-format: better handle statement macros

2017-09-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: unittests/Format/FormatTest.cpp:2407 + "int b = 0;", + Style); } Please add tests where: - the macro occurs inside a function body, thus having nontrivial indentation - there are two macros