[PATCH] D96612: [clangd] Improve printing of Objective-C categories and methods

2021-02-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm not an objc guy, but can you add a test case demonstrating class(?) methods showing as `+name:`? Comment at: clang-tools-extra/clangd/AST.cpp:224-226 + if (const ObjCContainerDecl *C = dyn_cast(&ND)) +return printObjCContainer(*C); + if (con

[PATCH] D96607: [clang-tidy] Add check 'readability-pointer-type-star-placement'.

2021-02-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I don't see the use case you suggest as a strong enough motivation for this, clang-format does this job very well and we shouldn't be reinventing the wheel here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96607/new/ h

[PATCH] D96508: [clangd] Retire clang-tidy-checks flag.

2021-02-13 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG022920c25b8e: [clangd] Retire clang-tidy-checks flag. (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D96508?vs=323011&id=323553#toc Repository: rG LLVM Github Monorepo CHA

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-15 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The check currently erroneously flags typedefs in extern "C" blo

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-15 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 323796. njames93 added a comment. Newline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96725/new/ https://reviews.llvm.org/D96725 Files: clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp clang-to

[PATCH] D96725: [clang-tidy] Fix modernize-use-using in extern C code

2021-02-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp:305 }; + +extern "C" { steveire wrote: > Can you add tests for typedefs in other scopes like > > ``` > > extern "C" { > typedef int CType; > > stru

[PATCH] D96138: [clang-tidy] Simplify delete null ptr check

2021-02-15 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96138/new/ https://reviews.llvm.org/D96138 _

[PATCH] D96222: [clang-tidy] Simplify redundant smartptr get check

2021-02-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp:21-45 + return expr( + anyOf(cxxMemberCallExpr( + on(expr(anyOf(hasType(OnClass), + hasType(q

[PATCH] D96142: [clang-tidy] Simplify too-small loop variable check

2021-02-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D96142#2547418 , @steveire wrote: > In D96142#2545078 , @njames93 wrote: > >> I'm not sure about this. The warning is good and addresses a real problem. > > Well, I've made the diagnosti

[PATCH] D96665: Revert "Implement nullPointerConstant() using a better API."

2021-02-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm a little confused here, Typically if a commit is breaking bots a review doesn't need to be opened to revert it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96665/new/ https://reviews.llvm.org/D96665 ___

[PATCH] D96760: [clang-format] Suppress diagnostics on second parse

2021-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I did have another plan for a different way to go about this, not sure if its really any better though. It involved building a vector of the edits the config would apply to its parent. Then after the parent is parsed just applying those edits. It results in only 1 pass

[PATCH] D96760: [clang-format] Suppress diagnostics on second parse

2021-02-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D96760#2569151 , @HazardyKnusperkeks wrote: > In D96760#2565171 , @njames93 wrote: > >> I did have another plan for a different way to go about this, not sure if >> its really any bett

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-02-18 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: rsmith, sammccall, kbobyrev. Herald added subscribers: usaxena95, kadircet. njames93 requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added a project: clang. Adds fix-its when users forget to e

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-02-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 324741. njames93 added a comment. Remove default capture by value fixit if 'this' is explicitly captured pre c++20. Fix default capture insertion loc to be at the start of the capture list. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-02-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 324823. njames93 added a comment. Fix tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96975/new/ https://reviews.llvm.org/D96975 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-02-18 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:1229-1235 +static void buildLambdaThisCaptureFixit(Sema &Sema, LambdaScopeInfo *LSI) { + SourceLocation DiagLoc = LSI->IntroducerRange.getEnd(); + assert(!LSI->isCXXThisCaptured()); + Sema.Diag(DiagLoc,

[PATCH] D96719: [clang-tidy] Add new check 'bugprone-thread-canceltype-asynchronous' and alias 'cert-pos47-c'.

2021-02-19 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Before landing this, can you update the title of this to reflect its in the concurrency module, the title is typically used for the commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96719/new/ https://reviews.

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-02-19 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 324981. njames93 added a comment. Restrict availability of default capture fixit based on init captures already specified. `[=, A]() {}` and `[&, &A]() {}` are both invalid as explicit captures can't be specified with the same type as default capture. So w

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-02-19 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7459-7460 "capture-default specified">; + def note_lambda_variable_capture_fixit : Note< +"capture variable %0 by %select{value|reference}1">; + def note_lambda_default_capture

[PATCH] D90568: [clang] Add [is|set]Nested methods to NamespaceDecl

2021-02-19 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90568/new/ https://reviews.llvm.org/D90568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D89065: [clang] Tweaked fixit for static assert with no message

2021-02-19 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89065/new/ https://reviews.llvm.org/D89065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D97109: [clangd] Add support for auxiliary triple specification

2021-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Please upload diffs with full context. This can be done by passing `-U99` to diff or by using arcanist to upload your patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D96132: [clang-tidy] Simplify throw keyword missing check

2021-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-throw-keyword-missing.cpp:97-107 +template +void templ(int i) { + if (i > 0) +SomeType(); +} + void funcCallWithTempExcTest() { Can I ask what the reason for t

[PATCH] D96131: [clang-tidy] Simplify function complexity check

2021-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:505 + functionDecl(isDefinition(), unless(isWeak())).bind("func"), this); + Finder->addMatcher(lambdaExpr().bind("lambda"), this); }

[PATCH] D96131: [clang-tidy] Simplify function complexity check

2021-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Can you have a look at the failed tests, they seem to be related. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96131/new/ https://reviews.llvm.org/D96131 ___ cfe-commits mailin

[PATCH] D96224: [clang-itdy] Simplify virtual near-miss check

2021-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. What happens when TBase is an explicit specialization. In that situation a warning for the explicit specialization may be useful. template <> struct TBase { virtual void tfunt(T t); }; Comment at: clang-tools-extra/test/clang-tidy/checkers/b

[PATCH] D97123: [clangd] Support FixIts that use InsertFromRange instead of inserting raw text

2021-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Currently clangd will ignore FixIt

[PATCH] D96224: [clang-itdy] Simplify virtual near-miss check

2021-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. Fair enough, LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96224/new/ https://reviews.llvm.org/D96224 ___

[PATCH] D97132: [clang-tidy] Harden PreferMemberInitializerCheck

2021-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, baloghadamsoftware, gribozavr2. Herald added subscribers: rnkovacs, kbarton, xazax.hun, nemanjai. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Prev

[PATCH] D96286: [clangd] Change TidyProvider cache to use a linked list approach

2021-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325266. njames93 added a comment. Update using absoluteParent helper Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96286/new/ https://reviews.llvm.org/D96286 Files: clang-tools-extra/clangd/TidyProvider.cpp

[PATCH] D96286: [clangd] Change TidyProvider cache to use a linked list approach

2021-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Ping @sammccall Any issues with this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96286/new/ https://reviews.llvm.org/D96286 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D93800: [clangd] Add caching behaviour for clang-format config

2021-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325267. njames93 added a comment. Update to support inheriting configurations from D93844 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93800/new/ https://reviews.llvm.org/D9

[PATCH] D71199: [clang-tidy] New check cppcoreguidelines-prefer-member-initializer

2021-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Herald added a subscriber: shchenz. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.cpp:184 +bool AddComma = false; +if (!Ctor->getNumCtorInitializers() && FirstToCtorInits) { + Sour

[PATCH] D89065: [clang] Tweaked fixit for static assert with no message

2021-02-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/lib/Parse/ParseDeclCXX.cpp:874 /// [C++0x] static_assert-declaration: /// static_assert ( constant-expression , string-literal ) ; /// aaron.ballman wrote: > xbolva00 wrote: > > Do we warn for: > >

[PATCH] D89065: [clang] Tweaked fixit for static assert with no message

2021-02-21 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325284. njames93 added a comment. Add tests for fixits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89065/new/ https://reviews.llvm.org/D89065 Files: clang/lib/Parse/ParseDeclCXX.cpp clang/test/FixIt/fi

[PATCH] D97121: [clang-tidy] Add a single fix mode to clang-tidy

2021-02-21 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, steveire. Herald added subscribers: usaxena95, kadircet, arphaman, kbarton, xazax.hun, nemanjai. njames93 updated this revision to Diff 325234. njames93 added a comment. njames93 updated this revision to Diff 325238. njames93

[PATCH] D89065: [clang] Tweaked fixit for static assert with no message

2021-02-21 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325287. njames93 added a comment. Add recompile test to ensure fix-its are correct Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89065/new/ https://reviews.llvm.org/D89065 Files: clang/lib/Parse/ParseDeclCX

[PATCH] D97142: [clang-tidy] Simplify unused RAII check

2021-02-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-unused-raii.cpp:49-53 +struct CtorDefaultArg { + CtorDefaultArg(int i = 0); + ~CtorDefaultArg(); +}; + Its not obvious from the code, but this should work if there

[PATCH] D97158: [ASTMatchers] Make nullPointerConstant usable at top-level

2021-02-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Won't this change require a regeneration of the documentation `clang/docs/tools/dump_ast_matchers.py` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97158/new/ https://reviews.llvm.org/D97158 _

[PATCH] D97156: [ASTMatchers] Make Param functors variadic

2021-02-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added a reviewer: klimek. njames93 requested changes to this revision. njames93 added a comment. This revision now requires changes to proceed. This change is going to break the dump_ast_matchers script. So that will need updating to ensure everything is all correct. Repository: rG L

[PATCH] D97150: [clang-tidy] Simplify suspicious memset usage check

2021-02-21 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousMemsetUsageCheck.cpp:39 - unless( - eachOf(hasArgument(0, anyOf(hasType(pointsTo(is

[PATCH] D61989: [clang-tidy] enable modernize-concat-nested-namespaces on header files

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D61989#2578687 , @DmitryPolukhin wrote: > Everyone please speak up if there is a good reason to limit this check to the > main file only. The only possible reason I can see to limit to main file only is if the header is inc

[PATCH] D97132: [clang-tidy] Harden PreferMemberInitializerCheck

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325428. njames93 added a comment. Fix potential crash if macros are used, Now we just don't try to emit a fix. Fix issue where FixIt for member initializers would be inserted at the start of the constructor decl due to implicit member initializers confusing

[PATCH] D97191: [clang][NFC] Reorder CXXCtorInitializer members

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: rsmith, aaron.ballman. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Swapping the order of Init and MemberOrEllipsisLocation removes 8 bytes (20%) of padding on 64bit bui

[PATCH] D97191: [clang][NFC] Reorder CXXCtorInitializer members

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdaeb70be0bd4: [clang][NFC] Reorder CXXCtorInitializer members (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97191/new/ https://revie

[PATCH] D89065: [clang] Tweaked fixit for static assert with no message

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang/test/FixIt/fixit-static-assert.cpp:2-3 +// RUN: %clang_cc1 -std=c++14 %s -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// Ensure no warnings are emitted in c++17. +// RUN: %clan

[PATCH] D89065: [clang] Tweaked fixit for static assert with no message

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325452. njames93 marked an inline comment as done. njames93 added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89065/new/ https://reviews.llvm.org/D89065 Files: clang/lib/Parse/

[PATCH] D97132: [clang-tidy] Harden PreferMemberInitializerCheck

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D97132#2578992 , @aaron.ballman wrote: >> Fix potential crash if macros are used, Now we just don't try to emit a fix. > > Can you add a test case that covers this change? I can try, but I'm not sure of the exact cause of it.

[PATCH] D97123: [clangd] Support FixIts that use InsertFromRange instead of inserting raw text

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/Diagnostics.cpp:695 + if (Insert.empty() && FixIt.InsertFromRange.isValid()) { +bool InvalidInsert = false; +Insert = Lexer::getSourceText(FixIt.InsertFromRange, SM, *LangOpts, -

[PATCH] D89065: [clang] Tweaked fixit for static assert with no message

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5616c5b8664b: [clang] Tweaked fixit for static assert with no message (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D8

[PATCH] D97132: [clang-tidy] Harden PreferMemberInitializerCheck

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325482. njames93 added a comment. Add a test for the crash fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97132/new/ https://reviews.llvm.org/D97132 Files: clang-tools-extra/clang-tidy/cppcoreguideline

[PATCH] D97132: [clang-tidy] Harden PreferMemberInitializerCheck

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325484. njames93 marked 2 inline comments as done. njames93 added a comment. Address `auto` comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97132/new/ https://reviews.llvm.org/D97132 Files: clang-t

[PATCH] D97123: [clangd] Support FixIts that use InsertFromRange instead of inserting raw text

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325515. njames93 added a comment. Sort of added tests. Though they seem hacked in and I can't find a simple way to test the synthetic diagnostic messages. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97123/ne

[PATCH] D97132: [clang-tidy] Harden PreferMemberInitializerCheck

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa2e15fa532f3: [clang-tidy] Harden PreferMemberInitializerCheck (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97132/new/ https://revi

[PATCH] D90972: [clang-tidy] Install run-clang-tidy.py in bin/ as run-clang-tidy

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D90972#2446448 , @Flow wrote: > In D90972#2394516 , @JonasToth wrote: > >> LGTM! thanks for fixing. > > I am unable to commit this myself. The latest version of this change >

[PATCH] D97121: [clang-tidy] Add a single fix mode to clang-tidy

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp:81 +if (InsertedHeaders[FileID].contains(Header)) + return llvm::None; + } else if (!InsertedHeaders[FileID].insert(Header).second) steveire wrote: > The

[PATCH] D97121: [clang-tidy] Add a single fix mode to clang-tidy

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325608. njames93 marked 2 inline comments as done. njames93 added a comment. Add test cases to clangd showing the improved behaviour of fix-its. Rebased. Update some comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D97121: [clang-tidy] Add a single fix mode to clang-tidy

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325622. njames93 added a comment. Add include insertion test for clangd showing it attaching the include for multiple warnings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97121/new/ https://reviews.llvm.or

[PATCH] D97243: [clang-tidy] Remove IncludeInserter from MoveConstructorInit check.

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This check registers an IncludeInserter, however the check itsel

[PATCH] D97243: [clang-tidy] Remove IncludeInserter from MoveConstructorInit check.

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325626. njames93 added a comment. Remove unnessary headers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97243/new/ https://reviews.llvm.org/D97243 Files: clang-tools-extra/clang-tidy/performance/MoveConst

[PATCH] D97246: [ASTMatchers] Fix matching failure in IgnoreUnlessSpelledInSource mode

2021-02-22 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, steveire, aaron.ballman. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For the hasAnyCtorInitializer matcher, the matcher finds the first innermatch that is succe

[PATCH] D90972: [clang-tidy] Install run-clang-tidy.py in bin/ as run-clang-tidy

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG6c78711f106f: [clang-tidy] Install run-clang-tidy.py in bin/ as run-clang-tidy (authored by Flow, committed by njames93).

[PATCH] D97275: [clang-tidy] Add cppcoreguidelines-prefer-member-initializer to ReleaseNotes

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, baloghadamsoftware. Herald added subscribers: shchenz, rnkovacs, xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Following a discussion abo

[PATCH] D96224: [clang-itdy] Simplify virtual near-miss check

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Can you take a look at https://llvm.org/PR49330, I'm guessing this patch introduced this regression. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96224/new/ https://reviews.llvm.org/D96224 __

[PATCH] D97243: [clang-tidy] Remove IncludeInserter from MoveConstructorInit check.

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe96f9cca3b1b: [clang-tidy] Remove IncludeInserter from MoveConstructorInit check. (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D97243?vs=325626&id=325757#toc Repository:

[PATCH] D97246: [ASTMatchers] Fix matching failure in IgnoreUnlessSpelledInSource mode

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3296 BoundNodesTreeBuilder Result(*Builder); - auto MatchIt = matchesFirstInPointerRange(InnerMatcher, Node.method_begin(), -

[PATCH] D97246: [ASTMatchers] Fix matching failure in IgnoreUnlessSpelledInSource mode

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325776. njames93 marked an inline comment as done. njames93 added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97246/new/ https://reviews.llvm.org/D97246 Files: clang/include/c

[PATCH] D97196: [clang-tidy] Add new check 'bugprone-unhandled-exception-at-new'.

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnhandledExceptionAtNewCheck.cpp:23-24 +const CXXCatchStmt *CatchS = Node.getHandler(I); +if (InnerMatcher.matches(CatchS->getCaughtType(), Finder, Builder)) + return true; +// Gen

[PATCH] D97123: [clangd] Support FixIts that use InsertFromRange instead of inserting raw text

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 325826. njames93 added a comment. Update tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97123/new/ https://reviews.llvm.org/D97123 Files: clang-tools-extra/clangd/Diagnostics.cpp clang-tools-extra/c

[PATCH] D97275: [clang-tidy] Add cppcoreguidelines-prefer-member-initializer to ReleaseNotes

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2af5275f72da: [clang-tidy] Add cppcoreguidelines-prefer-member-initializer to ReleaseNotes (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D97123: [clangd] Support FixIts that use InsertFromRange instead of inserting raw text

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.cpp:555 +auto Insert = Lexer::getSourceText(FixIt.InsertFromRange, M, L, &Invalid); +if (!Invalid) + Result.newText = Insert.str();

[PATCH] D97313: [clang-tidy] Tweak misc-static-assert fix in c++17

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If C++17 mode is enabled and the assert doesn't have a string li

[PATCH] D97313: [clang-tidy] Tweak misc-static-assert fix in c++17

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/misc-static-assert.cpp:40-41 assert(myfunc(1, 2)); - // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: found assert() that could be replaced by static_assert() [misc-static-assert] - // CHECK-

[PATCH] D97322: [clang-tidy][test] Allow specifying potentially unused suffixes

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If a check-suffix is only required for a CHECK-FIXES or CHECK-ME

[PATCH] D96209: [clang-tidy] Fix readability-avoid-const-params-in-decls removing const in template paramaters

2021-02-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96209/new/ https://reviews.llvm.org/D96209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D97322: [clang-tidy][test] Allow specifying potentially unused suffixes

2021-02-24 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb90fdb7c117f: [clang-tidy][test] Allow specifying potentially unused suffixes (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97322/new

[PATCH] D96209: [clang-tidy] Fix readability-avoid-const-params-in-decls removing const in template paramaters

2021-02-24 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa34532c330f6: [clang-tidy] Fix readability-avoid-const-params-in-decls removing const in… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D97361: [clang-tidy] Add misc-redundant-using check

2021-02-24 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/RedundantUsingCheck.cpp:23 + Finder->addMatcher( + usingDecl(isExpansionInMainFile()).bind("using-declaration"), this); + Finder->addMatcher( Why restrict these to main file only

[PATCH] D97400: [clang][NFC] Remove unnecessary string copies in CustomDiagInfo

2021-02-24 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: rsmith, aaron.ballman. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Lookup the map using a string ref and store indexed diag info using a StringRef to the map. It may be

[PATCH] D97415: [clang-tidy] Move Checkname out of Diagnostic Message

2021-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman. Herald added subscribers: usaxena95, kadircet, arphaman, xazax.hun. njames93 published this revision for review. njames93 added a subscriber: NoQ. njames93 added a comment. Herald added a project: clang. Herald added a

[PATCH] D97361: [clang-tidy] Add readability-redundant-using check

2021-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Can you override the `isLanguageVersionSupported` method to ensure this check only runs over c++ code. Can you add some macro tests, typically we err on the side of caution and don't emit any fixes for macro code. You can use `SourceLocation::IsMacroID()` to detect mac

[PATCH] D97415: [clang-tidy] Move Checkname out of Diagnostic Message

2021-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 326418. njames93 marked an inline comment as done. njames93 added a comment. Typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97415/new/ https://reviews.llvm.org/D97415 Files: clang-tools-extra/clang-tid

[PATCH] D97488: [clang-tidy][NFC] Tweak some generation of diag messages

2021-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added a reviewer: aaron.ballman. Herald added subscribers: kbarton, xazax.hun, nemanjai. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix up cases where diag is called by piecing together

[PATCH] D97491: [clang-tidy] Deprecate readability-deleted-default check

2021-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. ... For removal in next release cycle. The clang warning that do

[PATCH] D97488: [clang-tidy][NFC] Tweak some generation of diag messages

2021-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 326540. njames93 added a comment. Fix up portability-simd-intrinsics diagnostic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97488/new/ https://reviews.llvm.org/D97488 Files: clang-tools-extra/clang-tidy/

[PATCH] D97491: [clang-tidy] Deprecate readability-deleted-default check

2021-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D97491#2588835 , @Eugene.Zelenko wrote: > If `Wdefaulted-function-deleted` was introduced in 12.0, I think it's safe > just to remove `readability-deleted-default`. Wdefaulted-function-deleted was introduced in 8.0 and I thi

[PATCH] D97544: [clang-tidy] Remove some test c++ mode restrictions.

2021-02-26 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added subscribers: kbarton, xazax.hun, nemanjai. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Some comments are redundant, others just simpl

[PATCH] D97553: [clang][NFC] pack StaticDiagInfoRec

2021-02-26 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: rsmith, aaron.ballman. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Exchanging types, reordering fields and borrowing a bit from OptionGroupIndex shrinks this from 12 by

[PATCH] D97563: [clang-tidy] Enable modernize-concat-nested-namespaces also on headers

2021-02-26 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/Inputs/modernize-concat-nested-namespaces/modernize-concat-nested-namespaces.h:7 +} // namespace nn1 +// CHECK-FIXES: } This fix line isn't actually contributing to the test.

[PATCH] D97563: [clang-tidy] Enable modernize-concat-nested-namespaces also on headers

2021-02-26 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-concat-nested-namespaces.cpp:4 +// RUN: FileCheck -input-file=%T/modernize-concat-nested-namespaces.h %S/Inputs/modernize-concat-nested-namespaces/modernize-concat-nested-namespaces

[PATCH] D97544: [clang-tidy] Remove some test c++ mode restrictions.

2021-02-26 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb18f14d6897b: [clang-tidy] Remove some test c++ mode restrictions. (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97544/new/ https://

[PATCH] D97488: [clang-tidy][NFC] Tweak some generation of diag messages

2021-02-26 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1a721b6a2634: [clang-tidy][NFC] Tweak some generation of diag messages (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97488/new/ http

[PATCH] D84924: [clang-tidy] Added command line option `fix-notes`

2021-02-26 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 326779. njames93 marked 6 inline comments as done. njames93 added a comment. Rebased and address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84924/new/ https://reviews.llvm.org/D84924 Files: clan

[PATCH] D84924: [clang-tidy] Added command line option `fix-notes`

2021-02-27 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp:186 - // Emit a fix and a fix description of the check; - diag(Context.FoundUsingDecl->getLocation(), - /*Description=*/"remove the using", DiagnosticIDs::N

[PATCH] D97614: [clang-tidy] Remove OptionError

2021-02-27 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The interface served a purpose, but since the ability to emit di

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-27 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Mostly mechanical changes requested here. In D93164#2456247 , @steveire wrote: > @thakis FYI - I think the GN build would need to be adapted to this. FWIW the GN build has a bot that can typically update its gn files. ===

[PATCH] D93164: [AST] Add generator for source location introspection

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Another point, is there any use case of this outside of clang-query. If not would it not be wise to move this infrastructure to clang-tools-extra/clang-query? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ http

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, gribozavr2. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Adds an option, `PreferResetCall`, currently default

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 326972. njames93 added a comment. Clean up some fix-it logic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97630/new/ https://reviews.llvm.org/D97630 Files: clang-tools-extra/clang-tidy/readability/Uniquept

[PATCH] D97632: [clang-tidy] Simplify diagnostics for UniqueptrResetRelease check

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, gribozavr2. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Tweak the diagnostics to create small replacements r

<    7   8   9   10   11   12   13   14   15   16   >