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=rev Log: [IRGen] Make header standalone. Modified: cfe/trunk/lib/CodeGen/ABIInfo.h Modified: cfe/trunk/lib/CodeGen/ABIInfo.h URL:

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

[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=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 for

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=rev Log: [ASTUnit] Reset diag state when creating the ASTUnit. A client could call this with a dirty diagnostic engine, don't crash. Modified:

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

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

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

2017-01-13 Thread Benjamin Kramer via cfe-commits
_LIB} to >> LINK_LIBS 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 <seu...@linux.vnet.ibm.com> >> wrote: >>> >>> On 01

[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=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 pthread

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=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 <seu...@linux.vnet.ibm.com> wrote: > On 01/09/2017 09:18 AM, Benjamin Kramer via cfe-comm

[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=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 > > > ___ >

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=rev Log: Use the correct ObjC EH personality This fixes ObjC exceptions on Win64 (which uses SEH), among others. Patch by Jonathan Schleifer! Modified:

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=rev Log: [Format] Remove dead code. No functionality change. Modified: cfe/trunk/lib/Format/Encoding.h cfe/trunk/lib/Format/TokenAnalyzer.h

[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=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 is

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

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 >

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=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, test

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=rev Log: Clean out unused diagnostics. NFC. Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified:

[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=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:

[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=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 range.

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=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=rev Log: [include-fixer] Don't interfere with typo correction if we found nothing. Just let the existing typo correction machinery handle that. Modified:

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

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

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=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.cpp

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

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

[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=rev Log: [clang-rename] Add test case for r287758. Added: clang-tools-extra/trunk/test/clang-rename/InvalidOffset.cpp Added:

[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=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 an

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

[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 ) + : 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=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=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:

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

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

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

[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

[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

[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

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

[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

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

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

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

[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

[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-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=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) but

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

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

[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=rev Log: [Xray] Don't generate output for xray tests Patch by Sam McCall! Differential Revision: http://reviews.llvm.org/D26024 Modified:

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

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

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

[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

[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

[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 = IncludeMacroStack[e - i - 1]; While there

[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

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

[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

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

[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

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

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=rev Log: Remove move constructors that are identical to the generated default move ctor. Modified: cfe/trunk/include/clang/Analysis/Analyses/Consumed.h

[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 = ClassWithSpecialMembers[ID]; + if (find(Members, Kind) == Members.end()) Members.push_back(Kind); +} jlebar

[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

[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

[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

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=rev Log: Remove non-existing file from modulemap. This picked up a builtin header if it happened to be available. Modified:

[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=rev Log: Retire llvm::alignOf in favor of C++11 alignof. No functionality change intended. Modified: cfe/trunk/include/clang/AST/ASTContext.h

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

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=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=rev Log: Don't copy replacements in for-range loop. NFC. Modified: clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp Modified:

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

[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

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

2016-10-17 Thread Benjamin Kramer via cfe-commits
5678 > > 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 <v.g.vassi...@gmail.com> >> wrote: >>> >>> I was just to commit a fix :( >

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 <v.g.vassi...@gmail.com> wrote: > I was just to commit a fix :( > > On 17/10/16 15:00, Benjamin Kramer via cfe-commits wrote: >> >> Author: d0k >> Date

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:

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

2016-10-17 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Oct 17 08:00:44 2016 New Revision: 284382 URL: http://llvm.org/viewvc/llvm-project?rev=284382=rev Log: Revert "Reinstate r281429, reverted in r281452, with a fix for its mishandling of" This reverts commit r284176. It still marks some modules as invisible that should be

[PATCH] D25597: Try to fix buildbot failure in VirtualFileSystem caused by r284129.

2016-10-14 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. I think the assertion is correct, there's something fishy with the inputs. The paths coming in should be absolute, and there should never be a .. at the start in a absolute path. This only fails on a single buildbot and doesn't reproduce anywhere else. @bruno any

Re: r283802 - Change Builtins name to be stored as StringRef instead of raw pointers (NFC)

2016-10-11 Thread Benjamin Kramer via cfe-commits
Yup, GCC is "fast enough" again. Thanks :) On Tue, Oct 11, 2016 at 9:13 PM, Mehdi Amini wrote: > Reverted in r283920, can you check if it is enough to “fix” the GCC issue? > >> On Oct 11, 2016, at 12:04 PM, Benjamin Kramer wrote: >> >> Committing this

Re: r283802 - Change Builtins name to be stored as StringRef instead of raw pointers (NFC)

2016-10-11 Thread Benjamin Kramer via cfe-commits
Committing this patch before the constexpr change seems backwards then? The static initializers are already breaking stuff because it takes GCC with optimization and debug info takes 10+ minutes to generate megabytes of static initializer code in Targets.cpp. Can you please revert this until the

Re: r283802 - Change Builtins name to be stored as StringRef instead of raw pointers (NFC)

2016-10-11 Thread Benjamin Kramer via cfe-commits
I don't think this change is worth it. We create huge static arrays with Builtin::Info in Builtins.cpp and Targets.cpp, StringRef(const char*) is not constexpr (because of strlen). This means you'll get a huge generated initialization function for it. We want to reduce the number of global

r283430 - Add missing -no-canonical-prefixes.

2016-10-06 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu Oct 6 04:40:37 2016 New Revision: 283430 URL: http://llvm.org/viewvc/llvm-project?rev=283430=rev Log: Add missing -no-canonical-prefixes. Modified: cfe/trunk/test/Driver/fuchsia.c cfe/trunk/test/Driver/fuchsia.cpp Modified: cfe/trunk/test/Driver/fuchsia.c URL:

[PATCH] [Accepted] D25019: [clang-tidy] Make add_new_check.py Python 3 compatible

2016-09-30 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. Okay. If six is installed by default on Ubuntu and macOS we should be fine. The script isn't in the critical path for anyone. https://reviews.llvm.org/D25019

[PATCH] [Commented On] D25019: [clang-tidy] Make add_new_check.py Python 3 compatible

2016-09-30 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. > add_new_check.py:16 > > +from six.moves import filter > + Can we rely on six being available? It's not part of the default python installation afaik. https://reviews.llvm.org/D25019 ___ cfe-commits mailing list

Re: [PATCH] D24719: [include-fixer] Add customized editor settings documents.

2016-09-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/D24719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D18462: Fix for clang_Cursor_getSpellingNameRange()

2016-09-15 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. looks good from my side. https://reviews.llvm.org/D18462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24075: [include-fixer] Support finding headers for the symbol under cursor.

2016-09-07 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. I can't really comment on the emacs integration with my limited knowledge of elisp. The rest looks good to me. https://reviews.llvm.org/D24075

Re: [PATCH] D23989: Fix -Wunused-but-set-variable warning.

2016-08-29 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg. Feel free to submit trivial changes like this without pre-commit review. https://reviews.llvm.org/D23989 ___ cfe-commits mailing list

Re: [PATCH] D23985: [InstructionSelect] NumBlocks isn't defined in DEBUG build.

2016-08-29 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/D23985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

<    1   2   3   4   5   6   7   8   9   >