[PATCH] D87244: [clang] Add fix-it for -Wreorder-ctor.

2021-03-06 Thread Jeroen Van Antwerpen via Phabricator via cfe-commits
Jeroen added inline comments. Comment at: clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp:171 + // code can't do this. + Bar(int x) : c(x), /*foo*/ a(2), b(3) {} // expected-warning {{field 'c' will be initialized after field 'a'}} + // CHECK-NOT:

[PATCH] D87244: [clang] Add fix-it for -Wreorder-ctor.

2020-09-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks, comments around some implementations. the only high level question i have is about the choice of location for fix-it (see the detailed comment inline) Comment at: clang/lib/Sema/SemaDeclCXX.cpp:5198 +static bool RangeContainsComments(Sema ,

[PATCH] D87244: [clang] Add fix-it for -Wreorder-ctor.

2020-09-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 290313. adamcz added a comment. Add a missing const Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87244/new/ https://reviews.llvm.org/D87244 Files: clang/lib/Sema/SemaDeclCXX.cpp

[PATCH] D87244: [clang] Add fix-it for -Wreorder-ctor.

2020-09-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz updated this revision to Diff 290312. adamcz added a comment. fixed comment typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87244/new/ https://reviews.llvm.org/D87244 Files: clang/lib/Sema/SemaDeclCXX.cpp

[PATCH] D87244: [clang] Add fix-it for -Wreorder-ctor.

2020-09-07 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added subscribers: cfe-commits, mgrang. Herald added a project: clang. adamcz requested review of this revision. This version is very limited. It does not work when comments are present anywhere in the initializer list, since we do not have a good way to