summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [Mips] Check all MIPS toolchains to find the one that best meets commandSimon Atanasyan2014-03-0416-0/+28
| | | | | | | | | | line arguments and directories tree. The old toolchain selection heuristics worked incorrectly when user has a reduced MIPS toolchain supports the O32 ABI only. Patch reviewed by Jonathan Roelofs, David Majnemer. llvm-svn: 202873
* Objective-C IRGen. Fix up the hueristics for determiningFariborz Jahanian2014-03-041-0/+64
| | | | | | | | if an ivar offset load is invariant iff inside an instance method and ivar belongs to instance method's class and one of its super class. // rdar://16095748 llvm-svn: 202872
* Tests for LLVM MS inline asm change r202865Reid Kleckner2014-03-041-0/+25
| | | | llvm-svn: 202866
* Give %itanium_abi_triple to the test to appease targeting msvc.NAKAMURA Takumi2014-03-041-1/+1
| | | | llvm-svn: 202803
* MS ABI: Reorganize some testsDavid Majnemer2014-03-042-90/+91
| | | | | | Move some c++11 specific tests to mangle-ms-cxx11 llvm-svn: 202790
* MS ABI: Mangle variable templates properlyDavid Majnemer2014-03-041-0/+8
| | | | | | | | | | | | | We wouldn't recognize variable templates as being templates leading us to leave the template arguments off of the mangled name. This would allow two unrelated templates to map to the same mangled name. N.B. While MSVC doesn't support variable templates as of this date, this mangling is the most likely thing they will choose to use. Their demangler can successfully demangle our manglings with the template arguments shown. llvm-svn: 202789
* DebugInfo: Make test (introduced in r202769) resilient to platforms that ↵David Blaikie2014-03-041-1/+1
| | | | | | default to -fstandalone-debug llvm-svn: 202780
* DebugInfo: Improvements/corrections to conservative emission of types in ↵David Blaikie2014-03-041-6/+14
| | | | | | | | | explicit template instantiation declarations * detect out of line definitions correctly * detect member function explicit specializations correctly llvm-svn: 202779
* Add triple to test. On Mac OS it was failing to generate debug info which ↵Pete Cooper2014-03-041-1/+1
| | | | | | matched the check lines llvm-svn: 202777
* Fix typo that resulted in names at TU scope getting lost sometimes after aRichard Smith2014-03-041-0/+8
| | | | | | module import. llvm-svn: 202771
* DebugInfo: Emit only the declaration of a class template that has an ↵David Blaikie2014-03-031-0/+72
| | | | | | | | | | | | | | | | | | | | | | | explicit instantiation declaration (& always emit such a type when there's an explicit instantiation definition) We should only have this optimization fire when the explicit instantiation definition would cause at least one member function to be emitted, thus ensuring that even a compiler not performing this optimization would still emit the full type information elsewhere. But we should also pessimize output still by always emitting the definition when the explicit instantiation definition appears so that at some point in the future we can depend on that information even when no code had to be emitted in that TU. (this shouldn't happen very often, since people mostly use explicit spec decl/defs to reduce code size - but perhaps one day they could use it to explicitly reduce debug info size too) This was worth about 2% for Clang and LLVM - so not a huge win, but a win. It looks really great for simple STL programs (include <string> and just declare a string - 14k -> 1.4k of .dwo) llvm-svn: 202769
* Objective-C. Fixes a regression when figuring out linkageFariborz Jahanian2014-03-031-0/+24
| | | | | | | for metadata symbols for forward referenced protocols which are never defined. // rdar://16203115 llvm-svn: 202761
* Improve diagnostics for malformed constructor declarations (where lookup forRichard Smith2014-03-031-1/+17
| | | | | | the type of the first parameter fails, and it is the only, unnamed, parameter). llvm-svn: 202759
* Schedule discriminator pass.Diego Novillo2014-03-031-1/+2
| | | | | | | This needs to modify a line table test to account for the new lexical block created to hold the new discriminator value. llvm-svn: 202754
* Re-fix previous commit.Jordan Rose2014-03-031-1/+1
| | | | | | Always run the test again, even for a trivial change... llvm-svn: 202747
* Remove absolute path from r202733.Jordan Rose2014-03-031-1/+1
| | | | llvm-svn: 202746
* [libclang] Have clang_getCursorSpelling() return the string for a ↵Argyrios Kyrtzidis2014-03-032-81/+88
| | | | | | | | CXCursor_ObjCStringLiteral or CXCursor_StringLiteral cursor. rdar://16206459 llvm-svn: 202745
* Serialized diagnostic severity levels should be stable.Jordan Rose2014-03-032-0/+20
| | | | | | | | | Serialized diagnostics were accidentally using the AST diagnostic level values rather than a dedicated stable enum, so the addition of "remark" broke the reading of existing serialized diagnostics files. I've added a .dia file generated from Xcode 5's Clang to make sure we don't break this in the future. llvm-svn: 202733
* Update tests for addition of patch level to LLVM versionTom Stellard2014-03-031-9/+9
| | | | llvm-svn: 202721
* AArch64: convert NEON tests to use CHECK-LABEL.Tim Northover2014-03-0313-2636/+2636
| | | | llvm-svn: 202703
* Revert "Preprocessor: Add __ALIGNOF_MAX_ALIGN_T__"David Majnemer2014-03-021-27/+0
| | | | | | | This commit reverts r201037, it's functionality is not needed given the definition of std::max_align_t in libcxx circa r201843. llvm-svn: 202667
* Normalize line endingsDavid Majnemer2014-03-029-234/+234
| | | | | | | Some files had CRLF line terminators, some only had a mixture of CRLF and LF. Switch to LF. llvm-svn: 202659
* Add a PPC inline asm constraint type for single CR bitsHal Finkel2014-03-021-0/+26
| | | | | | | | | | | | | | | | This adds support for the PPC "wc" inline asm constraint (used for allocating individual CR bits). Support for this constraint type was recently added to the LLVM PowerPC backend. Although gcc does not currently support allocating individual CR bits, this identifier choice has been coordinated with the gcc PowerPC team, and will be marked as reserved for this purpose in the gcc constraints.md file. Prior to this change, none of the multi-character PPC constraints were handled correctly (the '^' escape character was not being added as required by the parsing code in LLVM). This should now be fixed. I'll add tests for these other constraints as support is added for them in the backend. llvm-svn: 202658
* Add [extern_c] attribute for modules, allowing a C module to be imported ↵Richard Smith2014-03-026-0/+77
| | | | | | within an extern "C" block in C++ code. llvm-svn: 202615
* Fixed an assertion failure related to bitfield lowering.Warren Hunt2014-03-011-0/+13
| | | | | | | | | When lowering a bitfield, CGRecordLowering would assign the wrong storage type to a bitfield in some cases and trigger an assertion. In these cases the layout was still correct, just the bitfield info was wrong. llvm-svn: 202562
* If a module A exports a macro M, and a module B imports that macro and #undef'sRichard Smith2014-03-018-8/+163
| | | | | | | | | | | | | | it, importers of B should not see the macro. This is complicated by the fact that A's macro could also be visible through a different path. The rules (as hashed out on cfe-commits) are included as a documentation update in this change. With this, the number of regressions in libc++'s testsuite when modules are enabled drops from 47 to 7. Those remaining 7 are also macro-related, and are due to remaining bugs in this change (in particular, the handling of submodules is imperfect). llvm-svn: 202560
* [analyzer] Fix for PR18394.Anton Yartsev2014-02-281-0/+16
| | | | | | Additional conditions that prevent useful nodes before call from being reclaimed. llvm-svn: 202553
* Reapply fixed "Honour 'use-external-names' in FileManager"Ben Langmuir2014-02-284-0/+47
| | | | | | | | | | | | | | | | Was r202442 There were two issues with the original patch that have now been fixed. 1. We were memset'ing over a FileEntry in a test case. After adding a std::string to FileEntry, this still happened to not break for me. 2. I didn't pass the FileManager into the new compiler instance in compileModule. This was hidden in some cases by the fact I didn't clear the module cache in the test. Also, I changed the copy constructor for FileEntry, which was memcpy'ing in a (now) unsafe way. llvm-svn: 202539
* Tests for lexing of digit separators versus UCNs.Richard Smith2014-02-281-0/+20
| | | | llvm-svn: 202534
* Fix a minor bug in lexing pp-numbers with digit separators: if a pp-number ↵Richard Smith2014-02-281-0/+2
| | | | | | contains "'e+", the pp-number ends between the 'e' and the '+'. llvm-svn: 202533
* When completing Objective-C instance method invocations, perform a ↵Anders Carlsson2014-02-281-0/+46
| | | | | | contextual conversion to an Objective-C pointer type of the target expression if needed. This fixes code completion of method invocations where the target is a smart pointer that has an explicit conversion operator to an Objective-C type. llvm-svn: 202529
* Don't suggest non-static methods as corrections when they obviouslyKaelyn Uhrain2014-02-281-0/+9
| | | | | | | won't work (i.e. when not doing a member lookup and not in a method from the same class or a descendant class). llvm-svn: 202520
* Adding a test case to ensure that type attributes applied to the ↵Aaron Ballman2014-02-281-1/+5
| | | | | | decl-specifier are applied across all declarations in a group. llvm-svn: 202501
* CFG: Also apply the filter to the first block in a FilteredCFGBlockIterator.Benjamin Kramer2014-02-281-0/+7
| | | | | | PR18999. llvm-svn: 202491
* Add a testcase for r202437.Bob Wilson2014-02-282-0/+20
| | | | llvm-svn: 202468
* Fix crash with enable_if on constructors.Nick Lewycky2014-02-281-0/+7
| | | | llvm-svn: 202467
* Add support for OpenBSD SPARC assembler.Rafael Espindola2014-02-281-0/+6
| | | | | | Patch by Brad Smith. llvm-svn: 202462
* Add a -Wclass-varargs to warn on objects of any class type being passed ↵Richard Smith2014-02-281-0/+48
| | | | | | | | | | | | through an ellipsis. Since C++11 relaxed the rules on this, we allow a lot more bad code through silently, such as: const char *format = "%s"; std::experimental::string_view view = "foo"; printf(format, view); In this case, not only warn about a class type being used here, but also suggest that calling c_str() might be a good idea. llvm-svn: 202461
* -fdump-record-layouts: Sort nvbases by offset before printing themReid Kleckner2014-02-283-16/+16
| | | | | | It makes our -fdump-record-layouts a little more sane. llvm-svn: 202457
* Add -mcrbits/-mno-crbits to control the PowerPC CR-bit-tracking featureHal Finkel2014-02-281-0/+6
| | | | | | | The backend currently enables CR-bit tracking by default at -O2 and higher. These flags allow the user to override that default. llvm-svn: 202453
* Revert "Honour 'use-external-names' in FileManager"Ben Langmuir2014-02-273-46/+0
| | | | | | Revert r202442, which broke the buildbots. llvm-svn: 202443
* Honour 'use-external-names' in FileManagerBen Langmuir2014-02-273-0/+46
| | | | | | | | Pass through the externally-visible names that we got from the VFS down to FileManager, and test that this is the name showing up in __FILE__, diagnostics, and debug information. llvm-svn: 202442
* [-Wunreachable-code] always treat 'case:' and 'default:' cases as reachable.Ted Kremenek2014-02-271-0/+3
| | | | | | | | | | | This is a heuristic. Many switch statements, although they look covered over an enum, may actually handle at runtime more values than in the enum. This is overly conservative, as there are some cases that clearly can be ruled as being clearly unreachable, e.g. 'switch (42) { case 1: ... }'. We can refine this later. llvm-svn: 202436
* [CFG] record the original (now unreachable) block of 'case:' and 'default:' ↵Ted Kremenek2014-02-271-3/+4
| | | | | | cases. llvm-svn: 202435
* Diagnose attempts to apply ms_struct to records with base classesJohn McCall2014-02-271-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | or virtual functions, but permit that error to be downgraded to a warning (with -Wno-error=incompatible-ms-struct), and officially support this kind of dual, ABI-mixing layout. The basic problem here is that projects which use ms_struct are often not very circumspect about what types they annotate; for example, some projects enable the pragma in a prefix header and then only selectively disable it around system header inclusions. They may only care about binary compatibility with MSVC for a subset of those structs, but that doesn't mean they have no binary compatibility concerns at all for the rest; thus we are essentially forced into supporting this hybrid ABI. But it's reasonable for us to at least point out the places where we're not making any guarantees. The original diagnostic was for dynamic classes, i.e. those with virtual functions or virtual bases; I've extended it to include all classes with bases, because we are not actually making any attempt to duplicate MSVC's base subobject layout in ms_struct (and it is indeed quite different from Itanium, even for non-virtual bases). rdar://16178895 llvm-svn: 202427
* MS ABI: Fix vftable mangling by using the vbtable name algorithmReid Kleckner2014-02-272-20/+29
| | | | | | | | | | | | | | | | | | Summary: This merges VFPtrInfo and VBTableInfo into VPtrInfo, since they hold almost the same information. With that change, the vbtable mangling code can easily be applied to vftable data and we magically get the correct, unambiguous vftable names. Fixes PR17748. Reviewers: timurrrr, majnemer CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2893 llvm-svn: 202425
* Use private linkage for globals we already name with \01L and \01l.Rafael Espindola2014-02-2721-137/+137
| | | | | | | | | | | | In llvm the only semantic difference between internal and private is that llvm tries to hide private globals my mangling them with a private prefix. Since the globals changed by this patch already had the magic don't mangle marker, there should be no change in the generated assembly. A followup patch should then be able to drop the \01L and \01l prefixes and let llvm mangle as appropriate. llvm-svn: 202419
* libclang: New functions clang_Type_getNumTemplateArguments,Dmitri Gribenko2014-02-271-29/+68
| | | | | | | | | | clang_Type_getTemplateArgument Note that these functions don't handle variadic templates -- see tests. Patch by Matthieu Nottale and Philippe Daouadi. llvm-svn: 202406
* [OPENMP] First changes for Parsing and Sema for 'omp simd' directive supportAlexey Bataev2014-02-272-0/+148
| | | | llvm-svn: 202360
* [-Wunreachable-code] Don't warn about trivially unreachable return ↵Ted Kremenek2014-02-271-0/+13
| | | | | | statements preceded by 'noreturn' functions. llvm-svn: 202352
OpenPOWER on IntegriCloud