[PATCH] D24378: [CodeGen] Provide an appropriate alignment for dynamic allocas

2016-09-08 Thread David Majnemer via cfe-commits
majnemer created this revision. majnemer added reviewers: rnk, rsmith, efriedma, chandlerc. majnemer added a subscriber: cfe-commits. GCC documents __builtin_alloca as aligning the storage to at least __BIGGEST_ALIGNMENT__. MSVC documents essentially the same for the x64 ABI: https://msdn.microso

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-08 Thread Eric Fiselier via cfe-commits
I believe mclow is working on this On Sep 8, 2016 9:30 PM, "Keno Fischer" wrote: > loladiro created this revision. > loladiro added reviewers: EricWF, mclow.lists. > loladiro added a subscriber: cfe-commits. > loladiro set the repository for this revision to rL LLVM. > > Without this, unique_ptr

Re: [PATCH] D24374: [libc++] Avoid include in locale_win32.h

2016-09-08 Thread Shoaib Meenai via cfe-commits
smeenai added a comment. Cool. Any thoughts on this implementation vs. `___mb_cur_max_l_func`? In other words, do we have a general policy on using internal CRT functionality? FWIW, `support/win32/support.h` was using `xlocinfo.h` before my recent cleanup, which is also an internal header. ht

Re: [PATCH] D24374: [libc++] Avoid include in locale_win32.h

2016-09-08 Thread Eric Fiselier via cfe-commits
EricWF added a comment. LGTM. I'm OK with things that are "technically" regressions in Windows support if it helps us get it working today. https://reviews.llvm.org/D24374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

Re: [PATCH] D21515: Update clang for D21514. NFC

2016-09-08 Thread Amaury SECHET via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281018: Update clang for D21514. NFC (authored by deadalnix). Changed prior to commit: https://reviews.llvm.org/D21515?vs=62791&id=70783#toc Repository: rL LLVM https://reviews.llvm.org/D21515 Files

Re: [PATCH] D24374: [libc++] Avoid include in locale_win32.h

2016-09-08 Thread Shoaib Meenai via cfe-commits
smeenai added a comment. I'm aware that my replacement code isn't entirely equivalent, since it won't restore the locale in case `MB_CUR_MAX` throws. However, I'm quite certain the `MB_CUR_MAX` implementation won't throw. I can make my own RAII wrapper if desired, however. Alternatively, MSDN

[PATCH] D24374: [libc++] Avoid include in locale_win32.h

