[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-08 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL353535: [clang-tidy] Add options to bugprone-argument-comment to add missing argument… (authored by paulhoad, committed by ). Herald added a project: LLVM. Changed prior to commit: https://reviews.llvm

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 185947. MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added a comment. Pre-Commit Changes - add FIXME wording to test - move local header include after libraries - rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57674/n

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a testing nit. Comment at: clang-tidy/bugprone/ArgumentCommentCheck.cpp:231 +bool ArgumentCommentCheck::shouldAddComment(const Expr *Arg) const

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-06 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 3 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang-tidy/bugprone/ArgumentCommentCheck.cpp:1 -//===--- ArgumentCommentCheck.cpp - clang-tidy ===// // aaron.ballman wrote: > Why did

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-06 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 185632. MyDeveloperDay marked 5 inline comments as done. MyDeveloperDay added a comment. -Address review comments -Ignore argument comment addition for macro inputs -Add unit tests to cover the above -Fix clang-tidy suggestion (from readability-identifi

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/bugprone/ArgumentCommentCheck.cpp:228-236 +static bool isStringLiteral(const Expr *Arg) { + const auto *Cast = dyn_cast(Arg); + return Cast ? isa(Cast->getSubExpr()) : false; +} + +static bool isNullPtrLiteral(const Ex

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang-tidy/bugprone/ArgumentCommentCheck.cpp:257 Ctx->getLangOpts()); }; @aaron.ballman, slight aside (and not in the code

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 185385. MyDeveloperDay marked 6 inline comments as done. MyDeveloperDay added a comment. Address review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57674/new/ https://reviews.llvm.org/D57674 Files: clang-tidy/bugprone/ArgumentCo

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang-tidy/bugprone/ArgumentCommentCheck.cpp:228-236 +static bool isStringLiteral(const Expr *Arg) { + const auto *Cast = dyn_cast(Arg); + return Cast ? isa(Cast->getSubExpr()) : false; +} + +static bool isNullPtrLiteral(const E

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/bugprone/ArgumentCommentCheck.cpp:228-236 +static bool isStringLiteral(const Expr *Arg) { + const auto *Cast = dyn_cast(Arg); + return Cast ? isa(Cast->getSubExpr()) : false; +} + +static bool isNullPtrLiteral(const Ex

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 185148. MyDeveloperDay edited the summary of this revision. MyDeveloperDay added a comment. Address review comments Add support for additional StringLiterals,CharacterLiterals,UserDefinedLiterals and NullPtrs Simplify the Options names from "AddCommen

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you drop the file mode changes that are in this review? Comment at: clang-tidy/bugprone/ArgumentCommentCheck.cpp:292-293 +// If the argument comments are missing for literals add them. +if (Comments.empty()) { + if (((isa(Args[I])

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:82 +- The :doc:`bugprone-argument-comment + ` now supports Please move changes in existing checks after list of new checks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57674/n

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 185014. MyDeveloperDay added a comment. Fix release note alphabetic order Add examples of Fixit into the documentation CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57674/new/ https://reviews.llvm.org/D57674 Files: clang-tidy/bugprone/Argu

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. An example of this checker run over clang-tidy/modernize is given here D57675: [clang-tidy] DO NOT SUBMIT.. example diff of applying bugprone-argument-comments with AddCommentsToXXXLiterals options Repository: rCTE Clang Tool

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: docs/ReleaseNotes.rst:89 +- The :doc:`bugprone-argument-comment + ` now supports note to self, I will reorganize this alphabetically, on next revision Reposit

[PATCH] D57674: [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

2019-02-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: JonasToth, alexfh, hokein, aaron.ballman, Eugene.Zelenko. MyDeveloperDay added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. Herald added a project: clang. bugprone-argument-comment only supports identifyi