[clang-tools-extra] r295715 - [clang-tidy] Reword the "code outside header guard" warning.

2017-02-21 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Feb 21 05:25:45 2017 New Revision: 295715 URL: http://llvm.org/viewvc/llvm-project?rev=295715&view=rev Log: [clang-tidy] Reword the "code outside header guard" warning. The check doesn't really know if the code it is warning about came before or after the header guard, so ph

r295820 - [ODRHash] Avoid dereferencing end() of a SmallVector.

2017-02-22 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Feb 22 04:19:45 2017 New Revision: 295820 URL: http://llvm.org/viewvc/llvm-project?rev=295820&view=rev Log: [ODRHash] Avoid dereferencing end() of a SmallVector. Found by MSAN. Modified: cfe/trunk/lib/Serialization/ASTReader.cpp Modified: cfe/trunk/lib/Serialization/AS

r296034 - [CodeGen] Silence unused variable warning in Release builds.

2017-02-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Feb 23 16:47:56 2017 New Revision: 296034 URL: http://llvm.org/viewvc/llvm-project?rev=296034&view=rev Log: [CodeGen] Silence unused variable warning in Release builds. Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp URL: htt

[clang-tools-extra] r296390 - [clangd] Make clangd install to bin

2017-02-27 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Feb 27 15:40:35 2017 New Revision: 296390 URL: http://llvm.org/viewvc/llvm-project?rev=296390&view=rev Log: [clangd] Make clangd install to bin This allows the install target to also install clangd to bin, so that it can be deployed and used outside the build tree. Patch by

[clang-tools-extra] r296636 - [clangd] Add support for FixIts.

2017-03-01 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Mar 1 10:16:29 2017 New Revision: 296636 URL: http://llvm.org/viewvc/llvm-project?rev=296636&view=rev Log: [clangd] Add support for FixIts. Summary: This uses CodeActions to show 'apply fix' actions when code actions are requested for a location. The actions themselves make

[clang-tools-extra] r296637 - [clangd] Unbreak the shared build.

2017-03-01 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Mar 1 10:23:40 2017 New Revision: 296637 URL: http://llvm.org/viewvc/llvm-project?rev=296637&view=rev Log: [clangd] Unbreak the shared build. Modified: clang-tools-extra/trunk/clangd/CMakeLists.txt Modified: clang-tools-extra/trunk/clangd/CMakeLists.txt URL: http://ll

[clang-tools-extra] r296737 - [clangd] Fix a potential race by copying the FixIts out of ASTManager before releasing the lock.

2017-03-02 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Mar 2 04:25:00 2017 New Revision: 296737 URL: http://llvm.org/viewvc/llvm-project?rev=296737&view=rev Log: [clangd] Fix a potential race by copying the FixIts out of ASTManager before releasing the lock. Also document the locking semantics a bit better. Modified: clan

Re: r296927 - Add arch-specific directory to search path

2017-03-06 Thread Benjamin Kramer via cfe-commits
On Sat, Mar 4, 2017 at 12:20 AM, Pirama Arumuga Nainar via cfe-commits wrote: > Author: pirama > Date: Fri Mar 3 17:20:49 2017 > New Revision: 296927 > > URL: http://llvm.org/viewvc/llvm-project?rev=296927&view=rev > Log: > Add arch-specific directory to search path > > Summary: > > This change a

Re: r296927 - Add arch-specific directory to search path

2017-03-06 Thread Benjamin Kramer via cfe-commits
On Mon, Mar 6, 2017 at 7:00 PM, Pirama Arumuga Nainar wrote: > Adding Reid, Michal > > > On Mon, Mar 6, 2017 at 5:01 AM, Benjamin Kramer wrote: >> >> On Sat, Mar 4, 2017 at 12:20 AM, Pirama Arumuga Nainar via cfe-commits >> wrote: >> > Author: pirama >> > Date: Fri Mar 3 17:20:49 2017 >> > New

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] 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

[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] 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] 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

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-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

[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()); ioeric wrote: > hokein wrote: > > ioeric wrote: > > > b

[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

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] 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

[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

[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] 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

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] 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

