[clang-tools-extra] r294760 - [clangd] Move isDone from the JSONOutput to ShutdownHandler.

2017-02-10 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Feb 10 11:25:38 2017 New Revision: 294760 URL: http://llvm.org/viewvc/llvm-project?rev=294760&view=rev Log: [clangd] Move isDone from the JSONOutput to ShutdownHandler. This is just as easy to check from main but prevents random code from shutting down the server. Modified:

[clang-tools-extra] r294747 - [clangd] Refactor stream output into a single thread-safe output object.

2017-02-10 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Feb 10 08:08:40 2017 New Revision: 294747 URL: http://llvm.org/viewvc/llvm-project?rev=294747&view=rev Log: [clangd] Refactor stream output into a single thread-safe output object. This abstracts away the passing of raw_ostreams everywhere, thread safety will be used soon.

[clang-tools-extra] r294314 - [clangd] Strip file:// from the URI when calling formatting.

2017-02-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 7 10:10:17 2017 New Revision: 294314 URL: http://llvm.org/viewvc/llvm-project?rev=294314&view=rev Log: [clangd] Strip file:// from the URI when calling formatting. It confuses FileManager on windows. Modified: clang-tools-extra/trunk/clangd/ProtocolHandlers.cpp Mo

[clang-tools-extra] r294312 - [clangd] Ignore comments in clangd input, so we can write tests without sed.

2017-02-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 7 09:37:17 2017 New Revision: 294312 URL: http://llvm.org/viewvc/llvm-project?rev=294312&view=rev Log: [clangd] Ignore comments in clangd input, so we can write tests without sed. Another attempt on making this work on windows. Modified: clang-tools-extra/trunk/cla

[clang-tools-extra] r294309 - [clangd] Fix subtle use after return.

2017-02-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 7 08:35:09 2017 New Revision: 294309 URL: http://llvm.org/viewvc/llvm-project?rev=294309&view=rev Log: [clangd] Fix subtle use after return. I didn't find this because my main development machine still happens to use libstdc++ with the broken C++11 ABI, which has a glob

[clang-tools-extra] r294297 - [clangd] Set stdin to binary to fix tests on windows.

2017-02-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 7 06:40:59 2017 New Revision: 294297 URL: http://llvm.org/viewvc/llvm-project?rev=294297&view=rev Log: [clangd] Set stdin to binary to fix tests on windows. Modified: clang-tools-extra/trunk/clangd/ClangDMain.cpp Modified: clang-tools-extra/trunk/clangd/ClangDMain.

[clang-tools-extra] r294294 - [clangd] Harden test against sed implementations that strip \r.

2017-02-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 7 05:49:03 2017 New Revision: 294294 URL: http://llvm.org/viewvc/llvm-project?rev=294294&view=rev Log: [clangd] Harden test against sed implementations that strip \r. Also clean up logging and don't print \0. Modified: clang-tools-extra/trunk/clangd/ClangDMain.cpp

[clang-tools-extra] r294292 - [clangd] Add missing include.

2017-02-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 7 04:47:40 2017 New Revision: 294292 URL: http://llvm.org/viewvc/llvm-project?rev=294292&view=rev Log: [clangd] Add missing include. Modified: clang-tools-extra/trunk/clangd/Protocol.h Modified: clang-tools-extra/trunk/clangd/Protocol.h URL: http://llvm.org/viewvc

[clang-tools-extra] r294291 - Add a prototype for clangd

2017-02-07 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 7 04:28:20 2017 New Revision: 294291 URL: http://llvm.org/viewvc/llvm-project?rev=294291&view=rev Log: Add a prototype for clangd clangd is a language server protocol implementation based on clang. It's supposed to provide editor integration while not suffering from the

r293523 - [AST] Give TemplateArgumentLoc a constexpr ctor.

2017-01-30 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Jan 30 12:32:46 2017 New Revision: 293523 URL: http://llvm.org/viewvc/llvm-project?rev=293523&view=rev Log: [AST] Give TemplateArgumentLoc a constexpr ctor. This removes the thread-safe static from clang::TemplateTemplateParmDecl::getDefaultArgument() const::None Modified:

r293518 - [ASTMatchers] Sprinkle some constexpr on the global matcher constructors.

2017-01-30 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Jan 30 12:20:00 2017 New Revision: 293518 URL: http://llvm.org/viewvc/llvm-project?rev=293518&view=rev Log: [ASTMatchers] Sprinkle some constexpr on the global matcher constructors. This dramatically reduces the size of the global constructors we emit for those variables in

