summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix heuristics skipping invalid ctor-initializers with C++11Olivier Goffart2016-11-032-14/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | Use better heuristics to detect if a '{' might be the start of the constructor body or not. Especially when there is a completion token. Fix the test 'test/CodeCompletion/ctor-initializer.cpp ' when clang defaults to c++11 The problem was is how we recover invalid code in the ctor-init part as we skip the function body. In particular, we want to know if a '{' is the begining of the body. In C++03, we always consider it as the beginng of the body. The problem was that in C++11, it may be the start of an initializer, so we skip over it, causing further parse errors later. (It is important that we are able to parse correctly the rest of the class definition, to know what are the class member, for example) This commit is improving the heuristics to decide if the '{' is starting a function body. The rules are the following: If we are not in a template argument, and that the previous tokens are not an identifier, or a >, then it is much more likely to be the function body. We verify that further by checking the token after the matching '}' The commit also fix the behavior when there is a code_completion token in the ctor-initializers. Differential Revision: https://reviews.llvm.org/D21502 llvm-svn: 285883
* Enhancement to test for -ast-printSerge Pavlov2016-11-031-1/+3
| | | | | | | | | | | Present tests for the functionality provided by command lime option `-ast-print` check only absence of crash. This change tries to make testing better, - the output produced by the compiler is compiled again with option `-print-ast` and both outputs are compared. Such test at least checks that the output is valid code. This change fixes only the test for pure C. llvm-svn: 285882
* [CMake] Disable rpath for UnitTestsJonas Hahnfeld2016-11-032-7/+5
| | | | | | | | This was broken since rL285714. Differential Revision: https://reviews.llvm.org/D26246 llvm-svn: 285881
* [Sema] Remove a dead assignment, NFC.Vedant Kumar2016-11-031-3/+2
| | | | | | | | | | | The assignment to NextIsDereference is either followed by (1) another, unrelated assignment to NextIsDereference or by (2) an early loop exit. Found by clang's static analyzer: http://llvm.org/reports/scan-build (While we're at it fix a typo.) llvm-svn: 285879
* [AVX-512] Use 'vnot' instead of 'not' in patterns involving vXi1 vectors.Craig Topper2016-11-033-71/+36
| | | | | | | | | | | | This fixes selection of KANDN instructions and allows us to remove an extra set of patterns for KNOT and KXNOR. Reviewers: delena, igorb Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26134 llvm-svn: 285878
* Expandload and Compressstore intrinsicsElena Demikhovsky2016-11-0312-58/+441
| | | | | | | | 2 new intrinsics covering AVX-512 compress/expand functionality. This implementation includes syntax, DAG builder, operation lowering and tests. Does not include: handling of illegal data types, codegen prepare pass and the cost model. llvm-svn: 285876
* Pass the sections to getShtGroupSignature.Rafael Espindola2016-11-032-4/+10
| | | | | | This avoids fetching it again from the object. llvm-svn: 285875
* Split getSection in two.Rafael Espindola2016-11-031-8/+18
| | | | | | This will allow avoiding repeated error checking in a few cases. llvm-svn: 285874
* [CodeGen] Use StringRef. NFC.George Burgess IV2016-11-033-7/+7
| | | | | | | | Looks like CurFn's name outlives FunctionName, so we can just pass StringRefs around rather than going from a StringRef to a std::string to a const char* to a StringRef. llvm-svn: 285873
* [Sema] Allow static_cast<T&&>(e) to check explicit conversions for ↵Eric Fiselier2016-11-034-17/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | non-reference-related types. Summary: [expr.cast.static] states: > 3. A glvalue of type “cv1 T1” can be cast to type “rvalue reference to cv2 T2” if “cv2 T2” is reference-compatible > with “cv1 T1”. The result refers to the object or the specified base class subobject thereof. If T2 is > an inaccessible or ambiguous base class of T1, a program that necessitates such a cast is > ill-formed. > > 4. Otherwise, an expression e can be explicitly converted to a type T using a static_cast of the form static_- > cast<T>(e) if the declaration T t(e); is well-formed, for some invented temporary variable t. [...] Currently when checking p3 Clang will diagnose `static_cast<T&&>(e)` as invalid if the argument is not reference compatible with `T`. However I believe the correct behavior is to also check p4 in those cases. For example: ``` double y = 42; static_cast<int&&>(y); // this should be OK. 'int&& t(y)' is well formed ``` Note that we still don't check p4 for non-reference-compatible types which are reference-related since `T&& t(e);` should never be well formed in those cases. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26231 llvm-svn: 285872
* [ThinLTO] Handle distributed backend case when doing renamingTeresa Johnson2016-11-033-4/+45
| | | | | | | | | | | | | | | | | | | | | | | Summary: The recent change I made to consult the summary when deciding whether to rename (to handle inline asm) in r285513 broke the distributed build case. In a distributed backend we will only have a portion of the combined index, specifically for imported modules we only have the summaries for any imported definitions. When renaming on import we were asserting because no summary entry was found for a local reference being linked in (def wasn't imported). We only need to consult the summary for a renaming decision for the exporting module. For imports, we would have prevented importing any references to NoRename values already. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26250 llvm-svn: 285871
* Update manglings for C++17 noexcept function types to match Jason Merrill'sRichard Smith2016-11-033-23/+23
| | | | | | proposal on cxx-abi-dev earlier today. llvm-svn: 285870
* Teach clang-query to dump types. I couldn't find any existing tests for ↵Richard Smith2016-11-024-4/+14
| | | | | | clang-query's dumping functionality. =( llvm-svn: 285869
* [index] Fix assertion hit when handling a declaration of C++'s 'operator ↵Argyrios Kyrtzidis2016-11-023-13/+14
| | | | | | | | | | | new' function. Part of this is to allow creating a USR for the canonical decl of that which is implicit and does not have a source location. rdar://28978992 llvm-svn: 285868
* [p0012] Implement ABI support for throwing a noexcept function pointer andRichard Smith2016-11-025-1/+208
| | | | | | | | | | | | | | | | catching as non-noexcept This implements the following proposal from cxx-abi-dev: http://sourcerytools.com/pipermail/cxx-abi-dev/2016-October/002988.html ... which is necessary for complete support of http://wg21.link/p0012, specifically throwing noexcept function and member function pointers and catching them as non-noexcept pointers. Differential Review: https://reviews.llvm.org/D26178 llvm-svn: 285867
* Revert "[InstCombine] allow splat vector folds in adjustMinMax()"Greg Bedwell2016-11-022-42/+62
| | | | | | | | | | | | | | | | | This reverts commit r285732. This change introduced a new assertion failure in the following testcase at -O2: typedef short __v8hi __attribute__((__vector_size__(16))); __v8hi foo(__v8hi &V1, __v8hi &V2, unsigned mask) { __v8hi Result = V1; if (mask & 0x80) Result[0] = V2[0]; return Result; } llvm-svn: 285866
* [cmake] Build gtest from LLVM when building standaloneMichal Gorny2016-11-021-0/+8
| | | | | | | | | | | Include the gtest utility directory from LLVM sources when performing a stand-alone build of LLDB. This is necessary to have a correct gtest library to link tests against, as the one used by LLVM is not installed (and not supposed to be). This is the same approach as used in clang. Differential Revision: https://reviews.llvm.org/D26245 llvm-svn: 285865
* [Polly CodeGen] Break critical edge from RTC to original loop.Eli Friedman2016-11-0211-66/+103
| | | | | | | | | | | | | | | This makes polly generate a CFG which is closer to what we want in LLVM IR, with a loop preheader for the original loop. This is just a cleanup, but it exposes some fragile assumptions. I'm not completely happy with the changes related to expandCodeFor; RTCBB->getTerminator() is basically a random insertion point which happens to work due to the way we generate runtime checks. I'm not sure what the right answer looks like, though. Differential Revision: https://reviews.llvm.org/D26053 llvm-svn: 285864
* Simplify some typedefs. NFC.Rafael Espindola2016-11-022-16/+15
| | | | llvm-svn: 285863
* Emit S_COMPILE3 record once per TU rather than once per functionAdrian McCarthy2016-11-028-232/+87
| | | | | | This has some ripple effects in several tests. llvm-svn: 285862
* [clang-tidy] Suppress notes for warnings that were ignoredMalcolm Parsons2016-11-024-3/+25
| | | | | | | | Fixes PR30565. Patch by Nikita Kakuev llvm-svn: 285861
* Add the rest of the additional error checks for invalid Mach-O files whenKevin Enderby2016-11-0218-28/+157
| | | | | | | | | | the offsets and sizes of an element of the Mach-O file overlaps with another element in the Mach-O file. Some other tests for malformed Mach-O files now run into these checks so their tests were also adjusted. llvm-svn: 285860
* [RuntimeDyld] Move an X86 only test to the correct directory.Davide Italiano2016-11-021-0/+0
| | | | | | This is an attempt to placate the bots after r285841. llvm-svn: 285859
* Fix typo which broke debugging on older OSX systems after r285172.Dawn Perchik2016-11-021-1/+1
| | | | | | | | Reviewed by: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D26260 llvm-svn: 285858
* DCE math library calls with a constant operand.Eli Friedman2016-11-024-0/+249
| | | | | | | | | | | On platforms which use -fmath-errno, math libcalls without any uses require some extra checks to figure out if they are actually dead. Fixes https://llvm.org/bugs/show_bug.cgi?id=30464 . Differential Revision: https://reviews.llvm.org/D25970 llvm-svn: 285857
* Don't require nullability on template parameters in typedefs.Jordan Rose2016-11-022-1/+19
| | | | | | | | | | | | | | | | | | | Previously the following code would warn on the use of "T": template <typename T> struct X { typedef T *type; }; ...because nullability is /allowed/ on template parameters (because they could be pointers). (Actually putting nullability on this use of 'T' will of course break if the argument is a non-pointer type.) This fix doesn't handle the case where a template parameter is used /outside/ of a typedef. That seems trickier, especially in parameter position. llvm-svn: 285856
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-0276-181/+163
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* Fix Windows buildbot.Rui Ueyama2016-11-021-3/+3
| | | | llvm-svn: 285854
* [llvm-cov] Turn line numbers in html reports into clickable linksVedant Kumar2016-11-023-58/+60
| | | | llvm-svn: 285853
* [analyzer] StdLibraryFunctions: provide platform-specific function summaries.Artem Dergachev2016-11-022-58/+173
| | | | | | | | | | Because standard functions can be defined differently on different platforms, this commit introduces a method for constructing summaries with multiple variants, whichever matches better. It is also useful for supporting overloads. Differential Revision: https://reviews.llvm.org/D25940 llvm-svn: 285852
* Convert Out::InterpSection to In::InterpSection.Rui Ueyama2016-11-025-40/+37
| | | | | | Differential Revision: https://reviews.llvm.org/D26225 llvm-svn: 285851
* Reduce number of classes by merging DIHelper with ObjectFile.Rui Ueyama2016-11-023-57/+31
| | | | | | | | | | DIHelper is a class having only one member, and ObjectFile has a unique pointer to a DIHelper. So we can directly have ObjectFile have the member. Differential Revision: https://reviews.llvm.org/D26223 llvm-svn: 285850
* regcall: Implement regcall Calling Conv in clangErich Keane2016-11-0224-37/+441
| | | | | | | | | | This patch implements the register call calling convention, which ensures as many values as possible are passed in registers. CodeGen changes were committed in https://reviews.llvm.org/rL284108. Differential Revision: https://reviews.llvm.org/D25204 llvm-svn: 285849
* [Documentation] Fix Clang-tidy misc-use-after-move and cert-msc50-cpp style ↵Eugene Zelenko2016-11-022-4/+9
| | | | | | and misspelling. llvm-svn: 285848
* Remove KQueue.cppPavel Labath2016-11-024-136/+0
| | | | | | | | | | | | | Summary: This class is unused. Reviewers: clayborg Subscribers: mgorny, modocache, lldb-commits Differential Revision: https://reviews.llvm.org/D26237 llvm-svn: 285847
* [Hexagon] Remove registers coalesced in expand-condsets from live intervalsKrzysztof Parzyszek2016-11-022-0/+52
| | | | llvm-svn: 285846
* Add support for old versions of MacOS to libunwind. Fixes PR22203. Thanks to ↵Marshall Clow2016-11-021-4/+18
| | | | | | Jeremy for the bug report and the patch. llvm-svn: 285845
* [AMDGPU][mc] Improve test of special asm symbols.Artem Tamazov2016-11-021-31/+27
| | | | | | | | Test simplified. Coverage extended. Differential Revision: https://reviews.llvm.org/D26198 llvm-svn: 285844
* Fix crash in PseudoTerminal on Windows.Zachary Turner2016-11-021-6/+9
| | | | | | | Patch by Rudy Pons Differential Revision: https://reviews.llvm.org/D25681 llvm-svn: 285843
* [clang-tidy] Extend misc-use-after-move to support unique_ptr and shared_ptr.Martin Bohme2016-11-023-26/+153
| | | | | | | | | | | | | | Summary: As a unique_ptr or shared_ptr that has been moved from is guaranteed to be null, we only warn if the pointer is dereferenced. Reviewers: hokein, alexfh, aaron.ballman Subscribers: Prazek, cfe-commits Differential Revision: https://reviews.llvm.org/D26041 llvm-svn: 285842
* [lli/COFF] Set the correct alignment for common symbolsDavide Italiano2016-11-023-0/+18
| | | | | | | | | | Otherwise we set it always to zero, which is not correct, and we assert inside alignTo (Assertion failed: Align != 0u && "Align can't be 0."). Differential Revision: https://reviews.llvm.org/D26173 llvm-svn: 285841
* AMDGPU: Cleanup some xfailed testsMatt Arsenault2016-11-023-52/+10
| | | | | | Some of these are already fixed or tested somewhere else. llvm-svn: 285840
* [CMake] Support LLDB_TEST_CLANG in check-lldb target(s)Chris Bieneman2016-11-021-0/+4
| | | | | | This just hooks up the in-tree compiler to be optionally used when running the test suite. llvm-svn: 285839
* Find clang resource directory via *nix-style lookupChris Bieneman2016-11-023-21/+40
| | | | | | | | | | | | | | | | | Summary: This patch allows the Darwin build to fall back to to Posix-style lookups for the clang resource directory if the debugger library isn't inside a framework. The patch also includes a bit of refactoring and cleanup around the *nix resolution of the binary and lib directories to reuse the code instead of duplicating it. With this patch Darwin builds that don't build a framework only have 3 failing tests on my system (TestExec.py). Reviewers: zturner, labath, spyffe, tfiala Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26170 llvm-svn: 285838
* Fix build due to missing definition.Zachary Turner2016-11-021-1/+1
| | | | llvm-svn: 285837
* Add CodeViewRecordIO for reading and writing.Zachary Turner2016-11-0218-1152/+1190
| | | | | | | | | | | | | | | Using a pattern similar to that of YamlIO, this allows us to have a single codepath for translating codeview records to and from serialized byte streams. The current patch only hooks this up to the reading of CodeView type records. A subsequent patch will hook it up for writing of CodeView type records, and then a third patch will hook up the reading and writing of CodeView symbols. Differential Revision: https://reviews.llvm.org/D26040 llvm-svn: 285836
* AMDGPU: Allow additional implicit operands on MOVRELS instructionsNicolai Haehnle2016-11-022-1/+35
| | | | | | | | | | | | | | | | | | | Summary: The post-RA scheduler occasionally uses additional implicit operands when the vector implicit operand as a whole is killed, but some subregisters are still live because they are directly referenced later. Unfortunately, this seems incredibly subtle to reproduce. Fixes piglit spec/glsl-110/execution/variable-indexing/vs-temp-array-mat2-index-wr.shader_test and others. Reviewers: arsenm, tstellarAMD Subscribers: kzhuravl, wdng, yaxunl, tony-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D25656 llvm-svn: 285835
* Fix some warnings compiling with clang-cl on Windows.Zachary Turner2016-11-022-4/+3
| | | | llvm-svn: 285834
* Change task stealing to always get task from head of victim's deque.Andrey Churbanov2016-11-021-13/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D26187 llvm-svn: 285833
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-0213-23/+22
| | | | | | | | | | Reviewers: beanz, lattner, jlebar Subscribers: jholewinski, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D26235 llvm-svn: 285832
OpenPOWER on IntegriCloud