[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

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

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/

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

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/

[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

[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

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] 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

[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

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

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

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:

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

r300873 - [Driver] Add a missing -no-canonical-prefixes to test.

2017-04-20 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Apr 20 14:06:24 2017 New Revision: 300873 URL: http://llvm.org/viewvc/llvm-project?rev=300873&view=rev Log: [Driver] Add a missing -no-canonical-prefixes to test. Modified: cfe/trunk/test/Driver/avr-mmcu.c Modified: cfe/trunk/test/Driver/avr-mmcu.c URL: http://llvm.org

[clang-tools-extra] r300990 - [Clangd] Support Authority-less URIs

2017-04-21 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Apr 21 10:51:18 2017 New Revision: 300990 URL: http://llvm.org/viewvc/llvm-project?rev=300990&view=rev Log: [Clangd] Support Authority-less URIs Clangd strips URIs by removing the file:// part but some clients can send file: which is also valid according to RFC 3896. For exa

[clang-tools-extra] r300991 - [Clangd] Failed to decode params using 1.x-compatible request message

2017-04-21 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Apr 21 10:51:23 2017 New Revision: 300991 URL: http://llvm.org/viewvc/llvm-project?rev=300991&view=rev Log: [Clangd] Failed to decode params using 1.x-compatible request message textDocument/completion sends a TextDocumentPositionParams message in the 2.x and 3.x. But in 1.x

r301825 - Silence unused variable warning. NFC.

2017-05-01 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon May 1 15:00:23 2017 New Revision: 301825 URL: http://llvm.org/viewvc/llvm-project?rev=301825&view=rev Log: Silence unused variable warning. NFC. Modified: cfe/trunk/lib/AST/ExprConstant.cpp Modified: cfe/trunk/lib/AST/ExprConstant.cpp URL: http://llvm.org/viewvc/llvm-

Re: [clang-tools-extra] r302934 - [include-fixer] Don't throw exception when parsing unknown arguments in

2017-05-12 Thread Benjamin Kramer via cfe-commits
On Fri, May 12, 2017 at 9:01 PM, Haojian Wu via cfe-commits wrote: > Author: hokein > Date: Fri May 12 14:01:02 2017 > New Revision: 302934 > > URL: http://llvm.org/viewvc/llvm-project?rev=302934&view=rev > Log: > [include-fixer] Don't throw exception when parsing unknown arguments in > vim script

[clang-tools-extra] r303242 - Revert "[include-fixer] Don't throw exception when parsing unknown arguments in vim script."

2017-05-17 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed May 17 04:24:28 2017 New Revision: 303242 URL: http://llvm.org/viewvc/llvm-project?rev=303242&view=rev Log: Revert "[include-fixer] Don't throw exception when parsing unknown arguments in vim script." This reverts commit r302934. It's wrong, edits the wrong file and was com

[clang-tools-extra] r303376 - [clangd] Make formatting.test asynchronous again.

2017-05-18 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu May 18 15:10:04 2017 New Revision: 303376 URL: http://llvm.org/viewvc/llvm-project?rev=303376&view=rev Log: [clangd] Make formatting.test asynchronous again. This test doesn't rely on the order of asynchronous messages, enable threads so we have at least some coverage for th

[clang-tools-extra] r303623 - [clangd] Pick up deps via LLVM components, which will hopefully include pthread.

2017-05-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue May 23 05:17:48 2017 New Revision: 303623 URL: http://llvm.org/viewvc/llvm-project?rev=303623&view=rev Log: [clangd] Pick up deps via LLVM components, which will hopefully include pthread. Modified: clang-tools-extra/trunk/clangd/CMakeLists.txt Modified: clang-tools-ext

[clang-tools-extra] r303625 - [clangd] Explicitly link against pthread.

2017-05-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue May 23 05:29:54 2017 New Revision: 303625 URL: http://llvm.org/viewvc/llvm-project?rev=303625&view=rev Log: [clangd] Explicitly link against pthread. Modified: clang-tools-extra/trunk/clangd/CMakeLists.txt Modified: clang-tools-extra/trunk/clangd/CMakeLists.txt URL: ht

r303686 - [Frontend] Don't index into an empty string.

2017-05-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue May 23 15:48:21 2017 New Revision: 303686 URL: http://llvm.org/viewvc/llvm-project?rev=303686&view=rev Log: [Frontend] Don't index into an empty string. Found by msan! Modified: cfe/trunk/lib/Frontend/TextDiagnostic.cpp Modified: cfe/trunk/lib/Frontend/TextDiagnostic.c

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

[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

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

[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

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:

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

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

[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

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] 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

[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] 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] 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

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] 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

[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-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] 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] 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&.

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] 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

[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] 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-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] 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] 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

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] 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

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] 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 __

