[PATCH] D27142: [clang-tidy] Make format style customizable

2016-11-30 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a subscriber: cfe-commits. malcolm.parsons added a comment. Always subscribe cfe-commits. Repository: rL LLVM https://reviews.llvm.org/D27142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D27248: [clang-tidy] Do not trigger unnecessary-value-param check on methods marked as final

2016-11-30 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: test/clang-tidy/performance-unnecessary-value-param.cpp:276 +// Virtual method overrides of dependent types cannot be recognized unless they +// are marked as override or final. Test that check is not triggered on methods +// mar

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-11-30 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. I don't know why you're restricting this check to only match within the condition of an if statement. https://reviews.llvm.org/D27210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-12-01 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:58 "modernize-use-bool-literals"); -CheckFactories.registerCheck("modernize-use-default"); + CheckFactories.registerCheck("modernize-use-equals-default"); CheckFa

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-12-01 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 79918. malcolm.parsons added a comment. Herald added a subscriber: JDevlieghere. Add documentation redirect. Change add_new_check.py to ignore checks that are orphaned. https://reviews.llvm.org/D26511 Files: clang-tidy/add_new_check.py clang-tid

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-12-01 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 79919. malcolm.parsons added a comment. Re-remove doubled space in modernize-use-equals-default.rst. https://reviews.llvm.org/D26511 Files: clang-tidy/add_new_check.py clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModul

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-01 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/clang-tidy/checks/misc-string-compare.rst:21 + + if(str1.compare(str2)) {} // use str1 != str2 instead + Please clang-format this code. Comment at: test/clang-tidy/misc-string-compare

[PATCH] D26453: [clang-tidy] Remove duplicated check from move-constructor-init

2016-12-01 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D26453#592934, @flx wrote: > In https://reviews.llvm.org/D26453#590720, @malcolm.parsons wrote: > > > Add ValuesOnly option to modernize-pass-by-value. > > > Thanks for doing this. Alex, would this work for us? ping. https://reviews

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-12-01 Thread Malcolm Parsons via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288375: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26511?vs=79919&id=79928#toc Repositor

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-01 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. ping. https://reviews.llvm.org/D26750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-02 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/misc/StringCompareCheck.cpp:25 + callee(cxxMethodDecl(hasName("compare"), + ofClass(classTemplateSpecializationDecl( + hasName("::std::basic_string"), --

[PATCH] D27248: [clang-tidy] Do not trigger unnecessary-value-param check on methods marked as final

2016-12-02 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: test/clang-tidy/performance-unnecessary-value-param.cpp:276 +// Virtual method overrides of dependent types cannot be recognized unless they +// are marked as override or final. Test that check is not triggered on methods +// mar

[PATCH] D27447: [ASTMatcher] Add hasReplacementType matcher for SubstTemplateTypeParmType

2016-12-06 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: klimek, sbenza, bkramer. malcolm.parsons added a subscriber: cfe-commits. Herald added subscribers: rengolin, aemerson. Needed for https://reviews.llvm.org/D27166 https://reviews.llvm.org/D27447 Files: docs/LibASTMatchers

[PATCH] D27447: [ASTMatcher] Add hasReplacementType matcher for SubstTemplateTypeParmType

2016-12-06 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 80465. malcolm.parsons added a comment. Use AST_TYPE_TRAVERSE_MATCHER. https://reviews.llvm.org/D27447 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.cpp unittests/ASTMatcher

[PATCH] D23130: [Clang-tidy] Add a check for definitions in the global namespace.

