[PATCH] D18457: [clang-tidy] Add a new checker to detect missing comma in initializer list.

Dominik Szabó via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 29 03:51:22 PDT 2016


szdominik added a comment.

Hi!

I'm working on the same (or almost the same) checker as you, so maybe you'll find helpful my code.
I think your approach (or heuristics) is better than mine, but there are other options in this problem.
e.g.

- more precise location (where exactly is the missing comma)
- FixItHint for that
- think about what if the explicit array size is given (see below in my test)

Please, ask me if you have any question about my checker.

F1716939: misc-wrong-string-array-initialization.cpp <http://reviews.llvm.org/F1716939> (test file)
F1716926: WrongStringArrayInitializationCheck.h <http://reviews.llvm.org/F1716926>
F1716927: WrongStringArrayInitializationCheck.cpp <http://reviews.llvm.org/F1716927>


http://reviews.llvm.org/D18457





More information about the cfe-commits mailing list