r293488 - [AST] Make header standalone.

2017-01-30 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Jan 30 10:00:57 2017 New Revision: 293488 URL: http://llvm.org/viewvc/llvm-project?rev=293488&view=rev Log: [AST] Make header standalone. Most implementations get ptrdiff_t transitively, some don't. Explicitly include cstddef. Modified: cfe/trunk/include/clang/AST/ASTVe

r293485 - [IRGen] Make header standalone.

2017-01-30 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Jan 30 09:39:18 2017 New Revision: 293485 URL: http://llvm.org/viewvc/llvm-project?rev=293485&view=rev Log: [IRGen] Make header standalone. Modified: cfe/trunk/lib/CodeGen/ABIInfo.h Modified: cfe/trunk/lib/CodeGen/ABIInfo.h URL: http://llvm.org/viewvc/llvm-project/cfe/

r292927 - [Sema] Fix assumption about typo corrections containing no decl.

2017-01-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Jan 24 06:49:59 2017 New Revision: 292927 URL: http://llvm.org/viewvc/llvm-project?rev=292927&view=rev Log: [Sema] Fix assumption about typo corrections containing no decl. This can happen when the typo correction is coming from an external sema source. Test case will follow

[clang-tools-extra] r292405 - [include-fixer] Don't return a correction if the header insertion failed.

2017-01-18 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Jan 18 10:22:58 2017 New Revision: 292405 URL: http://llvm.org/viewvc/llvm-project?rev=292405&view=rev Log: [include-fixer] Don't return a correction if the header insertion failed. This is could happen in cases involving macros and we don't want to return an invalid fixit f

r292406 - [ASTUnit] Reset diag state when creating the ASTUnit.

2017-01-18 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Jan 18 10:25:48 2017 New Revision: 292406 URL: http://llvm.org/viewvc/llvm-project?rev=292406&view=rev Log: [ASTUnit] Reset diag state when creating the ASTUnit. A client could call this with a dirty diagnostic engine, don't crash. Modified: cfe/trunk/lib/Frontend/ASTUn

r292402 - [Basic] Remove source manager references from diag state points.

2017-01-18 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Jan 18 09:50:26 2017 New Revision: 292402 URL: http://llvm.org/viewvc/llvm-project?rev=292402&view=rev Log: [Basic] Remove source manager references from diag state points. This is just wasted space, we don't support state points from multiple source managers. Validate that

Re: [PATCH] D28548: Improve include fixer's ranking by taking the paths into account.

2017-01-17 Thread Benjamin Kramer via cfe-commits
If we add all state transitions it will only create noise. I will teach myself to always write "lg" into the text field when approving a change instead. On Tue, Jan 17, 2017 at 9:57 AM, Manuel Klimek via cfe-commits wrote: > It's by design. Do we want to change this? I always had the impression >

Re: [PATCH] D28548: Improve include fixer's ranking by taking the paths into account.