2016-09-08 Thread Shoaib Meenai via cfe-commits
smeenai created this revision. smeenai added reviewers: compnerd, EricWF, mclow.lists. smeenai added a subscriber: cfe-commits. When `_LIBCPP_NO_EXCEPTIONS` is defined, we end up with compile errors when targeting MSVCRT: * Code includes `` * `` includes `` in order to get `abort` * `` includes `

Re: [PATCH] D23932: [XRay] ARM 32-bit no-Thumb support in Clang

2016-09-08 Thread Dean Michael Berris via cfe-commits
dberris requested changes to this revision. dberris added a comment. This revision now requires changes to proceed. See comments in https://reviews.llvm.org/D23931 for more details. https://reviews.llvm.org/D23932 ___ cfe-commits mailing list cfe-co

Re: [PATCH] D23932: [XRay] ARM 32-bit no-Thumb support in Clang

2016-09-08 Thread Dean Michael Berris via cfe-commits
dberris reopened this revision. dberris added a comment. This revision is now accepted and ready to land. Reverted in https://reviews.llvm.org/rL280968 -- we should resolve https://reviews.llvm.org/D23931 before attempting to land again. https://reviews.llvm.org/D23932 __

[PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-08 Thread Keno Fischer via cfe-commits
loladiro created this revision. loladiro added reviewers: EricWF, mclow.lists. loladiro added a subscriber: cfe-commits. loladiro set the repository for this revision to rL LLVM. Without this, unique_ptr is not constant initialized. I've added a test to that extent. Unfortunately, I believe there

[PATCH] D24371: Add diagnostics to require_constant_initialization

2016-09-08 Thread Keno Fischer via cfe-commits
loladiro created this revision. loladiro added reviewers: EricWF, aaron.ballman, rsmith. loladiro added a subscriber: cfe-commits. loladiro set the repository for this revision to rL LLVM. This hooks up the detailed diagnostics why constant initialization was not possible if require_constant_init

r281017 - [Docs] Fix typos, remove trailing whitespace.

2016-09-08 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Thu Sep 8 21:45:48 2016 New Revision: 281017 URL: http://llvm.org/viewvc/llvm-project?rev=281017&view=rev Log: [Docs] Fix typos, remove trailing whitespace. Avoided wrapping NullabilityDocs at 80cols, since that would've made this diff much bigger, and never-ending lines seems

Re: [PATCH] D22494: [analyzer] Explain why analyzer report is not generated (fix for PR12421).

2016-09-08 Thread Anton Yartsev via cfe-commits
ayartsev updated this revision to Diff 70772. ayartsev added a comment. Updated the patch, added help entry for the "--analyzer-output" driver option. Please review. https://reviews.llvm.org/D22494 Files: lib/StaticAnalyzer/Core/PathDiagnostic.cpp test/Analysis/diagnostics/diag-cross-file-

Re: [PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-09-08 Thread Sasha Bermeister via cfe-commits
sashab updated this revision to Diff 70760. sashab marked an inline comment as done. sashab added a comment. Thanks for your feedback everyone; left the flag as DefaultIgnore but added it to -Wall. Keep in mind I am planning on adding two additional warnings after this, namely "%0 is too small t

r280999 - C++ Modules TS: Add parsing and some semantic analysis support for

2016-09-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Sep 8 18:14:54 2016 New Revision: 280999 URL: http://llvm.org/viewvc/llvm-project?rev=280999&view=rev Log: C++ Modules TS: Add parsing and some semantic analysis support for export-declarations. These don't yet have an effect on name visibility; we still export everything

Re: [PATCH] D23643: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-09-08 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280998: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64 (authored by vedantk). Changed prior to commit: https://reviews.llvm.org/D23643?vs=68747&id=70761#toc Repository: rL LLVM htt

r280998 - [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-09-08 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Sep 8 17:53:19 2016 New Revision: 280998 URL: http://llvm.org/viewvc/llvm-project?rev=280998&view=rev Log: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64 Differential Revision: https://reviews.llvm.org/D23643 Modified: cfe/trunk/lib/Driver/Tools.c

Re: [PATCH] D24307: calculate extent size for memory regions allocated by C++ new expression

2016-09-08 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1003 @@ +1002,3 @@ +// +ProgramStateRef MallocChecker::addExtentSize(CheckerContext &C, + const CXXNewExpr *NE, NoQ wrote: > dkru

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-08 Thread Albert Gutowski via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280997: Implement MS _rot intrinsics (authored by agutowski). Changed prior to commit: https://reviews.llvm.org/D24311?vs=70747&id=70759#toc Repository: rL LLVM https://reviews.llvm.org/D24311 Files

r280997 - Implement MS _rot intrinsics

2016-09-08 Thread Albert Gutowski via cfe-commits
Author: agutowski Date: Thu Sep 8 17:32:19 2016 New Revision: 280997 URL: http://llvm.org/viewvc/llvm-project?rev=280997&view=rev Log: Implement MS _rot intrinsics Reviewers: thakis, Prazek, compnerd, rnk Subscribers: majnemer, cfe-commits Differential Revision: https://reviews.llvm.org/D24311

Re: [PATCH] D23643: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-09-08 Thread Akira Hatanaka via cfe-commits
ahatanak accepted this revision. ahatanak added a reviewer: ahatanak. ahatanak added a comment. This revision is now accepted and ready to land. LGTM. We should fix this longstanding bug. https://reviews.llvm.org/D23643 ___ cfe-commits mailing list

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/readability/ContainerSizeEmptyCheck.cpp:34 @@ +33,3 @@ + has(functionDecl( + isPublic(), hasName("size"), returns(isInteger()), + unless(anyOf(returns(isAnyCharacter()), returns(booleanType()), ---

Re: [PATCH] D23643: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-09-08 Thread Vedant Kumar via cfe-commits
vsk added a comment. Ping. https://reviews.llvm.org/D23643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24330: Add some MS aliases for existing intrinsics

2016-09-08 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: include/clang/Basic/BuiltinsX86.def:304 @@ -303,2 +303,3 @@ TARGET_BUILTIN(__builtin_ia32_ldmxcsr, "vUi", "", "sse") +TARGET_BUILTIN(_mm_setcsr, "vUi", "", "sse") TARGET_BUILTIN(__builtin_ia32_stmxcsr, "Ui", "", "sse") rsmi

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-08 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D24311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-09-08 Thread Reid Kleckner via cfe-commits
rnk added a comment. I was thinking of suggesting to put it under -Wextra, but -Wall is fine too. I still don't think it should be on by default. I think there are a lot of Unix-only projects out there that aren't concerned with MSVC compatibility, and a warning about how things with in the Mic

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Kirill Bobyrev via cfe-commits
omtcyfz added a comment. In https://reviews.llvm.org/D24349#537624, @aaron.ballman wrote: > I think that's reasonable, depending on whether we find false positives with > the warning as well (I have a slight concern about `size()` and `empty()` > being unrelated operations on a non-container cl

Re: [PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-09-08 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2962 @@ -2959,1 +2961,3 @@ + "the enum %0 an unsigned underlying type">, + InGroup>, DefaultIgnore; def warn_attribute_packed_for_bitfield : Warning< thakis

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-08 Thread Richard Smith via cfe-commits
On Thu, Sep 8, 2016 at 12:06 PM, Filipe Cabecinhas < filcab+llvm.phabrica...@gmail.com> wrote: > It seems some people on this thread (I'm sorry if everyone is taking this > into account, but it seemed to me that this was going unnoticed, I want to > make sure everyone is on the same page) is only

Re: [PATCH] D24278: [analyzer] Extend bug reports with extra notes.

2016-09-08 Thread Vassil Vassilev via cfe-commits
v.g.vassilev added a comment. Thanks for working on this! On my browser the note "Detected code clone" note appears slightly off the highlighted range which was a bit confusing to me. Given my limited understanding of the SA bug reports, this looks good to me. Comment at: lib

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D24349#537595, @xazax.hun wrote: > In https://reviews.llvm.org/D24349#537594, @omtcyfz wrote: > > > In https://reviews.llvm.org/D24349#537589, @Eugene.Zelenko wrote: > > > > > If size() and empty() change object's state, it may be not equ

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-08 Thread Richard Smith via cfe-commits
On Thu, Sep 8, 2016 at 11:19 AM, Anna Zaks wrote: > zaks.anna added a comment. > > > I don't see the point of adding another flag to control this when we > already have a perfectly good set of > > > flags that already do the right thing -- that takes us three levels > deep in flags overriding th

Re: [PATCH] D24314: [libc++] Clean up MSVC support

2016-09-08 Thread Saleem Abdulrasool via cfe-commits
compnerd closed this revision. compnerd added a comment. SVN r280988 https://reviews.llvm.org/D24314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r280988 - support: clean up MSVC support

2016-09-08 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Thu Sep 8 15:52:48 2016 New Revision: 280988 URL: http://llvm.org/viewvc/llvm-project?rev=280988&view=rev Log: support: clean up MSVC support Visual Studio 2013 (CRT version 12) added support for many C99 long long and long double functions. Visual Studio 2015 (CRT version

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-08 Thread Albert Gutowski via cfe-commits
agutowski marked 4 inline comments as done. agutowski added a comment. https://reviews.llvm.org/D24311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-08 Thread Albert Gutowski via cfe-commits
agutowski updated this revision to Diff 70747. agutowski added a comment. Remove evaluating values for constant arguments https://reviews.llvm.org/D24311 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h test/CodeGen/ms-intrinsics-rotations.c Index:

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-08 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/AST/ExprConstant.cpp:7024-7050 @@ -7023,1 +7023,29 @@ + case Builtin::BI_rotl8: + case Builtin::BI_rotl16: + case Builtin::BI_rotl: + case Builtin::BI_lrotl: + case Builtin::BI_rotl64: { +APSInt Val, Shift; +if (!EvaluateIn

r280984 - [modules] Apply ODR merging for function scoped tags only in C++ mode.

2016-09-08 Thread Vassil Vassilev via cfe-commits
Author: vvassilev Date: Thu Sep 8 15:34:41 2016 New Revision: 280984 URL: http://llvm.org/viewvc/llvm-project?rev=280984&view=rev Log: [modules] Apply ODR merging for function scoped tags only in C++ mode. In C mode, if we have a visible declaration but not a visible definition, a tag defined in

Re: [PATCH] D22642: CodeGen: Clean up implementation of vtable initializer builder. NFC.

2016-09-08 Thread Richard Smith via cfe-commits
On Wed, Sep 7, 2016 at 7:14 PM, Richard Smith wrote: > On 7 Sep 2016 6:59 pm, "Peter Collingbourne" wrote: > > On Wed, Sep 7, 2016 at 6:44 PM, Richard Smith > wrote: > >> On 7 Sep 2016 6:23 pm, "Peter Collingbourne" wrote: >> >> pcc marked 4 inline comments as done. >> >> >> C

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D24349#537594, @omtcyfz wrote: > In https://reviews.llvm.org/D24349#537589, @Eugene.Zelenko wrote: > > > If size() and empty() change object's state, it may be not equivalent > > replacement. > > > True. But my point is that they are not req

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Kirill Bobyrev via cfe-commits
omtcyfz added a comment. In https://reviews.llvm.org/D24349#537589, @Eugene.Zelenko wrote: > If size() and empty() change object's state, it may be not equivalent > replacement. True. But my point is that they are not required to do that if they're just not marked `const`. Repository: rL

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. If size() and empty() change object's state, it may be not equivalent replacement. Repository: rL LLVM https://reviews.llvm.org/D24349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

Re: [PATCH] D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation

2016-09-08 Thread Tavian Barnes via cfe-commits
tavianator added inline comments. Comment at: src/cxa_thread_atexit.cpp:70 @@ +69,3 @@ +while (auto head = dtors) { + dtors = head->next; + head->dtor(head->obj); EricWF wrote: > tavianator wrote: > > EricWF wrote: > > > There is a bug here. If `head

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Kirill Bobyrev via cfe-commits
omtcyfz marked an inline comment as done. omtcyfz added a comment. In https://reviews.llvm.org/D24349#537350, @Eugene.Zelenko wrote: > Probably check should have options to extend list of containers and also to > assume all classes with integer type size() const and bool empty() const as > cont