2016-12-07 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/google/GoogleTidyModule.cpp:68 +CheckFactories.registerCheck( +"google-global-names"); CheckFactories.registerCheck( bkramer wrote: > aaron.ballman wrote: > > Given that this was shipp

[PATCH] D27520: [clang-tidy] Add check for redundant function pointer dereferences

2016-12-07 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: alexfh, aaron.ballman, hokein. malcolm.parsons added a subscriber: cfe-commits. Herald added subscribers: JDevlieghere, mgorny. See https://youtu.be/6eX9gPithBo https://reviews.llvm.org/D27520 Files: clang-tidy/readabilit

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-07 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. ping. https://reviews.llvm.org/D27166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26742: [RecursiveASTVisitor] Fix post-order traversal of UnaryOperator

2016-12-07 Thread Malcolm Parsons via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288923: [RecursiveASTVisitor] Fix post-order traversal of UnaryOperator (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26742?vs=78165&id=80621#toc Repository: rL LL

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-07 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 80623. malcolm.parsons added a comment. Remove hasReplacementType matcher. https://reviews.llvm.org/D27166 Files: clang-tidy/modernize/UseAutoCheck.cpp docs/ReleaseNotes.rst docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tidy/moder

[PATCH] D27520: [clang-tidy] Add check for redundant function pointer dereferences

2016-12-07 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 80642. malcolm.parsons added a comment. Add to release notes. Remove youtube link. https://reviews.llvm.org/D27520 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/RedundantFu

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-08 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 80734. malcolm.parsons added a comment. Herald added a subscriber: JDevlieghere. Handle unary operators. https://reviews.llvm.org/D26750 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/moderni

[PATCH] D27447: [ASTMatcher] Add hasReplacementType matcher for SubstTemplateTypeParmType

2016-12-08 Thread Malcolm Parsons via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289042: [ASTMatcher] Add hasReplacementType matcher for SubstTemplateTypeParmType (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D27447?vs=80465&id=80741#toc Repositor

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-08 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D26750#617316, @Eugene.Zelenko wrote: > How does check handle bit fields? There is no warning for bit fields. I don't think the C++17 bit field initializer proposal has been accepted yet. > Will be also good idea to add test case for

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-08 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D27166#617621, @Prazek wrote:. > Does it work for cases like? Yes; `replaceExpr()` checks that the variable has the same unqualified type as the initializer and the same canonical type as other variables in the declaration. https:

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-09 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 80869. malcolm.parsons added a comment. Use hasUnaryOperand. https://reviews.llvm.org/D26750 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseDefaultMemberInitCheck.cpp clang-tid

[PATCH] D26768: [analyzer] Improve VirtualCallChecker diagnostics and move to optin package.

2016-12-11 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D26768#618651, @dcoughlin wrote: > The definite false positives were cases where the programmer seemed aware of > the semantics of virtual calls during construction/destruction and had each > subclass explicitly call its own version o

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-11 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/misc/StringCompareCheck.cpp:25 + callee(cxxMethodDecl(hasName("compare"), + ofClass(classTemplateSpecializationDecl( + hasName("::std::basic_string"), --

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-11 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:48 + // Single declarations and macros will be ignored + if (DeclStmt->isSingleDecl() || DeclStmt->getLocStart().isMacroID()) +return; Can you reject si

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-12 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. The fixit construction looks overly complicated. All you need to do is change a `,` to a `;` and insert a copy of the type: << FixItHint::CreateReplacement(CommaRange, ";") << FixItHint::CreateInsertionFromRange(VarLocation, TypeRange) and insert some whitesp

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-12 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/misc/StringCompareCheck.cpp:25 + callee(cxxMethodDecl(hasName("compare"), + ofClass(classTemplateSpecializationDecl( + hasName("::std::basic_string"), --

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-12 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:86 + + Diag << FixItHint::CreateReplacement(CommaRange, ";") + << FixItHint::CreateReplacement(AfterCommaToVarNameRange, A `SourceLocation` can

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:154 + if (const auto *MemberPointerT = Type->getAs()) { +auto Pos = UserWrittenType.find("::"); +if (Pos != std::string::npos) { // might be hidden behind typedef etc

[PATCH] D27520: [clang-tidy] Add check for redundant function pointer dereferences

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289524: [clang-tidy] Add check for redundant function pointer dereferences (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D27520?vs=80642&id=81190#toc Repository: rL

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/cppcoreguidelines/NoMallocCheck.cpp:29 + Finder->addMatcher( + callExpr(callee(functionDecl(hasAnyName("::malloc", "::calloc" + .bind("aquisition"), C memory management functions are

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-no-malloc.rst:10 +See `C++ Core Guidelines +` + JonasToth wrote: > malc

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons accepted this revision. malcolm.parsons added a comment. LGTM. Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27284: [ClangTidy] Add new performance-type-promotion-in-math-fn check.

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D27284#609937, @Eugene.Zelenko wrote: > Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). This has not been done. https://reviews.llvm.org/D27284 ___ cfe-commi

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons planned changes to this revision. malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseDefaultMemberInitCheck.cpp:21 + +static StringRef getValueInit(const CXXCtorInitializer *Init) { + switch (Init->getInit()->getType()->getScalarTypeKind()

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/clang-tidy/checks/misc-string-compare.rst:12 +zero depending on the lexicographical relationship between the strings compared. +If an equality or inequality check can suffice, that is recommended. + alexfh

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. Do the fixits work when the object is a pointer to a string? `pstr1->compare(str2) == 0` Does the warning work when the argument is a pointer to a string? `str1.compare(*pstr2) == 0` Does the warning work when the argument is the result of a function call? Does the

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:173-177 +/// Matches the type that was substituted for the template parameter. +AST_MATCHER_P(SubstTemplateTypeParmType, hasReplacementType, + ast_matchers::internal::Matcher, In

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 81300. malcolm.parsons added a comment. Split up matcher. Add tests. Improve doc. https://reviews.llvm.org/D27166 Files: clang-tidy/modernize/UseAutoCheck.cpp docs/ReleaseNotes.rst docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tid

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-default-member-init.rst:29 + +.. note:: + Only converts member initializers for built-in types, enums and pointers. alexfh wrote: > Is an empty line needed after this? modern

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 81310. malcolm.parsons added a comment. Rename function. Use isInstantiated(). Reduce variable scope. https://reviews.llvm.org/D26750 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. I tried this check on my company's codebase. It misses cases where malloc is used through a function pointer. Should clang-tidy warn about making a function pointer to these functions? Repository: rL LLVM https://reviews.llvm.org/D26167

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D27166#622072, @Prazek wrote: > Have you run this check on LLVM & Clang to check if it works? I ran it on some of clang-tools-extra: unittests/clang-tidy/ClangTidyDiagnosticConsumerTest.cpp:17 -const VarDecl *Var = Result.Nod

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 81375. malcolm.parsons added a comment. Ignore implicit VarDecls https://reviews.llvm.org/D27166 Files: clang-tidy/modernize/UseAutoCheck.cpp docs/ReleaseNotes.rst docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tidy/modernize-use-a

[PATCH] D26453: [clang-tidy] Remove duplicated check from move-constructor-init

2016-12-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D26453#610668, @malcolm.parsons wrote: > In https://reviews.llvm.org/D26453#592934, @flx wrote: > > > In https://reviews.llvm.org/D26453#590720, @malcolm.parsons wrote: > > > > > Add ValuesOnly option to modernize-pass-by-value. > > > >

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D27166#622103, @Prazek wrote: > There is still one more problem: > > /home/prazek/llvm/lib/Analysis/ScalarEvolution.cpp:2442:11: warning: use > auto when initializing with a template cast to avoid duplicating the type > name [modern

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 81377. malcolm.parsons added a comment. Use qualType(hasDescendant(autoType())) to fix skipping of declarations that are already using auto. https://reviews.llvm.org/D27166 Files: clang-tidy/modernize/UseAutoCheck.cpp docs/ReleaseNotes.rst doc

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-14 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D27166#622127, @Prazek wrote: > In https://reviews.llvm.org/D27166#622108, @malcolm.parsons wrote: > > > In https://reviews.llvm.org/D27166#622103, @Prazek wrote: > > > > > There is also problem with function pointers > > > > > > The wa

[PATCH] D24892: [clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init

2017-04-20 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D24892#732217, @alexfh wrote: > In https://reviews.llvm.org/D24892#723536, @malcolm.parsons wrote: > > > Is there any way for multiple checks to share an option? > > > There's OptionsView::getLocalOrGlobal. See how StrictMode option is

[PATCH] D32439: Fix for incorrect source position of dependent c'tor initializer (bug:26195)

2017-04-25 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. Is it possible to add a test for this change? There are some source range checks in test/Misc/ast-dump-decl.cpp https://reviews.llvm.org/D32439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D32439: Fix for incorrect source position of dependent c'tor initializer (bug:26195)

2017-04-25 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D32439#736631, @Serge_Preis wrote: > What do you think? Seems reasonable. https://reviews.llvm.org/D32439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D32700: [clang-tidy] Add misc-suspicious-memset-usage check.

2017-05-02 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. > The destination is a this pointer within a class that has a virtual function. > It might reset the virtual pointer. Can you change this to match any pointer to a class with a virtual function? I'd also like a warning for a pointer to a class with a constructor

[PATCH] D32810: Add cxxStdInitializerListExpr AST matcher

2017-05-03 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. Please run `docs/tools/dump_ast_matchers.py` to update the docs. Repository: rL LLVM https://reviews.llvm.org/D32810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D32945: clang-tidy: add IgnoreMacros option to modernize-use-default-member-init

2017-05-06 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a subscriber: cfe-commits. malcolm.parsons added a comment. Should this option be shared? https://reviews.llvm.org/D32945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D32945: clang-tidy: add IgnoreMacros option to modernize-use-default-member-init

2017-05-07 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D32945#748166, @vmiklos wrote: > In https://reviews.llvm.org/D32945#748135, @malcolm.parsons wrote: > > > Should this option be shared? > > > If the alternative is to make this a general clang-tidy option where all but > these two chec

[PATCH] D32914: Introduce Wzero-as-null-pointer-constant.

2017-05-08 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. Have you looked at the tests for clang-tidy's modernize-use-nullptr check? I wouldn't expect to see a warning for template types: template class TemplateClass { public: explicit TemplateClass(int a, T default_value = 0) {} }; void IgnoreSubstTempla

[PATCH] D32945: clang-tidy: add IgnoreMacros option to modernize-use-default-member-init

2017-05-08 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D32945#748250, @vmiklos wrote: > The updated patch uses `getLocalOrGlobal()` for the new option. Please change modernize-use-using to match. https://reviews.llvm.org/D32945 ___ cfe-comm

[PATCH] D32945: clang-tidy: add IgnoreMacros option to modernize-use-default-member-init

2017-05-08 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons accepted this revision. malcolm.parsons added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D32945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-15 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a subscriber: cfe-commits. malcolm.parsons added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:92 + const auto VectorAppendCall = expr( + anyOf(VectorAppendCallExpr, exprWithCleanups(has(VectorAppendCallExpr))

[PATCH] D114995: clang-tidy: improve the 'modernize-use-default-member-init'

2021-12-09 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In D114995#3180475 , @aaron.ballman wrote: > was there a reason we didn't cover that case originally or was it an > oversight/left for future work? It was left for future work - by only considering the initializer list

<    1   2   3