[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] 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

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:

[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

[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

[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-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-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,

r248279 - Remove unused diagnostic. NFC.

2015-09-22 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Sep 22 09:34:59 2015 New Revision: 248279 URL: http://llvm.org/viewvc/llvm-project?rev=248279&view=rev Log: Remove unused diagnostic. NFC. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td URL:

r248376 - [DeclPrinter] Don't crash when printing a using decl with a special name

2015-09-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Sep 23 08:43:16 2015 New Revision: 248376 URL: http://llvm.org/viewvc/llvm-project?rev=248376&view=rev Log: [DeclPrinter] Don't crash when printing a using decl with a special name Fixes PR24872. Modified: cfe/trunk/lib/AST/DeclPrinter.cpp cfe/trunk/test/SemaCXX/ast

r248391 - [Sema] Don't create an invalid source range for overlong initializer lists.

2015-09-23 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Sep 23 11:03:53 2015 New Revision: 248391 URL: http://llvm.org/viewvc/llvm-project?rev=248391&view=rev Log: [Sema] Don't create an invalid source range for overlong initializer lists. We took both source locations from the end of the initializer list what the code below does

r248495 - [Driver] Don't implicitly copy std::strings in for-range loop.

2015-09-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Sep 24 09:48:37 2015 New Revision: 248495 URL: http://llvm.org/viewvc/llvm-project?rev=248495&view=rev Log: [Driver] Don't implicitly copy std::strings in for-range loop. Found by -Wrange-loop-analysis. Modified: cfe/trunk/lib/Driver/ToolChains.cpp Modified: cfe/trunk/

r248496 - Drop useless const in for-range loops.

2015-09-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Sep 24 09:48:49 2015 New Revision: 248496 URL: http://llvm.org/viewvc/llvm-project?rev=248496&view=rev Log: Drop useless const in for-range loops. StringRefs always point to immutable memory so the const doesn't add value here. Also quiets clang's -Wrange-loop-analysis which

r249019 - [VFS] Remove unused setters. NFC.

2015-10-01 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 1 10:02:15 2015 New Revision: 249019 URL: http://llvm.org/viewvc/llvm-project?rev=249019&view=rev Log: [VFS] Remove unused setters. NFC. Modified: cfe/trunk/include/clang/Basic/VirtualFileSystem.h Modified: cfe/trunk/include/clang/Basic/VirtualFileSystem.h URL: ht

[PATCH] D13430: [VFS] Add an in-memory file system implementation.

2015-10-05 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added a reviewer: klimek. bkramer added a subscriber: cfe-commits. Herald added a subscriber: klimek. This is a simple file system tree of memory buffers that can be filled by a client. In conjunction with an OverlayFS it can be used to make virtual files acc

r249310 - [VFS] Remove setName from the file interface.

2015-10-05 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 5 08:15:33 2015 New Revision: 249310 URL: http://llvm.org/viewvc/llvm-project?rev=249310&view=rev Log: [VFS] Remove setName from the file interface. This streamlines the interface a bit and makes Status more immutable. No functional change intended. Modified: cfe/t

Re: [PATCH] D13430: [VFS] Add an in-memory file system implementation.

2015-10-05 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 36509. bkramer added a comment. Rebased and addressed review comments. http://reviews.llvm.org/D13430 Files: include/clang/Basic/VirtualFileSystem.h lib/Basic/VirtualFileSystem.cpp unittests/Basic/VirtualFileSystemTest.cpp unittests/Tooling/Rewriter

Re: [PATCH] D13430: [VFS] Add an in-memory file system implementation.

2015-10-05 Thread Benjamin Kramer via cfe-commits
bkramer marked 10 inline comments as done. Comment at: include/clang/Basic/VirtualFileSystem.h:286-288 @@ +285,5 @@ + } + std::error_code setCurrentWorkingDirectory(const Twine &Path) override { +WorkingDirectory = Path.str(); +return std::error_code(); + }

r249314 - [VFS] Move class out of method so it looks less like Java.

2015-10-05 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 5 08:55:09 2015 New Revision: 249314 URL: http://llvm.org/viewvc/llvm-project?rev=249314&view=rev Log: [VFS] Move class out of method so it looks less like Java. No functionality change. Modified: cfe/trunk/lib/Basic/VirtualFileSystem.cpp Modified: cfe/trunk/lib/B

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