Re: [PATCH] D24065: [libc++] Use _LIBCPP_TYPE_VIS_ONLY with enum class

2016-09-08 Thread Shoaib Meenai via cfe-commits
smeenai added a comment. Friendly ping :) https://reviews.llvm.org/D24065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-09-08 Thread Nico Weber via cfe-commits
thakis added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2962 @@ -2959,1 +2961,3 @@ + "the enum %0 an unsigned underlying type">, + InGroup>, DefaultIgnore; def warn_attribute_packed_for_bitfield : Warning< Hm, isn't the more safe de

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D24349#537549, @Eugene.Zelenko wrote: > Should we also check for absence of parameters in size() and empty() as well > as const? I think that would be reasonable. https://reviews.llvm.org/D24349 ___

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. Should we also check for absence of parameters in size() and empty() as well as const? https://reviews.llvm.org/D24349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-08 Thread Yaxun Liu via cfe-commits
yaxunl updated this revision to Diff 70738. yaxunl marked 5 inline comments as done. yaxunl added a comment. Revised by Anastasia's comments. https://reviews.llvm.org/D21698 Files: include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/O

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D24349#537350, @Eugene.Zelenko wrote: > Probably check should have options to extend list of containers and also to > assume all classes with integer type size() const and bool empty() const as > containers. It may be not trivial to fin

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. How do I add FixIt hints? They should be simple removals, but how do I decide whether to remove the following comma, preceding comma or preceding colon? Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:33 @@ +32,3 @@ + const auto

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-08 Thread Filipe Cabecinhas via cfe-commits
It seems some people on this thread (I'm sorry if everyone is taking this into account, but it seemed to me that this was going unnoticed, I want to make sure everyone is on the same page) is only talking about linking (or not) the sanitizer runtimes. But that's not the only thing. Depending on th

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:34 @@ +33,3 @@ + const auto *Construct = Result.Nodes.getNodeAs("construct"); + const auto arguments = Construct->arguments(); + sbenza wrote: > Prazek wrote: >

Fixing some byte compilation warnings in utils/clang-completion-mode.el

2016-09-08 Thread Philipp Stephani via cfe-commits
Hi, the following patch fixes a couple of byte compilation warnings in the Emacs library utils/clang-completion-mode.el. Thanks, Philipp -- Google Germany GmbH Erika-Mann-Straße 33 80636 München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Mat

Fix for https://llvm.org/bugs/show_bug.cgi?id=29073

2016-09-08 Thread Philipp Stephani via cfe-commits
Hi, the attached patch fixes https://llvm.org/bugs/show_bug.cgi?id=29073. Thanks, Philipp -- Google Germany GmbH Erika-Mann-Straße 33 80636 München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle Die

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-08 Thread Yaxun Liu via cfe-commits
yaxunl marked 8 inline comments as done. yaxunl added a comment. F2413912: ___10_Fiji.i F2413913: callgrind.out.20440 Uploaded the kernel used for profiling and the calgrind data. This kernel is dumped from the open source

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:33 @@ +32,3 @@ + const auto *Init = Result.Nodes.getNodeAs("init"); + const auto *Construct = Result.Nodes.getNodeAs("construct"); + const auto arguments = Construct->arguments(); ---

Re: [PATCH] D22057: Prevent devirtualization of calls to un-instantiated functions.

2016-09-08 Thread Arthur O'Dwyer via cfe-commits
Quuxplusone added inline comments. Comment at: test/CodeGen/no-devirt.cpp:16 @@ +15,3 @@ + if (a > 6) return data[a] ; // Should not devirtualize + if (a > 4) return data.func1(a); // Should devirtualize + return data.func2(a);// Should devirtualize

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:36 @@ +35,3 @@ + + using std::begin; + using std::end; begin() and end() are not used extensively. Why not to use std::? Repository: rL LLVM https://review

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:34 @@ +33,3 @@ + const auto *Construct = Result.Nodes.getNodeAs("construct"); + const auto arguments = Construct->arguments(); + Arguments (upper case) Repository:

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-08 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/AST/ExprConstant.cpp:7024-7050 @@ -7023,1 +7023,29 @@ + case Builtin::BI_rotl8: + case Builtin::BI_rotl16: + case Builtin::BI_rotl: + case Builtin::BI_lrotl: + case Builtin::BI_rotl64: { +APSInt Val, Shift; +if (!Evalu

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-08 Thread Albert Gutowski via cfe-commits
agutowski added inline comments. Comment at: lib/AST/ExprConstant.cpp:7024-7050 @@ -7023,1 +7023,29 @@ + case Builtin::BI_rotl8: + case Builtin::BI_rotl16: + case Builtin::BI_rotl: + case Builtin::BI_lrotl: + case Builtin::BI_rotl64: { +APSInt Val, Shift; +if (!Eval

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-08 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D21698#537156, @yaxunl wrote: > I did profiling with valgrind for the cost of checking disabled types and > declarations. For a typical program, time spent in checking disabled types > and declarations are less than 0.1%, so this cost can b

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-08 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. > I don't see the point of adding another flag to control this when we already > have a perfectly good set of > flags that already do the right thing -- that takes us three levels deep in > flags overriding the behavior of > other flags, and I don't see how it ac

Re: [PATCH] D24330: Add some MS aliases for existing intrinsics

2016-09-08 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/BuiltinsX86.def:304 @@ -303,2 +303,3 @@ TARGET_BUILTIN(__builtin_ia32_ldmxcsr, "vUi", "", "sse") +TARGET_BUILTIN(_mm_setcsr, "vUi", "", "sse") TARGET_BUILTIN(__builtin_ia32_stmxcsr, "Ui", "", "sse") m

Re: [clang-tools-extra] r280839 - Resubmit "Add a test for clang-tidy using the clang-cl driver."

2016-09-08 Thread Ahmed Bougacha via cfe-commits
On Thu, Sep 8, 2016 at 9:52 AM, Zachary Turner wrote: > I don't have access to an OSX machine to test on, but if you do, is there > any way you could test this command line manually using a path that starts > with /U and see if you can reproduce it? (Did you mean to include a command line?) I tri

[clang-tools-extra] r280975 - Revert "Resubmit "Add a test for clang-tidy using the clang-cl driver.""

2016-09-08 Thread Ahmed Bougacha via cfe-commits
Author: ab Date: Thu Sep 8 13:02:14 2016 New Revision: 280975 URL: http://llvm.org/viewvc/llvm-project?rev=280975&view=rev Log: Revert "Resubmit "Add a test for clang-tidy using the clang-cl driver."" This reverts commit r280839. It's problematic on OS X, where the '/Users/...' paths are interpr

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-08 Thread Richard Smith via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D24048#537257, @beanz wrote: > @kubabrecka, I can understand where you're coming from about the option > starting with `-fsanitize`, but I disagree for two reasons. First, I think > that it is more important for the option to be concise and cl

Re: [PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-09-08 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. I think will be good idea to add cases when member is initialized in declaration and constructor, with same and different values. Comment at: docs/clang-tidy/checks/readability-redundant-member-i

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. Probably check should have options to extend list of containers and also to assume all classes with integer type size() const and bool empty() const as containers. It may be not trivial to find out all custom containers and last option will be helpful to assemble

Re: [PATCH] D24330: Add some MS aliases for existing intrinsics

2016-09-08 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: include/clang/Basic/BuiltinsX86.def:304 @@ -303,2 +303,3 @@ TARGET_BUILTIN(__builtin_ia32_ldmxcsr, "vUi", "", "sse") +TARGET_BUILTIN(_mm_setcsr, "vUi", "", "sse") TARGET_BUILTIN(__builtin_ia32_stmxcsr, "Ui", "", "sse")

Re: [PATCH] D24330: Add some MS aliases for existing intrinsics

2016-09-08 Thread Reid Kleckner via cfe-commits
rnk added a comment. +Richard for ideas on how to navigate the intel intrinsics Comment at: include/clang/Basic/BuiltinsX86.def:304 @@ -303,2 +303,3 @@ TARGET_BUILTIN(__builtin_ia32_ldmxcsr, "vUi", "", "sse") +TARGET_BUILTIN(_mm_setcsr, "vUi", "", "sse") TARGET_BUILTIN(__built

r280968 - Revert "[XRay] ARM 32-bit no-Thumb support in Clang"

2016-09-08 Thread Renato Golin via cfe-commits
Author: rengolin Date: Thu Sep 8 12:12:32 2016 New Revision: 280968 URL: http://llvm.org/viewvc/llvm-project?rev=280968&view=rev Log: Revert "[XRay] ARM 32-bit no-Thumb support in Clang" This reverts commit r280889, as the original LLVM commits broke the thumb buildbots. Removed: cfe/trunk/

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Kirill Bobyrev via cfe-commits
omtcyfz marked an inline comment as done. Comment at: clang-tidy/readability/ContainerSizeEmptyCheck.cpp:33 @@ +32,3 @@ + const auto validContainer = namedDecl( + has(functionDecl( + isPublic(), hasName("size"), returns(isInteger()), Thank you! Bla

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Kirill Bobyrev via cfe-commits
omtcyfz updated this revision to Diff 70717. omtcyfz added a comment. Blacklist `enum` and `bool` return types for `size()`. https://reviews.llvm.org/D24349 Files: clang-tidy/readability/ContainerSizeEmptyCheck.cpp test/clang-tidy/readability-container-size-empty.cpp Index: test/clang-tidy

Re: [clang-tools-extra] r280839 - Resubmit "Add a test for clang-tidy using the clang-cl driver."

2016-09-08 Thread Zachary Turner via cfe-commits
I don't have access to an OSX machine to test on, but if you do, is there any way you could test this command line manually using a path that starts with /U and see if you can reproduce it? On Thu, Sep 8, 2016 at 9:45 AM Ahmed Bougacha wrote: > On Thu, Sep 8, 2016 at 9:38 AM, Zachary Turner wro

[libclc] r280961 - Replace nextafter implementation

2016-09-08 Thread Matt Arsenault via cfe-commits
Author: arsenm Date: Thu Sep 8 11:37:56 2016 New Revision: 280961 URL: http://llvm.org/viewvc/llvm-project?rev=280961&view=rev Log: Replace nextafter implementation This one passes conformance. Modified: libclc/trunk/amdgpu/lib/math/nextafter.cl libclc/trunk/generic/lib/math/clc_nextaft

Re: [clang-tools-extra] r280839 - Resubmit "Add a test for clang-tidy using the clang-cl driver."

2016-09-08 Thread Ahmed Bougacha via cfe-commits
On Thu, Sep 8, 2016 at 9:38 AM, Zachary Turner wrote: > What happens if you put the %s in quotes? Same error -Ahmed > > On Thu, Sep 8, 2016 at 9:32 AM Ahmed Bougacha > wrote: >> >> Hi Zachary, >> >> This test has been failing on some OS X machines, e.g.: >> >> http://lab.llvm.org:8080/green/jo

Re: [PATCH] D21968: [libcxx] Externally threaded libc++ variant - Take 2

2016-09-08 Thread Asiri Rathnayake via cfe-commits
rmaprath added a comment. In https://reviews.llvm.org/D21968#534462, @EricWF wrote: > This looks great. Two comments: > > 1. The declarations should be used in both the inline and external pthread > implementation. They also need visibility declarations. > 2. Why can't we use the inline impleme

Re: [clang-tools-extra] r280839 - Resubmit "Add a test for clang-tidy using the clang-cl driver."

2016-09-08 Thread Zachary Turner via cfe-commits
What happens if you put the %s in quotes? On Thu, Sep 8, 2016 at 9:32 AM Ahmed Bougacha wrote: > Hi Zachary, > > This test has been failing on some OS X machines, e.g.: > > http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/21470/consoleFull#19036563798254eaf0-7326-4999-85b0-3881

Re: [clang-tools-extra] r280839 - Resubmit "Add a test for clang-tidy using the clang-cl driver."

2016-09-08 Thread Ahmed Bougacha via cfe-commits
Hi Zachary, This test has been failing on some OS X machines, e.g.: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/21470/consoleFull#19036563798254eaf0-7326-4999-85b0-388101f2d404 My hypothesis is that the %s path ('/Users/...') is somehow interpreted as a '/U' by the clan

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-08 Thread Chris Bieneman via cfe-commits
beanz added a comment. There are basically two solutions being debated. Either make `-fsanitize=...` bypass `-nostdlib` `-nodefaultlibs` or support a flag that explicitly bypasses it. Personally I think the flag is probably the better way to go because it is more explicit, and has less implied

Re: [PATCH] D24289: Add warning when assigning enums to bitfields without an explicit unsigned underlying type

2016-09-08 Thread Reid Kleckner via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: lib/Sema/SemaChecking.cpp:7841 @@ +7840,3 @@ +if (S.getLangOpts().CPlusPlus11 && +!BitfieldEnumDecl->getIntegerTypeSourceInfo() && +BitfieldEnum

Re: [PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a reviewer: aaron.ballman. Comment at: clang-tidy/readability/ContainerSizeEmptyCheck.cpp:33 @@ +32,3 @@ + const auto validContainer = namedDecl( + has(functionDecl(isPublic(), hasName("size"), returns(isIn

Re: [PATCH] D24048: [Driver] [Darwin] Add sanitizer libraries even if -nodefaultlibs is passed

2016-09-08 Thread Chris Bieneman via cfe-commits
beanz updated this revision to Diff 70709. beanz added a comment. - Updated with FreeBSD and GNUTools support for -flink-sanitizer-runtimes https://reviews.llvm.org/D24048 Files: include/clang/Driver/Options.td lib/Driver/ToolChains.cpp lib/Driver/ToolChains.h lib/Driver/Tools.cpp tes

[PATCH] D24349: [clang-tidy] Extend readability-container-size-empty to arbitrary class with size() and empty()

2016-09-08 Thread Kirill Bobyrev via cfe-commits
omtcyfz created this revision. omtcyfz added reviewers: alexfh, Eugene.Zelenko, klimek. omtcyfz added a subscriber: cfe-commits. Implementing [[ https://llvm.org/bugs/show_bug.cgi?id=26823 | feature request ]]. This patch extends readability-container-size-empty check allowing it to produce war

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-09-08 Thread Ziv Izhar via cfe-commits
zizhar updated this revision to Diff 70660. zizhar added a comment. Hi, I have moved the relevant code to TargetInfo as previously discussed, and created a default implementation and the x86 implementation. Regarding the intrinsics, I believe it should be a separate fix, as it is not related to

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-08 Thread Yaxun Liu via cfe-commits
yaxunl added a comment. I did profiling with valgrind for the cost of checking disabled types and declarations. For a typical program, time spent in checking disabled types and declarations are less than 0.1%, so this cost can be ignored. https://reviews.llvm.org/D21698

[libcxx] r280944 - Added 'inline' attribute to basic_string's destructor

2016-09-08 Thread Aditya Kumar via cfe-commits
Author: hiraditya Date: Thu Sep 8 09:31:44 2016 New Revision: 280944 URL: http://llvm.org/viewvc/llvm-project?rev=280944&view=rev Log: Added 'inline' attribute to basic_string's destructor Author: laxmansole Reviewers: howard.hinnant mclow.lists Subscribers: EricWF, flyingforyou, eva

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-08 Thread Kirill Bobyrev via cfe-commits
omtcyfz added a comment. Also +R Alex if he has some time to take a look at the code. https://reviews.llvm.org/D24183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22130: Link static PIE programs against rcrt0.o on OpenBSD

2016-09-08 Thread Ed Maste via cfe-commits
emaste added a comment. Seems fine to me, but I'm not particularly knowledgeable about OpenBSD's toolchain. https://reviews.llvm.org/D22130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-08 Thread Kirill Bobyrev via cfe-commits
omtcyfz added a comment. A round of mostly stylistic comments. Comment at: change-namespace/ChangeNamespace.cpp:85 @@ +84,3 @@ + +SourceLocation getStartOfNextLine(SourceLocation Loc, const SourceManager &SM, + const LangOptions &LangOpts) {

Re: [PATCH] D16989: Change interpretation of function definition in friend declaration of template class.

2016-09-08 Thread Serge Pavlov via cfe-commits
Any feedback? Thanks, --Serge 2016-09-02 13:11 GMT+07:00 Serge Pavlov : > sepavloff updated this revision to Diff 70134. > sepavloff marked an inline comment as done. > sepavloff added a comment. > > Updated patch > > Rewrite the condition in shouldLinkDependentDeclWithPrevious in more > compact

Re: [PATCH] D24224: [clang-rename] Merge rename-{ at | all } and optimise USRFindingAction.

2016-09-08 Thread Kirill Bobyrev via cfe-commits
omtcyfz updated this revision to Diff 70687. omtcyfz marked 4 inline comments as done. omtcyfz added a comment. Address another round of comments. https://reviews.llvm.org/D24224 Files: clang-rename/USRFindingAction.cpp clang-rename/USRFindingAction.h clang-rename/tool/ClangRename.cpp d

Re: [PATCH] D24192: [clang-refactor] introducing clang-refactor

2016-09-08 Thread Marek Kurdej via cfe-commits
curdeius added inline comments. Comment at: clang-refactor/driver/ModuleManager.h:14-20 @@ +13,9 @@ +#include "clang/Basic/LLVM.h" +#include "llvm/ADT/StringRef.h" + +#include +#include +#include + +#include "core/RefactoringModule.h" + I thought that idea behi

Re: [PATCH] D24224: [clang-rename] Merge rename-{ at | all } and optimise USRFindingAction.

2016-09-08 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-rename/USRFindingAction.cpp:157 @@ +156,3 @@ +if (!Point.isValid()) { + ErrorOccurred = true; + return false; Should we emit a diagnostic in t

Re: [PATCH] D24192: [clang-refactor] introducing clang-refactor

2016-09-08 Thread Kirill Bobyrev via cfe-commits
omtcyfz added inline comments. Comment at: clang-refactor/driver/ModuleManager.cpp:22-24 @@ +21,5 @@ +int ModuleManager::Dispatch(StringRef Command, int argc, const char **argv) { + if (CommandToModuleID.find(Command) != CommandToModuleID.end()) { +return RegisteredModules[Co

Re: [PATCH] D24192: [clang-refactor] introducing clang-refactor

2016-09-08 Thread Kirill Bobyrev via cfe-commits
omtcyfz updated this revision to Diff 70682. omtcyfz marked 8 inline comments as done. omtcyfz added a comment. Herald added a subscriber: beanz. Addressing few comments. Major improvements on the way. https://reviews.llvm.org/D24192 Files: CMakeLists.txt clang-refactor/CMakeLists.txt cl

r280921 - Moved unreachable to appease msvc, gcc and clang

2016-09-08 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Thu Sep 8 06:03:41 2016 New Revision: 280921 URL: http://llvm.org/viewvc/llvm-project?rev=280921&view=rev Log: Moved unreachable to appease msvc, gcc and clang Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp URL: http://llvm

Re: [PATCH] D24224: [clang-rename] Merge rename-{ at | all } and optimise USRFindingAction.

2016-09-08 Thread Kirill Bobyrev via cfe-commits
omtcyfz updated this revision to Diff 70673. omtcyfz marked 2 inline comments as done. omtcyfz added a comment. Address comments. https://reviews.llvm.org/D24224 Files: clang-rename/USRFindingAction.cpp clang-rename/USRFindingAction.h clang-rename/tool/ClangRename.cpp docs/clang-rename.

  1   2   >