2017-01-16 Thread Benjamin Kramer via cfe-commits
I got an email where it says that I accepted the revision. Looks like phab didn't add cfe-commits to the list of recipients though :( On Mon, Jan 16, 2017 at 6:43 PM, David Blaikie wrote: > Looks like Ben signed off on this on Phab - but the email didn't go to the > list (making this look like co

Re: [clang-tools-extra] r291446 - [include-fixer] Load symbol index asynchronously.

2017-01-13 Thread Benjamin Kramer via cfe-commits
of tools/clang/tools/extra/include-fixer/plugin/CMakeLists.txt >> help? > > > That does seem to make it work. > > >> On Tue, Jan 10, 2017 at 8:31 PM, Bill Seurer >> wrote: >>> >>> On 01/09/2017 09:18 AM, Benjamin Kramer via cfe-commits wrote: >

[clang-tools-extra] r291892 - Fix the build of the include-fixer plugin for some shared cmake builds and MSVC.

2017-01-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Jan 13 04:14:07 2017 New Revision: 291892 URL: http://llvm.org/viewvc/llvm-project?rev=291892&view=rev Log: Fix the build of the include-fixer plugin for some shared cmake builds and MSVC. - The include fixer plugin does not directly depend on pthread, but can pick up pthrea

r291681 - Unbreak the clang-fuzzer build after r291184.

2017-01-11 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Jan 11 10:42:26 2017 New Revision: 291681 URL: http://llvm.org/viewvc/llvm-project?rev=291681&view=rev Log: Unbreak the clang-fuzzer build after r291184. Modified: cfe/trunk/tools/clang-fuzzer/ClangFuzzer.cpp Modified: cfe/trunk/tools/clang-fuzzer/ClangFuzzer.cpp URL:

Re: [clang-tools-extra] r291446 - [include-fixer] Load symbol index asynchronously.

2017-01-10 Thread Benjamin Kramer via cfe-commits
I didn't manage to reproduce this. Does adding ${PTHREAD_LIB} to LINK_LIBS of tools/clang/tools/extra/include-fixer/plugin/CMakeLists.txt help? On Tue, Jan 10, 2017 at 8:31 PM, Bill Seurer wrote: > On 01/09/2017 09:18 AM, Benjamin Kramer via cfe-commits wrote: >> >> Author:

[clang-tools-extra] r291446 - [include-fixer] Load symbol index asynchronously.

2017-01-09 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Jan 9 09:18:28 2017 New Revision: 291446 URL: http://llvm.org/viewvc/llvm-project?rev=291446&view=rev Log: [include-fixer] Load symbol index asynchronously. We don't actually need the index until parse time, so fetch it in the background and start parsing. By the time it is

Re: [PATCH] Use the correct ObjC EH personality

2017-01-08 Thread Benjamin Kramer via cfe-commits
Committed r291408. Thanks! On Sun, Jan 8, 2017 at 9:03 PM, Jonathan Schleifer via cfe-commits wrote: > Sorry, it seems the inline patch has been garbled. > > Trying as an attachment this time. > > > -- > Jonathan > > > ___ > cfe-commits mailing list > c

r291408 - Use the correct ObjC EH personality

2017-01-08 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Sun Jan 8 16:58:07 2017 New Revision: 291408 URL: http://llvm.org/viewvc/llvm-project?rev=291408&view=rev Log: Use the correct ObjC EH personality This fixes ObjC exceptions on Win64 (which uses SEH), among others. Patch by Jonathan Schleifer! Modified: cfe/trunk/lib/Code

r290135 - [Format] Remove dead code.

2016-12-19 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Dec 19 15:10:50 2016 New Revision: 290135 URL: http://llvm.org/viewvc/llvm-project?rev=290135&view=rev Log: [Format] Remove dead code. No functionality change. Modified: cfe/trunk/lib/Format/Encoding.h cfe/trunk/lib/Format/TokenAnalyzer.h cfe/trunk/lib/Format/Wh

[clang-tools-extra] r289952 - [include-fixer] Desugar incomplete types.

2016-12-16 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Dec 16 10:09:06 2016 New Revision: 289952 URL: http://llvm.org/viewvc/llvm-project?rev=289952&view=rev Log: [include-fixer] Desugar incomplete types. This will look through typedefs so include-fixer will look up the target of the typedef instead of the typedef itself (which

r289433 - Use function_ref to avoid allocation in std::function. NFC.

2016-12-12 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Dec 12 08:41:19 2016 New Revision: 289433 URL: http://llvm.org/viewvc/llvm-project?rev=289433&view=rev Log: Use function_ref to avoid allocation in std::function. NFC. Modified: cfe/trunk/include/clang/Sema/Sema.h cfe/trunk/lib/Sema/SemaChecking.cpp Modified: cfe/tr

Re: r288089 - Avoid lambdas in default member initializers to work around clang bug

2016-12-06 Thread Benjamin Kramer via cfe-commits
Leaving it as it is now is fine with me. On Tue, Dec 6, 2016 at 8:38 PM, Reid Kleckner wrote: > This can be reverted now that PR31197 is fixed. I kind of like the new code > better, so up to you, Benjamin. > > On Mon, Nov 28, 2016 at 3:58 PM, Reid Kleckner via cfe-commits > wrote: >> >> Author:

r288793 - Also recognize -std=iso9899:201x

2016-12-06 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Dec 6 04:23:07 2016 New Revision: 288793 URL: http://llvm.org/viewvc/llvm-project?rev=288793&view=rev Log: Also recognize -std=iso9899:201x It should already be handled but a typo in the LANGSTANDARD() definition was introduced in r147220. Patch by Alexander Richardson, te

r288664 - Clean out unused diagnostics. NFC.

2016-12-05 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Dec 5 05:30:24 2016 New Revision: 288664 URL: http://llvm.org/viewvc/llvm-project?rev=288664&view=rev Log: Clean out unused diagnostics. NFC. Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modifi

[clang-tools-extra] r288244 - [include-fixer] Don't skip repeated lookups in plugin mode.

2016-11-30 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Nov 30 08:37:40 2016 New Revision: 288244 URL: http://llvm.org/viewvc/llvm-project?rev=288244&view=rev Log: [include-fixer] Don't skip repeated lookups in plugin mode. In this mode not all the errors are fixed so it doesn't make sense to ignore later ones. Modified: cla

[clang-tools-extra] r288145 - [include-fixer] Don't eat one token too many when replacing a block of includes.

2016-11-29 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Nov 29 09:15:26 2016 New Revision: 288145 URL: http://llvm.org/viewvc/llvm-project?rev=288145&view=rev Log: [include-fixer] Don't eat one token too many when replacing a block of includes. SourceRanges are inclusive token ranges, this was trying to form an exclusive char ran

r288133 - [AST] Use static_assert to verify types instead of undefined classes.

2016-11-29 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Nov 29 06:41:21 2016 New Revision: 288133 URL: http://llvm.org/viewvc/llvm-project?rev=288133&view=rev Log: [AST] Use static_assert to verify types instead of undefined classes. No functionliaty change intended. Modified: cfe/trunk/include/clang/AST/CanonicalType.h

[clang-tools-extra] r288043 - [include-fixer] Don't interfere with typo correction if we found nothing.

2016-11-28 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Nov 28 11:16:18 2016 New Revision: 288043 URL: http://llvm.org/viewvc/llvm-project?rev=288043&view=rev Log: [include-fixer] Don't interfere with typo correction if we found nothing. Just let the existing typo correction machinery handle that. Modified: clang-tools-extra

[PATCH] D27125: Consider nested namespaces in the canonical namespace as canonical as well.

2016-11-25 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: lib/Tooling/Core/Lookup.cpp:27 + llvm::SmallVector Namespaces; + auto GetNextNameNamespace = [](const DeclContext *Context) { +// Look past non-namespaces and anonymous namespaces on FromContext. GetNextName**d**Na

r287894 - [CodeGen] Pass objects that are expensive to copy by const ref.

2016-11-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Nov 24 10:01:20 2016 New Revision: 287894 URL: http://llvm.org/viewvc/llvm-project?rev=287894&view=rev Log: [CodeGen] Pass objects that are expensive to copy by const ref. No functionality change. Found by clang-tidy's performance-unnecessary-value-param. Modified: cfe/

r287892 - [Format] Avoid copying std::sets and simplify code a bit.

2016-11-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Nov 24 09:42:29 2016 New Revision: 287892 URL: http://llvm.org/viewvc/llvm-project?rev=287892&view=rev Log: [Format] Avoid copying std::sets and simplify code a bit. No functional change. Modified: cfe/trunk/lib/Format/Format.cpp Modified: cfe/trunk/lib/Format/Format.c

r287890 - [Sema] Pass APSInts by const ref, avoiding copies.

2016-11-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Nov 24 09:36:17 2016 New Revision: 287890 URL: http://llvm.org/viewvc/llvm-project?rev=287890&view=rev Log: [Sema] Pass APSInts by const ref, avoiding copies. No functionality change intended. Fix by clang-tidy's performance-unnecessary-value-param check. Modified: cfe/

r287859 - [ASTDumper] Add some more character escapes for convenience.

2016-11-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Nov 24 03:41:33 2016 New Revision: 287859 URL: http://llvm.org/viewvc/llvm-project?rev=287859&view=rev Log: [ASTDumper] Add some more character escapes for convenience. Modified: cfe/trunk/lib/AST/Expr.cpp cfe/trunk/test/Misc/ast-dump-wchar.cpp Modified: cfe/trunk/l

[clang-tools-extra] r287759 - [clang-rename] Add test case for r287758.

2016-11-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Nov 23 07:14:19 2016 New Revision: 287759 URL: http://llvm.org/viewvc/llvm-project?rev=287759&view=rev Log: [clang-rename] Add test case for r287758. Added: clang-tools-extra/trunk/test/clang-rename/InvalidOffset.cpp Added: clang-tools-extra/trunk/test/clang-rename/Inva

[clang-tools-extra] r287758 - [clang-rename] Fix non-functional offset check.

2016-11-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Nov 23 07:10:07 2016 New Revision: 287758 URL: http://llvm.org/viewvc/llvm-project?rev=287758&view=rev Log: [clang-rename] Fix non-functional offset check. Adding something to a SourceLocation will only produce an invalid SourceLocation in edge cases (overflow or adding 0 to

r287754 - [CodeGen] Simplify code. No functionality change intended.

2016-11-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Nov 23 05:20:27 2016 New Revision: 287754 URL: http://llvm.org/viewvc/llvm-project?rev=287754&view=rev Log: [CodeGen] Simplify code. No functionality change intended. Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp URL

[clang-tools-extra] r287649 - [clang-rename] Prune away AST nodes more correctly and effectively when looking for a point

2016-11-22 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Nov 22 11:29:45 2016 New Revision: 287649 URL: http://llvm.org/viewvc/llvm-project?rev=287649&view=rev Log: [clang-rename] Prune away AST nodes more correctly and effectively when looking for a point Due to the way the preprocessor works nodes can be half in a macro or a di

[PATCH] D26853: Make llvm::Error generated from replacement interfaces more specific.

2016-11-21 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include/clang/Tooling/Core/Replacement.h:157 + /// \brief Constructs an error related to an existing replacement. + ReplacementError(replacement_error Err, const Replacement &Existing) + : Err(Err), ExistingReplacement(Existing) {

[clang-tools-extra] r287544 - [include-fixer plugin] Make the plugin emit proper fixits in case multiple errors are found.

2016-11-21 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Nov 21 09:28:50 2016 New Revision: 287544 URL: http://llvm.org/viewvc/llvm-project?rev=287544&view=rev Log: [include-fixer plugin] Make the plugin emit proper fixits in case multiple errors are found. The standalone tool only fixes the first one and we managed to bake that

[clang-tools-extra] r287230 - [include-fixer] Add a test for the full round trip through libclang and the plugin.

2016-11-17 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Nov 17 09:23:06 2016 New Revision: 287230 URL: http://llvm.org/viewvc/llvm-project?rev=287230&view=rev Log: [include-fixer] Add a test for the full round trip through libclang and the plugin. Added: clang-tools-extra/trunk/test/include-fixer/yamldb_plugin.cpp Added: cl

r287229 - Link include-fixer into libclang if clang-tools-extra is checked out.

2016-11-17 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Nov 17 09:22:36 2016 New Revision: 287229 URL: http://llvm.org/viewvc/llvm-project?rev=287229&view=rev Log: Link include-fixer into libclang if clang-tools-extra is checked out. include-fixer only slightly bloats the size of libclang, but since libclang has no explicit plugi

[clang-tools-extra] r287228 - [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Nov 17 09:16:05 2016 New Revision: 287228 URL: http://llvm.org/viewvc/llvm-project?rev=287228&view=rev Log: [include-fixer] Refactor include fixer to be usable as a plugin - Refactor the external sema source into a visible class - Add support for emitting FixIts - Wrap up in

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); ioeric wrote: > hokein wrote: > > ioeric wrote: > > > b

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 78354. bkramer added a comment. - Turn loop into an assertions, there should never be more than one replacement coming back. https://reviews.llvm.org/D26752 Files: include-fixer/CMakeLists.txt include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); hokein wrote: > I have a concern that `Placed` here mig

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 78345. bkramer marked 7 inline comments as done. bkramer added a comment. - Address review comments. https://reviews.llvm.org/D26752 Files: include-fixer/CMakeLists.txt include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h include-fixer/plugin

r287128 - [Frontend] Allow attaching an external sema source to compiler instance and extra diags to TypoCorrections

2016-11-16 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Nov 16 12:15:26 2016 New Revision: 287128 URL: http://llvm.org/viewvc/llvm-project?rev=287128&view=rev Log: [Frontend] Allow attaching an external sema source to compiler instance and extra diags to TypoCorrections This can be used to append alternative typo corrections to

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-16 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added reviewers: klimek, hokein, ioeric. bkramer added a subscriber: cfe-commits. Herald added a subscriber: mgorny. - Refactor the external sema source into a visible class - Add support for emitting FixIts - Wrap up include fixer as a plugin as I did with c

[PATCH] D26637: [change-namespace] handle constructor initializer: Derived : Base::Base() {} and added conflict detections

2016-11-16 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:546 + << llvm::toString(std::move(Err)) << "\n"; +assert(false); + } So is this an error or not? If you can hit this by using the tool it should bail out here. I

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

2016-11-16 Thread Benjamin Kramer via cfe-commits
bkramer marked 2 inline comments as done. bkramer added inline comments. Comment at: test/clang-tidy/google-global-names.cpp:13-14 +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: 'i' declared in the global namespace +extern int ii = 0; +// CHECK-MESSAGES: :[[@LINE-1]]:12: warning:

[PATCH] D26745: [Frontend] Allow attaching an external sema source to compiler instance and extra diags to TypoCorrections

2016-11-16 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added a reviewer: klimek. bkramer added a subscriber: cfe-commits. This can be used to append alternative typo corrections to an existing diag. include-fixer can use it to suggest includes to be added. https://reviews.llvm.org/D26745 Files: include/clang

r287005 - [Modules] Replace arrays with init lists.

2016-11-15 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Nov 15 12:56:39 2016 New Revision: 287005 URL: http://llvm.org/viewvc/llvm-project?rev=287005&view=rev Log: [Modules] Replace arrays with init lists. Thi way the compiler can pick the optimal storage duration. It's also more readable. No functional change intended. Modified

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

2016-11-09 Thread Benjamin Kramer via cfe-commits
bkramer marked 2 inline comments as done. bkramer added a comment. In https://reviews.llvm.org/D23130#589643, @alexfh wrote: > > and generally frowned upon in many codebases (e.g. LLVM) > > Should it still be a part of google/? The old check was enforcing a part of > the Google C++ style guide,

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

2016-11-09 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 77410. bkramer added a comment. Add extern "C++" test case. https://reviews.llvm.org/D23130 Files: clang-tidy/google/CMakeLists.txt clang-tidy/google/GlobalNamesCheck.cpp clang-tidy/google/GlobalNamesCheck.h clang-tidy/google/GlobalNamesInHeadersChe

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

2016-11-08 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. In https://reviews.llvm.org/D23130#588681, @alexfh wrote: > Benjamin, what's the plan here? I still think this check is useful, particularly for LLVM. I also don't think any of the existing review comments still apply or have ever applied in the first place, so I reba

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

2016-11-08 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 77216. bkramer added a comment. Herald added subscribers: modocache, mgorny. Update to head https://reviews.llvm.org/D23130 Files: clang-tidy/google/CMakeLists.txt clang-tidy/google/GlobalNamesCheck.cpp clang-tidy/google/GlobalNamesCheck.h clang-tid

[clang-tools-extra] r285396 - [include-fixer] Make error message sound less like clang crashed.

2016-10-28 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 28 08:00:49 2016 New Revision: 285396 URL: http://llvm.org/viewvc/llvm-project?rev=285396&view=rev Log: [include-fixer] Make error message sound less like clang crashed. We suppress all Clang diagnostics (because they would be wrong, include-fixer does custom recovery) b

r285388 - [openmp] Remove test assumption that canonical binary name contains "clang"

2016-10-28 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 28 04:20:02 2016 New Revision: 285388 URL: http://llvm.org/viewvc/llvm-project?rev=285388&view=rev Log: [openmp] Remove test assumption that canonical binary name contains "clang" Patch by Sam McCall! Differential Revision: https://reviews.llvm.org/D26067 Modified:

[PATCH] D25989: Do not print include_next/pragma once warnings when input is a header.

2016-10-27 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D25989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D25990: Sema: do not warn about unused const vars if main file is a header

2016-10-27 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: lib/Sema/Sema.cpp:870 + if (SM.getMainFileID() != SM.getFileID(DiagD->getLocation()) + || !PP.getLangOpts().IsHeaderFile) +Diag(DiagD->getLocation(), diag::warn_unused_const_variable) Do

[PATCH] D25990: Sema: do not warn about unused const vars if main file is a header

2016-10-27 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. This makes sense. While variable definitions in a header are weird, the warning that they're unused isn't adding any value. https://reviews.llvm.org/D25990 __

r285276 - [Xray] Don't generate output for xray tests

2016-10-27 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 27 03:49:18 2016 New Revision: 285276 URL: http://llvm.org/viewvc/llvm-project?rev=285276&view=rev Log: [Xray] Don't generate output for xray tests Patch by Sam McCall! Differential Revision: http://reviews.llvm.org/D26024 Modified: cfe/trunk/test/Driver/XRay/xray-

[PATCH] D26024: [Xray] Don't generate output for xray tests

2016-10-27 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. Testing the code generator in a Driver test is a really weird thing to do. The patch doesn't make it worse though and spamming the test directory is a bad thing. I'll land this. https://re

r285192 - Fix use-after-scope in ASTContext.

2016-10-26 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 26 07:51:45 2016 New Revision: 285192 URL: http://llvm.org/viewvc/llvm-project?rev=285192&view=rev Log: Fix use-after-scope in ASTContext. Extend lifetime of ExceptionTypeStorage, as it is referenced by CanonicalEPI and used outside the block (ExceptionSpec.Exceptions is

[PATCH] D25982: [PP] Replace some index based for loops with range based ones

2016-10-26 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D25982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D25982: [PP] Replace some index based for loops with range based ones

2016-10-26 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: lib/Lex/PPLexerChange.cpp:43 "Top level include stack isn't our primary lexer?"); - for (unsigned i = 1, e = IncludeMacroStack.size(); i != e; ++i) -if (IsFileLexer(IncludeMacroStack[i])) + for (const IncludeStackInfo &IS

[PATCH] D25939: PP: Replace some uses of unsigned with size_t

2016-10-26 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D25939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-25 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. ship it. https://reviews.llvm.org/D25661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D25939: PP: Replace some uses of unsigned with size_t

2016-10-25 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: lib/Lex/PPDirectives.cpp:804 if (LangOpts.MSVCCompat && !isAngled) { - for (unsigned i = 0, e = IncludeMacroStack.size(); i != e; ++i) { IncludeStackInfo &ISEntry = IncludeMacroStack[e - i - 1]; While

[PATCH] D25938: PP: Remove unused parameters from methods

2016-10-25 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D25938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

r285065 - Fix diagnostic format string for err_os_log_argument_to_big

2016-10-25 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Oct 25 07:39:28 2016 New Revision: 285065 URL: http://llvm.org/viewvc/llvm-project?rev=285065&view=rev Log: Fix diagnostic format string for err_os_log_argument_to_big Patch by Sam McCall, test case by me. Differential Revision: https://reviews.llvm.org/D25936 Modified:

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-25 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: lib/Driver/ToolChains.cpp:1438 + if (GCCToolchainDir == "" || GCCToolchainDir == D.SysRoot + "/usr") { +for (const StringRef& CandidateTriple : CandidateTripleAliases) { + llvm::ErrorOr> File = drop the const&.

[PATCH] D25869: [Driver] Add unit tests for DetectDistro()

2016-10-25 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. Very nice. Comment at: unittests/Driver/ToolChainsTest.cpp:15 +// FIXME: I presume this is not the correct way of doing this +#include "../lib/Driver/ToolChains.h" +#include "clang/Basic/VirtualFileSystem.h" Yeah. It's better to hoist t

[PATCH] D25888: Add support for __builtin_os_log_format[_buffer_size]

2016-10-25 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. CodeGen depending on Analysis is fine with me. Any clang tool that builds an AST will have Analysis linked in anyways so there's virtually no cost to it. Repository: rL LLVM https://reviews.llvm.org/D25888 ___ cfe-commit

[PATCH] D25838: [Basic] Support 32-bit x86 and ARM targets for Fuchsia

2016-10-24 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a reviewer: bkramer. bkramer added a comment. This revision is now accepted and ready to land. lg Repository: rL LLVM https://reviews.llvm.org/D25838 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D25888: Add support for __builtin_os_log_format[_buffer_size]

2016-10-24 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. This looks good from a Clang perspective. You also might want to get review from someone who knows how the os_log API is supposed to work, as I can't comment on that. Com

r284856 - Remove move constructors that are identical to the generated default move ctor.

2016-10-21 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 21 13:55:07 2016 New Revision: 284856 URL: http://llvm.org/viewvc/llvm-project?rev=284856&view=rev Log: Remove move constructors that are identical to the generated default move ctor. Modified: cfe/trunk/include/clang/Analysis/Analyses/Consumed.h cfe/trunk/includ

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:103 + auto &Members = ClassWithSpecialMembers[ID]; + if (find(Members, Kind) == Members.end()) Members.push_back(Kind); +} jle

[PATCH] D25871: Include full filename range for missing includes

2016-10-21 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D25871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D25870: Fix 'unknown documentation command' warning ranges

2016-10-21 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. Nice. Thanks! https://reviews.llvm.org/D25870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D25311: Add FixItHint for missing #include (err_module_unimported_use_header)

2016-10-21 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. In https://reviews.llvm.org/D25311#574806, @bruno wrote: > I don't know the history behind the desired dependencies, I'll let others > comment whether this is OK, but my guess it that it depends on the tradeoff, > it's hard to justify 3 new deps for a change that is sup

r284815 - Remove non-existing file from modulemap.

2016-10-21 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 21 05:19:37 2016 New Revision: 284815 URL: http://llvm.org/viewvc/llvm-project?rev=284815&view=rev Log: Remove non-existing file from modulemap. This picked up a builtin header if it happened to be available. Modified: cfe/trunk/test/Modules/Inputs/libc-libcxx/sysr

[PATCH] D22712: Remove FileEntry copy-constructor

2016-10-20 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. GCC 4.7 is dead. Go ahead if it compiles. https://reviews.llvm.org/D22712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r284730 - Retire llvm::alignOf in favor of C++11 alignof.

2016-10-20 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 20 09:27:22 2016 New Revision: 284730 URL: http://llvm.org/viewvc/llvm-project?rev=284730&view=rev Log: Retire llvm::alignOf in favor of C++11 alignof. No functionality change intended. Modified: cfe/trunk/include/clang/AST/ASTContext.h cfe/trunk/include/clang/A

r284729 - Clean up alignment hacks now that MSVC 2013 and GCC 4.7 are gone.

2016-10-20 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 20 08:52:26 2016 New Revision: 284729 URL: http://llvm.org/viewvc/llvm-project?rev=284729&view=rev Log: Clean up alignment hacks now that MSVC 2013 and GCC 4.7 are gone. Modified: cfe/trunk/include/clang/AST/Stmt.h cfe/trunk/include/clang/AST/TemplateBase.h c

r284595 - Remove unused diagnostics. NFC.

2016-10-19 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 19 09:22:38 2016 New Revision: 284595 URL: http://llvm.org/viewvc/llvm-project?rev=284595&view=rev Log: Remove unused diagnostics. NFC. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td URL:

[clang-tools-extra] r284589 - Don't copy replacements in for-range loop. NFC.

2016-10-19 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 19 08:50:17 2016 New Revision: 284589 URL: http://llvm.org/viewvc/llvm-project?rev=284589&view=rev Log: Don't copy replacements in for-range loop. NFC. Modified: clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp Modified: clang-tools-extra/trunk/inclu

r284589 - Don't copy replacements in for-range loop. NFC.

2016-10-19 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Oct 19 08:50:17 2016 New Revision: 284589 URL: http://llvm.org/viewvc/llvm-project?rev=284589&view=rev Log: Don't copy replacements in for-range loop. NFC. Modified: cfe/trunk/lib/Format/TokenAnalyzer.cpp Modified: cfe/trunk/lib/Format/TokenAnalyzer.cpp URL: http://llv

[PATCH] D24997: [ClangTidy] Add UsingInserter and NamespaceAliaser

2016-10-19 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: clang-tidy/utils/UsingInserter.cpp:58 + if (AlreadyHasUsingDecl) { +AddedUsing.emplace(NameInFunction(Function, QualifiedName.str())); +return None; v.g.vassilev wrote: > Using emplace seems to break our modules

Re: r284382 - Revert "Reinstate r281429, reverted in r281452, with a fix for its mishandling of"

2016-10-17 Thread Benjamin Kramer via cfe-commits
; Do you run into something else than what I have as a test case (merging > templated constexpr variables)? > >> >> On Mon, Oct 17, 2016 at 4:38 PM, Vassil Vassilev >> wrote: >>> >>> I was just to commit a fix :( >>> >>> On 17/10/16 15

Re: r284382 - Revert "Reinstate r281429, reverted in r281452, with a fix for its mishandling of"

2016-10-17 Thread Benjamin Kramer via cfe-commits
Too slow ;) Do you have the fix somewhere, so I can try it? On Mon, Oct 17, 2016 at 4:38 PM, Vassil Vassilev wrote: > I was just to commit a fix :( > > On 17/10/16 15:00, Benjamin Kramer via cfe-commits wrote: >> >> Author: d0k >> Date: Mon Oct 17 08:00:44 2016 >&g

Re: r284383 - Return correct path from HexagonToolChain::getHexagonTargetDir

2016-10-17 Thread Benjamin Kramer via cfe-commits
And now the test fails everywhere, including the hexagon bot. Please fix. On Mon, Oct 17, 2016 at 3:23 PM, Krzysztof Parzyszek via cfe-commits wrote: > Author: kparzysz > Date: Mon Oct 17 08:23:41 2016 > New Revision: 284383 > > URL: http://llvm.org/viewvc/llvm-project?rev=284383&view=rev > Log:

<    1   2   3   4   5   6   7   8   9   10   >