[PATCH] D65919: Add llvm-prefer-register-over-unsigned to clang-tidy and apply it to LLVM

2019-08-08 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders created this revision. dsanders added reviewers: arsenm, bogner. Herald added subscribers: cfe-commits, s.egerton, Jim, asbirlea, Petar.Avramovic, jsji, jocewei, PkmX, tpr, the_o, brucehoult, MartinMosbeck, rogfer01, atanasyan, edward-jones, zzheng, MaskRay, jrtc27, niosHD, sabuasal, ap

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-08 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders added a comment. In D65919#1621477 , @Eugene.Zelenko wrote: > I think patch should be split at least on Clang-tidy check and results of its > run on LLVM code. Probably per-target patches is even better solution. I've split the LLVM changes ou

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-08 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders updated this revision to Diff 214194. dsanders marked 2 inline comments as done. dsanders added a comment. UsingDirectiveDecl -> auto ` -> `` Split LLVM changes into another patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65919/new/ ht

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-08 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders marked an inline comment as done. dsanders added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.cpp:53 + } + diag(UserVarDecl->getLocation(), "use '%0'", DiagnosticIDs::Note) + << Replacement aaron.

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-08 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders updated this revision to Diff 214276. dsanders added a comment. Changed diagnostic message and merged the fixit into the original diagnostic Made the variable names more distinct in the tests Added a test to cover `using namespace llvm` in the global namespace Slight correction to the ite

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-08 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders marked 4 inline comments as done. dsanders added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.cpp:48-51 +for (const auto *UsingDirective: Context->using_directives()) + if (UsingDirective->getNominatedNamespace(

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-09 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders updated this revision to Diff 214476. dsanders added a comment. - Give in on eliding the llvm:: for `using namespace llvm` inside a function They don't appear in the DeclContext and I've been unable to find a way to reasonably detect them Fortunately they don't occur in practice Repos

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-09 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders marked 3 inline comments as done. dsanders added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.cpp:48-51 +for (const auto *UsingDirective: Context->using_directives()) + if (UsingDirective->getNominatedNamespace(

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-12 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp:28-29 CheckFactories.registerCheck("llvm-include-order"); +CheckFactories.registerCheck( +"llvm-prefer-register-over-unsigned"); CheckFactories.registerCheck( --

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-12 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders updated this revision to Diff 214744. dsanders marked 9 inline comments as done. dsanders added a comment. - Correct alphabetical list in LLVMTidyModule.cpp and prevent add_new_check.py getting it wrong in future - Lookup Register class via ::llvm::Register instead of llvm::Register - Re

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-13 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders marked an inline comment as done. dsanders added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp:26 void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { +using readability::NamespaceCommentCheck; + --

[PATCH] D68252: [Stats] Add ALWAYS_ENABLED_STATISTIC enabled regardless of LLVM_ENABLE_STATS.

2019-10-01 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders accepted this revision. dsanders added a comment. This revision is now accepted and ready to land. LGTM Comment at: llvm/include/llvm/ADT/Statistic.h:47 -class Statistic { +class StatisticBase { public: Do we actually need the common base class? I'm

[PATCH] D84572: Allow .dSYM's to be directly placed in an alternate directory

2020-07-24 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders created this revision. dsanders added reviewers: beanz, bogner. Herald added a reviewer: JDevlieghere. Herald added subscribers: cfe-commits, dang. Herald added a project: clang. Once available in the relevant toolchains this will allow us to implement LLVM_EXTERNALIZE_DEBUGINFO_OUTPUT_DI

[PATCH] D84565: [Darwin] [Driver] Clang should invoke dsymutil for lto builds -g*

2020-07-24 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders added a comment. In D84565#2173615 , @JDevlieghere wrote: > When you don’t pass any specific options to the linker, it’s going to > generate a temporary `lto.o` file in `/tmp` and delete it after the link. > When `dsymutil` will try to read tha

[PATCH] D84565: [Darwin] [Driver] Clang should invoke dsymutil for lto builds -g*

2020-07-24 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders added a comment. In D84565#2173744 , @beanz wrote: > @JDevlieghere you are right, I'm missing the change to how clang determines > it needs to pass the linker the object file path. Update coming momentarily. Isn't that already based on isUsingL

[PATCH] D84565: [Darwin] [Driver] Clang should invoke dsymutil for lto builds -g*

2020-07-24 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders added a comment. In D84565#2173770 , @dsanders wrote: > In D84565#2173744 , @beanz wrote: > > > @JDevlieghere you are right, I'm missing the change to how clang determines > > it needs to pass the linker t

[PATCH] D84565: [Darwin] [Driver] Clang should invoke dsymutil for lto builds -g*

2020-07-24 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2037 +bool isGeneratingTemporaryObject = +ContainsCompileOrAssembleAction(Actions.back()) || LTOMode != LTOK_None; if ((enablesDebugInfo || willEmitRemarks(Args)) && beanz w

[PATCH] D84572: Allow .dSYM's to be directly placed in an alternate directory

2020-07-24 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders updated this revision to Diff 280653. dsanders added a comment. Attempt to fix the windows-specific failure by using posix-style path::append() That feels wrong but it's consistent with a test in the same file that already passes because the path manipulation is an extension append (bar/

[PATCH] D84572: Allow .dSYM's to be directly placed in an alternate directory

2020-07-27 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders marked an inline comment as done. dsanders added inline comments. Comment at: clang/include/clang/Driver/Options.td:693 def e : JoinedOrSeparate<["-"], "e">, Group; +def external_dsym_dir : JoinedOrSeparate<["-"], "external-dsym-dir">, + Flags<[DriverOption, RenderAsIn

[PATCH] D84572: Allow .dSYM's to be directly placed in an alternate directory

2020-07-28 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders updated this revision to Diff 281376. dsanders added a comment. Remove external- prefix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84572/new/ https://reviews.llvm.org/D84572 Files: clang/include/clang/Driver/Options.td clang/lib/Dr

[PATCH] D84572: Allow .dSYM's to be directly placed in an alternate directory

2020-08-03 Thread Daniel Sanders via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7209f83112db: Allow .dSYM's to be directly placed in an alternate directory (authored by dsanders). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84572/new/

[PATCH] D85213: Use --dsym-dir when compiling with a compiler that supports it

2020-08-04 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders created this revision. dsanders added reviewers: JDevlieghere, beanz, bogner. Herald added subscribers: cfe-commits, dang, mgorny. Herald added projects: clang, LLVM. dsanders requested review of this revision. As part of this, a couple tweaks to --dsym-dir have been made. It now starts w

[PATCH] D85247: [Darwin] [Driver] Clang should invoke dsymutil for multiarch builds

2020-08-04 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders created this revision. dsanders added reviewers: bogner, beanz, JDevlieghere. Herald added subscribers: cfe-commits, dexonsmith, aprantl. Herald added a project: clang. dsanders requested review of this revision. Herald added a subscriber: ormris. Much like with debug info with LTO, this

[PATCH] D79419: [clang/clang-tools-extra] Fix BZ44437 - add_new_check.py does not work with Python 3

2020-05-05 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders accepted this revision. dsanders 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/D79419/new/ https://reviews.llvm.org/D79419 ___

[PATCH] D66505: Make add_new_check.py's insertion of registerCheck<> more closely match the sort order

2019-08-20 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders created this revision. dsanders added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. Following on from review comments in D65919 about the ordering of the registerCheck<> calls. Ignore namespaces when fi

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-20 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders updated this revision to Diff 216290. dsanders marked 2 inline comments as done. dsanders added a comment. - registerCheck<> order Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65919/new/ https://reviews.llvm.org/D65919 Files: clang-too

[PATCH] D66505: Make add_new_check.py's insertion of registerCheck<> more closely match the sort order

2019-08-29 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders updated this revision to Diff 218010. dsanders added a comment. Sort on the check name string Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66505/new/ https://reviews.llvm.org/D66505 Files: clang-tools-extra/clang-tidy/add_new_check.py

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-29 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp:32-33 +"llvm-prefer-register-over-unsigned"); +CheckFactories.registerCheck( +"llvm-namespace-comment"); CheckFactories.registerCheck("llvm-twine-local"); ---

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-29 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders updated this revision to Diff 218015. dsanders marked 4 inline comments as done. dsanders added a comment. - Sort order again :-) - Avoid getQualifiedNameAsString() in favour of getName() and checking Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D66505: Make add_new_check.py's insertion of registerCheck<> match the sort order

2019-08-30 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders marked 4 inline comments as done. dsanders added a comment. In D66505#1652420 , @alexfh wrote: > Mostly LG, if you've verified that this works. A couple of comments below. I verified it using ./add_new_check.py llvm prefer-register-over-unsig

[PATCH] D66505: Make add_new_check.py's insertion of registerCheck<> match the sort order

2019-08-30 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders updated this revision to Diff 218137. dsanders marked an inline comment as done. dsanders added a comment. - Full stop at end of comment - last_line -> prev_line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66505/new/ https://reviews.llvm

[PATCH] D66505: Make add_new_check.py's insertion of registerCheck<> match the sort order

2019-08-30 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders added a comment. Missed one of the commands from my history that I used to verify it: ./add_new_check.py llvm i Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66505/new/ https://reviews.llvm.org/D66505 ___

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-30 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders added a comment. r370512 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65919/new/ https://reviews.llvm.org/D65919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[PATCH] D65919: [clang-tidy] Add llvm-prefer-register-over-unsigned check and apply it to LLVM

2019-08-30 Thread Daniel Sanders via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. dsanders marked an inline comment as done. Closed by commit rL370512: [clang-tidy] Add llvm-prefer-register-over-unsigned to clang-tidy (authored by dsanders, committed by ). Herald added a project: LLVM. Changed prior to c

[PATCH] D66505: Make add_new_check.py's insertion of registerCheck<> match the sort order

2019-08-30 Thread Daniel Sanders via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370527: Make add_new_check.py's insertion of registerCheck<> match the sort order (authored by dsanders, committed by ). Herald added a project: LLVM. Changed prior to commit: https://reviews.llvm.org/

[PATCH] D77103: Add a new -fglobal-isel option and make -fexperimental-isel an alias for it.

2020-03-31 Thread Daniel Sanders via Phabricator via cfe-commits
dsanders accepted this revision. dsanders 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/D77103/new/ https://reviews.llvm.org/D77103 ___