Revision tags: llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1 |
|
#
eaf0ada6 |
| 22-Nov-2016 |
Zachary Turner <zturner@google.com> |
Add some searching functions for ArrayRef<T>.
Differential Revision: https://reviews.llvm.org/D26999
llvm-svn: 287722
|
#
764f9f78 |
| 11-Oct-2016 |
Jordan Rose <jordan_rose@apple.com> |
Re-apply "Disallow ArrayRef assignment from temporaries."
This re-applies r283798, disabled in r283803, with the static_assert tests disabled under MSVC. The deleted functions still seem to catch mi
Re-apply "Disallow ArrayRef assignment from temporaries."
This re-applies r283798, disabled in r283803, with the static_assert tests disabled under MSVC. The deleted functions still seem to catch mistakes in MSVC, so it's not a significant loss.
Part of rdar://problem/16375365
llvm-svn: 283935
show more ...
|
#
5f78a972 |
| 10-Oct-2016 |
Zachary Turner <zturner@google.com> |
Revert "Disallow ArrayRef assignment from temporaries."
This reverts commit r283798, as it causes static asserts on MSVC 2015 with the following errors:
ArrayRefTest.cpp(38): error C2338: Assigning
Revert "Disallow ArrayRef assignment from temporaries."
This reverts commit r283798, as it causes static asserts on MSVC 2015 with the following errors:
ArrayRefTest.cpp(38): error C2338: Assigning from single prvalue element ArrayRefTest.cpp(41): error C2338: Assigning from single xvalue element ArrayRefTest.cpp(47): error C2338: Assigning from an initializer list
llvm-svn: 283803
show more ...
|
#
d77cee3f |
| 10-Oct-2016 |
Jordan Rose <jordan_rose@apple.com> |
Disallow ArrayRef assignment from temporaries.
Without this, the following statements will create ArrayRefs that refer to temporary storage that goes out of scope by the end of the line:
someArra
Disallow ArrayRef assignment from temporaries.
Without this, the following statements will create ArrayRefs that refer to temporary storage that goes out of scope by the end of the line:
someArrayRef = getSingleElement(); someArrayRef = {elem1, elem2};
Note that the constructor still has this problem:
ArrayRef<Element> someArrayRef = getSingleElement(); ArrayRef<Element> someArrayRef = {elem1, elem2};
but that's a little harder to get rid of because we want to be able to use this in calls:
takesArrayRef(getSingleElement()); takesArrayRef({elem1, elem2});
Part of rdar://problem/16375365. Reviewed by Duncan Exon Smith.
llvm-svn: 283798
show more ...
|
#
613c0752 |
| 30-Aug-2016 |
Zachary Turner <zturner@google.com> |
Fix unit test after function name change.
llvm-svn: 280129
|
#
84fc059e |
| 30-Aug-2016 |
Zachary Turner <zturner@google.com> |
Add StringRef::take_front and StringRef::take_back
Reviewed By: majnemer, rnk Differential Revision: https://reviews.llvm.org/D23965
llvm-svn: 280114
|
#
68ce7928 |
| 25-Aug-2016 |
David Blaikie <dblaikie@gmail.com> |
Fix ArrayRef initializer_list Ctor Test
The InitializerList test had undefined behavior by creating a dangling pointer to the temporary initializer list. This patch removes the undefined behavior i
Fix ArrayRef initializer_list Ctor Test
The InitializerList test had undefined behavior by creating a dangling pointer to the temporary initializer list. This patch removes the undefined behavior in the test by creating the initializer list directly.
Reviewers: mehdi_amini, dblaikie
Differential Revision: https://reviews.llvm.org/D23890
llvm-svn: 279783
show more ...
|
Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
31a8a8eb |
| 02-Jun-2016 |
Ahmed Bougacha <ahmed.bougacha@gmail.com> |
[ADT] Pass ArrayRef::slice size_t instead of unsigned.
Also fix slice wrappers drop_front and drop_back. The unittests are pretty awkward, but do the job; alternatives welcome!
..and yes, I do have
[ADT] Pass ArrayRef::slice size_t instead of unsigned.
Also fix slice wrappers drop_front and drop_back. The unittests are pretty awkward, but do the job; alternatives welcome!
..and yes, I do have ArrayRefs with more than 4 billion elements.
llvm-svn: 271546
show more ...
|
#
1e4ba37d |
| 03-May-2016 |
Reid Kleckner <rnk@google.com> |
[ADT] Add drop_front method to ArrayRef
We have it for StringRef but not ArrayRef, and ArrayRef has drop_back, so I see no reason it shouldn't have drop_front. Splitting this out of a change that I
[ADT] Add drop_front method to ArrayRef
We have it for StringRef but not ArrayRef, and ArrayRef has drop_back, so I see no reason it shouldn't have drop_front. Splitting this out of a change that I have that will use this funcitonality.
llvm-svn: 268434
show more ...
|
Revision tags: llvmorg-3.8.0, llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1, llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1 |
|
#
defa5465 |
| 10-Sep-2015 |
Mehdi Amini <mehdi.amini@apple.com> |
Add makeArrayRef() overload for ArrayRef input (no-op/identity) NFC
The purpose is to allow templated wrapper to work with either ArrayRef or any convertible operation:
template<typename Container>
Add makeArrayRef() overload for ArrayRef input (no-op/identity) NFC
The purpose is to allow templated wrapper to work with either ArrayRef or any convertible operation:
template<typename Container> void wrapper(const Container &Arr) { impl(makeArrayRef(Arr)); }
with Container being a std::vector, a SmallVector, or an ArrayRef.
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247214
show more ...
|
Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4 |
|
#
bee48597 |
| 05-Aug-2015 |
Benjamin Kramer <benny.kra@googlemail.com> |
[ArrayRefTest] Work around a GCC 4.8 internal compiler error.
llvm-svn: 244023
|
#
8e078420 |
| 05-Aug-2015 |
NAKAMURA Takumi <geek4civic@gmail.com> |
unittests/ADT/ArrayRefTest.cpp: Suppress r243995 on g++-4.8 for now to unbreak bots.
For example of mingw-w64-g++-4.8.1,
llvm/unittests/ADT/ArrayRefTest.cpp: In member function 'virtual void {ano
unittests/ADT/ArrayRefTest.cpp: Suppress r243995 on g++-4.8 for now to unbreak bots.
For example of mingw-w64-g++-4.8.1,
llvm/unittests/ADT/ArrayRefTest.cpp: In member function 'virtual void {anonymous}::ArrayRefTest_AllocatorCopy_Test::TestBody()': llvm/unittests/ADT/ArrayRefTest.cpp:56:40: internal compiler error: in count_type_elements, at expr.c:5523 } Array3Src[] = {{"hello"}, {"world"}}; ^ Please submit a full bug report, with preprocessed source if appropriate.
llvm-svn: 244017
show more ...
|
#
07f42cd5 |
| 04-Aug-2015 |
Benjamin Kramer <benny.kra@googlemail.com> |
[ArrayRef] Make copy use std::uninitialized_copy.
std::copy does not work for non-trivially copyable classes when we're copying into uninitialized memory.
llvm-svn: 243995
|
Revision tags: llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1, llvmorg-3.6.2, llvmorg-3.6.2-rc1 |
|
#
3182ee92 |
| 09-Jun-2015 |
Aaron Ballman <aaron@aaronballman.com> |
Removing spurious semi colons; NFC.
llvm-svn: 239399
|
Revision tags: llvmorg-3.6.1, llvmorg-3.6.1-rc1, llvmorg-3.5.2, llvmorg-3.5.2-rc1 |
|
#
030133c5 |
| 01-Mar-2015 |
Benjamin Kramer <benny.kra@googlemail.com> |
ArrayRef: Remove the equals helper with many arguments.
With initializer lists there is a really neat idiomatic way to write this, 'ArrayRef.equals({1, 2, 3, 4, 5})'. Remove the equal method which a
ArrayRef: Remove the equals helper with many arguments.
With initializer lists there is a really neat idiomatic way to write this, 'ArrayRef.equals({1, 2, 3, 4, 5})'. Remove the equal method which always had a hard limit on the number of arguments. I considered rewriting it with variadic templates but that's not really a good fit for a function with homogeneous arguments.
'ArrayRef == {1, 2, 3, 4, 5}' would've been even more awesome, but C++11 doesn't allow init lists with binary operators.
llvm-svn: 230907
show more ...
|
Revision tags: llvmorg-3.6.0, llvmorg-3.6.0-rc4 |
|
#
a9614171 |
| 17-Feb-2015 |
Aaron Ballman <aaron@aaronballman.com> |
Correcting the ArrayRef test to not cause use-after-free bugs with initializer lists. Should also silence a -Wsign-compare warning accidentally introduced.
llvm-svn: 229515
|
#
fbb030f0 |
| 17-Feb-2015 |
Aaron Ballman <aaron@aaronballman.com> |
Adding additional tests to ensure that initializer lists created from return values and as function arguments also work as expected.
llvm-svn: 229513
|
#
fb28a60d |
| 17-Feb-2015 |
Aaron Ballman <aaron@aaronballman.com> |
Addressing a post-commit review comment suggesting to avoid using direct initialization.
llvm-svn: 229512
|
#
f4984a96 |
| 17-Feb-2015 |
Aaron Ballman <aaron@aaronballman.com> |
I believe we no longer require LLVM_HAS_INITIALIZER_LISTS; it's supported in MSVC 2013 and GCC. Added a trivial test to ensure the ArrayRef initializer list constructor is called and behaves as expec
I believe we no longer require LLVM_HAS_INITIALIZER_LISTS; it's supported in MSVC 2013 and GCC. Added a trivial test to ensure the ArrayRef initializer list constructor is called and behaves as expected.
If any of the bots complain (perhaps due to an antiquated version of an STL implementation), I will revert.
llvm-svn: 229502
show more ...
|
Revision tags: llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1 |
|
#
a1f4697d |
| 01-Jan-2015 |
Chandler Carruth <chandlerc@gmail.com> |
Revert r225053: Add an ArrayRef upcasting constructor from ArrayRef<U*> -> ArrayRef<T*> where T is a base of U.
This appears to have broken at least the windows build bots due to compile errors in t
Revert r225053: Add an ArrayRef upcasting constructor from ArrayRef<U*> -> ArrayRef<T*> where T is a base of U.
This appears to have broken at least the windows build bots due to compile errors in the predicate that didn't simply supress the overload. I'm not sure what the fix is, and the bots have been broken for a long time now so I'm just reverting until Michael can figure out a fix.
llvm-svn: 225064
show more ...
|
#
77b1aa98 |
| 31-Dec-2014 |
Michael Gottesman <mgottesman@apple.com> |
Add an ArrayRef upcasting constructor from ArrayRef<U*> -> ArrayRef<T*> where T is a base of U.
llvm-svn: 225053
|
Revision tags: llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1, llvmorg-3.5.0 |
|
#
ee03eadc |
| 31-Aug-2014 |
David Blaikie <dblaikie@gmail.com> |
Add some negative (and positive) static_assert checks for ArrayRef-of-pointer conversions introduced in r216709
llvm-svn: 216830
|
#
c9439cc8 |
| 30-Aug-2014 |
Craig Topper <craig.topper@gmail.com> |
Add a test for converting ArrayRef<T *> to ArrayRef<const T *>.
llvm-svn: 216821
|
Revision tags: llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3 |
|
#
349f6982 |
| 19-Aug-2014 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
ADT: Unit test for ArrayRef::equals change in r215986
llvm-svn: 216008
|
Revision tags: llvmorg-3.5.0-rc2 |
|
#
3ea985b3 |
| 27-Jul-2014 |
Chandler Carruth <chandlerc@gmail.com> |
[ADT] Add a remarkbly useful little helper routine to ArrayRef for checking whether the ArrayRef is equal to an explicit list of arguments.
This is particularly easy to implement even without variad
[ADT] Add a remarkbly useful little helper routine to ArrayRef for checking whether the ArrayRef is equal to an explicit list of arguments.
This is particularly easy to implement even without variadic templates because ArrayRef happens to be homogeneously typed. As a consequence we can use a "clever" wrapper type and default arguments to capture in a single method many arguments as well as *how many* arguments the user specified.
Thanks to Dave Blaikie for helping me pull together this little helper. Suggestions for how to improve or generalize it are of course welcome. I'll be using it immediately in my follow-up patch. =D
llvm-svn: 214041
show more ...
|