[PATCH] D61508: [clang-tidy] misc-header-guard : a simple version of llvm-header-guard

2019-05-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D61508#1491570 , @JonasToth wrote: > Hi trixirt and thanks for the patch! > > I would rather like to generalize the llvm check to allow different styles > and then alias the general version with different configurations.

[PATCH] D61508: [clang-tidy] misc-header-guard : a simple version of llvm-header-guard

2019-05-06 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hi trixirt and thanks for the patch! I would rather like to generalize the llvm check to allow different styles and then alias the general version with different configurations. Introducing this code duplication does not sound like a good idea to me. The documentation

[PATCH] D61508: [clang-tidy] misc-header-guard : a simple version of llvm-header-guard

2019-05-04 Thread Tom Rix via Phabricator via cfe-commits
trixirt updated this revision to Diff 198146. trixirt edited the summary of this revision. trixirt added a comment. Addressed issue with returning early and using backtick in doc. Since misc-header-guard doc was a cut-n-paste of llvm-header-guard, that and other similar docs were changed. Repos

[PATCH] D61508: [clang-tidy] misc-header-guard : a simple version of llvm-header-guard

2019-05-03 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/misc/HeaderGuardCheck.cpp:21 + StringRef OldGuard) { + if (OldGuard.size()) { +return OldGuard; Please use early return. Comment a

[PATCH] D61508: [clang-tidy] misc-header-guard : a simple version of llvm-header-guard

2019-05-03 Thread Tom Rix via Phabricator via cfe-commits
trixirt created this revision. trixirt added reviewers: alexfh, bkramer. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. A general use, missing header guard finder and fixer. No style checks. If there is already a working header guard, it is used. If the h