summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* ignore -mconstructor-aliases when adding field paddings for asanKostya Serebryany2014-10-311-0/+25
| | | | | | | | | | | | | | | | | | Summary: When we are adding field paddings for asan even an empty dtor has to remain in the code, so we ignore -mconstructor-aliases if the paddings are going to be added. Test Plan: added a test Reviewers: rsmith, rnk, rafael Reviewed By: rafael Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6038 llvm-svn: 220986
* Fix ARM HVA classification of classes with non-virtual basesReid Kleckner2014-10-313-40/+99
| | | | | | | | | | | | | | | | Reuse the PPC64 HVA detection algorithm for ARM and AArch64. This is a nice code deduplication, since they are roughly identical. A few virtual method extension points are needed to understand how big an HVA can be and what element types it can have for a given architecture. Also make the record expansion code work in the presence of non-virtual bases. Reviewed By: uweigand, asl Differential Revision: http://reviews.llvm.org/D6045 llvm-svn: 220972
* [AArch64]Add 2 intrinsics vmov_n_p64/vmovq_n_p64, the alias for ↵Hao Liu2014-10-311-0/+12
| | | | | | | | vdup_n_p64/vdup_n_p64. As this change is too small, commit it directly. llvm-svn: 220946
* [modules] When a .pcm file is explicitly built separately from the translationRichard Smith2014-10-311-0/+7
| | | | | | unit, allow the -O settings of the two compilations to differ. llvm-svn: 220943
* Refactor tree printing in AST dumping.Richard Smith2014-10-301-2/+2
| | | | | | | | | | | Instead of manually maintaining a flag indicating whether we're about to print out the last child of the parent node (to determine whether we print "`" or "|"), capture a callable to print that child and defer printing it until we either see a next child or finish the parent. No functionality change intended. llvm-svn: 220930
* Follow-up to r216619: use isCXXCLassMember() instead of trying toHans Wennborg2014-10-292-2/+22
| | | | | | | check the context ourselves when selectively allowing late-added dll attributes on unused free functions and variables (PR20746) llvm-svn: 220874
* test: generalise the test matchingSaleem Abdulrasool2014-10-291-3/+3
| | | | | | The value names may change in different builds, use pattern based tests. llvm-svn: 220861
* CodeGen: add __readfsdword builtinSaleem Abdulrasool2014-10-291-1/+14
| | | | | | | | | The Windows NT SDK uses __readfsdword and declares it as a compiler provided builtin (#pragma intrinsic(__readfsword). Because intrin.h is not referenced by winnt.h, it is not possible to provide an out-of-line definition for the intrinsic. Provide a proper compiler builtin definition. llvm-svn: 220859
* Pass aggregates on the stack without splitting in NVPTX.Eli Bendersky2014-10-291-4/+30
| | | | | | | | | | | Following the NVVM IR specifications, arguments of aggregate type should be passed on the stack without splitting (byval). http://reviews.llvm.org/D6020 Patch by Jacques Pienaar. llvm-svn: 220854
* [PowerPC ABI] Bug 21398 - Consider C++ base classes in HA classificationUlrich Weigand2014-10-291-0/+39
| | | | | | | | As discussed in bug 21398, PowerPC ABI code needs to consider C++ base classes when classifying a class as homogeneous aggregate (or not) for ABI purposes. llvm-svn: 220852
* clang/test/CodeGen/captured-statements-nested.c: Tweak for -Asserts.NAKAMURA Takumi2014-10-291-1/+1
| | | | llvm-svn: 220851
* Improved capturing variable-length array types in CapturedStmt.Alexey Bataev2014-10-292-38/+47
| | | | | | | | An updated implemnentation of VLA types capturing based on previously committed solution for Lambdas. This version captures the whole VLA type instead of particular variables which are part of VLA size expression and allows to use previusly calculated size of VLA type in captured regions. Required for OpenMP. Differential Revision: http://reviews.llvm.org/D5099 llvm-svn: 220850
* Objective-C modern rewriter. Patch to fix a rewriting bug Fariborz Jahanian2014-10-283-2/+5
| | | | | | | rewriting an Objective-C block. Patch by Ryan Govostes. rdar://18799145 llvm-svn: 220834
* The dllimport.cpp test was gating some checks on #ifndef MSABI,Hans Wennborg2014-10-281-8/+12
| | | | | | | | | but MSABI was never defined in the test. It seems we are erroring on code that we should be accepting when compiling for MSVC compatibility. This should make the test less confusing until PR21406 is fixed. llvm-svn: 220825
* Objective-C. revert patch for rdar://17554063.Fariborz Jahanian2014-10-286-62/+27
| | | | llvm-svn: 220812
* Actually remove this test entirely.Fariborz Jahanian2014-10-281-0/+0
| | | | llvm-svn: 220803
* [Objective-C]. revert r220740,r220727Fariborz Jahanian2014-10-281-41/+0
| | | | llvm-svn: 220802
* PR17730: Add test that we don't crash on this testcase. (The bug is already ↵Richard Smith2014-10-281-0/+11
| | | | | | fixed.) llvm-svn: 220787
* PR21367: Don't accept rvalue references as an extension in C++98 mode if ↵Richard Smith2014-10-281-0/+4
| | | | | | we're in a new-type-id or conversion-type-id, since those things can legitimately be followed by a binary && operator. llvm-svn: 220785
* Extend test to check that -D flags do not leak across module boundaries.Richard Smith2014-10-281-3/+20
| | | | llvm-svn: 220782
* [modules] Allow -I, -D, -W flags to change between building a module andRichard Smith2014-10-281-0/+27
| | | | | | | | explicitly using the resulting .pcm file. Unlike for an implicit module build, we don't need nor want to require these flags to match between the module and its users. llvm-svn: 220780
* clang/test/Modules/explicit-build.cpp: Tweak to meet win32's backslash.NAKAMURA Takumi2014-10-281-1/+1
| | | | llvm-svn: 220770
* Fix warning text: lower -> higherRichard Trieu2014-10-281-2/+2
| | | | llvm-svn: 220763
* Driver: remove a stray s that propagated in cross-windowsSaleem Abdulrasool2014-10-281-7/+7
| | | | | | The option is '--allow-multiple-definition' not '--allow-multiple-definitions'. llvm-svn: 220760
* Improve on the diagnostic in my last patch and change warningFariborz Jahanian2014-10-271-1/+1
| | | | | | to error. rdar://18768214. llvm-svn: 220740
* [modules] Load .pcm files specified by -fmodule-file lazily.Richard Smith2014-10-271-59/+63
| | | | llvm-svn: 220731
* Objective-C ARC [qoi]. Issue diagnostic if __bridge castingFariborz Jahanian2014-10-271-0/+41
| | | | | | to C type a collection literal. rdar://18768214 llvm-svn: 220727
* Frontend: Define __EXCEPTIONS if -fexceptions is passedDavid Majnemer2014-10-272-3/+6
| | | | | | | | | GCC defines __EXCEPTIONS, regardless of language mode, if -fexceptions is passed. We should do the same. This fixes PR21358. llvm-svn: 220714
* Do not insert asan paddings after fields that have flexible arrays.Kostya Serebryany2014-10-271-0/+30
| | | | | | | | | | | | | | | | | | | Summary: We should avoid a tail padding not only if the last field has zero size but also if the last field is a struct with a flexible array. If/when http://reviews.llvm.org/D5478 is committed, this will also handle the case of structs with zero-sized arrays. Reviewers: majnemer, rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5924 llvm-svn: 220708
* c++11 patch to issue warning on missing 'override' on Fariborz Jahanian2014-10-272-5/+6
| | | | | | | overriding methods. Patch review by Richard Smith. rdar://18295240 llvm-svn: 220703
* Wire up LookupMemberExpr to use the new TypoExpr.Kaelyn Takata2014-10-274-8/+53
| | | | | | | | This includes adding the new TypoExpr-based lazy typo correction to LookupMemberExprInRecord as an alternative to the existing eager typo correction. llvm-svn: 220698
* Prune CRLF.NAKAMURA Takumi2014-10-2710-378/+378
| | | | llvm-svn: 220678
* test: attempt to make test more hermeticSaleem Abdulrasool2014-10-252-19/+14
| | | | | | | | Add a fake linker in to a sysroot to use for testing the driver's tool invocation. Should make the test behave similarly on all platforms. Addresses review comments from Reid Kleckner from SVN r220546. llvm-svn: 220625
* Lex: Fix an invalid access into a SmallStringDavid Majnemer2014-10-251-0/+8
| | | | | | | | | | | | | We would crash because we used operator[] to access past the end of a SmallString. This occured because our token had length zero. Instead, form the pointer using .data() and arithmetic. This is safe because this forms a one-past-the-end pointer and it is only used to compare with another one-past-the-end pointer. This fixes PR21379. llvm-svn: 220614
* Make this test a bit stricter by checking clang's output too.Rafael Espindola2014-10-251-1/+1
| | | | llvm-svn: 220604
* CodeGen: Don't form weak dllexport aliasesDavid Majnemer2014-10-241-2/+9
| | | | | | | | | | | The MS linker cannot do anything interesting with these, it doesn't make sense to emit them. This fixes PR21373. Differential Revision: http://reviews.llvm.org/D5986 llvm-svn: 220595
* test: correct an overzealous search-and-replaceSaleem Abdulrasool2014-10-241-2/+2
| | | | | | | The temporary initialized is referenced as %0, not as the auto-release pool. Fixes R+A tests. llvm-svn: 220593
* CodeGen: correct materialize temporary aggregates in ARC modeSaleem Abdulrasool2014-10-241-0/+57
| | | | | | | | | | | | | | | | | | Avoid an assertion when materializing a lifetime type aggregate temporary. When performing CodeGen for ObjC++, we could generate a lifetime-only aggregate temporary by using an initializer list (which is effectively an array). We would reach through the temporary expression, fishing out the inner expression. If this expression was a lifetime expression, we would attempt to emit this as a scalar. This would eventually result in an assertion as the emission would eventually assert that the expression being emitted has a scalar evaluation kind. Add a case to handle the aggregate expressions. Use the EmitAggExpr to emit the aggregate expression rather than the EmitScalarInit. Addresses PR21347. llvm-svn: 220590
* [modules] Support combining 'textual' with 'private'.Richard Smith2014-10-244-1/+22
| | | | llvm-svn: 220589
* Itanium ABI: Template template parameters are usable as substitutionsDavid Majnemer2014-10-241-0/+22
| | | | | | | | | | | | | Template template parameters weren't added to the list of substitutions. This would make the substitution map contain inaccurate mappings, leading to Clang violating the Itanium ABI and breaking compatibility with GCC. This fixes PR21351. Differential Revision: http://reviews.llvm.org/D5959 llvm-svn: 220588
* test: add -std=c++11Saleem Abdulrasool2014-10-241-1/+1
| | | | | | | This test uses C++11 features (r-value references) in ObjC++. Add a -std=c++11 to silence a warning. NFC. llvm-svn: 220586
* CodeGen: GLValue exprs in template parameters should have reference typeDavid Majnemer2014-10-241-0/+10
| | | | | | | | This fixes a corner-case where __uuidof as a template argument would result in us trying to emit a GLValue as an RValue. This would lead to a crash down the road. llvm-svn: 220585
* Fix windows-cross.c test on my machineReid Kleckner2014-10-241-8/+8
| | | | | | I suspect it will need a custom sysroot to pass reliably elsewhere. llvm-svn: 220576
* Add frontend support for __vectorcallReid Kleckner2014-10-247-10/+35
| | | | | | | | | | | | | Wire it through everywhere we have support for fastcall, essentially. This allows us to parse the MSVC "14" CTP headers, but we will miscompile them because LLVM doesn't support __vectorcall yet. Reviewed By: Aaron Ballman Differential Revision: http://reviews.llvm.org/D5808 llvm-svn: 220573
* [mips] Mark aggregate arguments passed in registers with the inreg attributeDaniel Sanders2014-10-244-15/+15
| | | | | | | | | | | | | | | | | | | Summary: This allows us to easily identify them in the backend which in turn allows us to handle them correctly for big-endian targets (where they must be shifted into the upper bits of the register). Depends on D5961 Reviewers: atanasyan Reviewed By: atanasyan Subscribers: cfe-commits, theraven Differential Revision: http://reviews.llvm.org/D5962 llvm-svn: 220566
* [mips] Promote all integral/enumeration types to the GPR widthDaniel Sanders2014-10-244-27/+27
| | | | | | | | | | | | | | | | | | Summary: Ensure all integral/enumeration types are appropriately annotated with signext/zeroext. In particular, i32 now has these attributes when using the N32/N64 ABI. This paves the way for accurately representing the way the N32/N64 ABI's promotes integer arguments to i64. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: cfe-commits, theraven Differential Revision: http://reviews.llvm.org/D5961 llvm-svn: 220563
* Report when a function-try-block does not return a value on all control ↵Aaron Ballman2014-10-241-2/+19
| | | | | | paths. Fixed PR14620. llvm-svn: 220557
* [Thumb] Clang thinks "char" is signed when using a thumb tripleOliver Stannard2014-10-241-0/+1
| | | | | | | | 'char' is unsigned on all ARM and Thumb architectures. Clang gets this right for ARM, and for thumb when using and arm triple and the -mthumb option, but gets it wrong for thumb triples. This fixes that. llvm-svn: 220555
* Driver: add CrossWindowsToolChainSaleem Abdulrasool2014-10-241-0/+40
| | | | | | | | | | | | | | | | | | | | This is a very basic toolchain. It supports cross-compiling Windows (primarily inspired by the WoA target). It is meant to use clang with the LLVM IAS and a binutils ld-compatible interface for the linker (eventually to be lld). It does not perform any "standard" GCC lookup, nor does it perform any special adjustments given that it is expected to be used in an environment where the user is using MSVCRT (and as such Visual Studio headers) and the Windows SDK. The primary runtime library is expected to be compiler-rt and the C++ implementation to be libc++. It also expects that a sysroot has been setup given the usual Unix semantics (standard C headers in /usr/include, all the import libraries available in /usr/lib). It also expects that an entry point stub is present in /usr/lib (crtbegin.obj for executables, crtbeginS.obj for shared libraries). The entry point stub is responsible for running any GNU constructors. llvm-svn: 220546
* Add a new -fmerge-functions -cc1 flag that enables function merging.Nick Lewycky2014-10-241-0/+14
| | | | llvm-svn: 220543
OpenPOWER on IntegriCloud