aboutsummaryrefslogtreecommitdiff
path: root/clang/test
AgeCommit message (Collapse)AuthorFilesLines
2014-04-25Merging r198940 (second try):llvmorg-3.4.1-rc2llvmorg-3.4.1Tom Stellard1-0/+9
------------------------------------------------------------------------ r198940 | kristof.beyls | 2014-01-10 08:44:34 -0500 (Fri, 10 Jan 2014) | 2 lines Enable -fuse-init-array for all AArch64 ELF targets by default, not just linux. ------------------------------------------------------------------------ llvm-svn: 207288
2014-04-21Revert "Merging r198940:"Tom Stellard1-9/+0
This reverts commit r206064. This commit regressed the MultiSource/Applications/sgefa/sgefa test. llvm-svn: 206783
2014-04-11Merging r196981:Tom Stellard1-2/+8
------------------------------------------------------------------------ r196981 | fang | 2013-12-10 17:51:25 -0500 (Tue, 10 Dec 2013) | 2 lines darwin asm driver: suppress -Q for -no-integrated-as on darwin<11 ------------------------------------------------------------------------ llvm-svn: 206067
2014-04-11Merging r204742:Tom Stellard1-1/+22
------------------------------------------------------------------------ r204742 | benny.kra | 2014-03-25 14:02:07 -0400 (Tue, 25 Mar 2014) | 10 lines Fix an logic error in the clang driver preventing crtfastmath.o from linking when -Ofast is used without -ffast-math In gcc using -Ofast forces linking of crtfastmath.o. In the current clang crtfastmath.o is only linked when -ffast-math/-funsafe-math-optimizations passed. It can lead to performance issues, when using only -Ofast without explicit -ffast-math (I faced with it). My patch fixes inconsistency with gcc behaviour and also introduces few tests on it. Patch by Zinovy Nis! Differential Revision: http://llvm-reviews.chandlerc.com/D3114 ------------------------------------------------------------------------ llvm-svn: 206066
2014-04-11Merging r198940:Tom Stellard1-0/+9
------------------------------------------------------------------------ r198940 | kristof.beyls | 2014-01-10 08:44:34 -0500 (Fri, 10 Jan 2014) | 2 lines Enable -fuse-init-array for all AArch64 ELF targets by default, not just linux. ------------------------------------------------------------------------ llvm-svn: 206064
2014-04-11Merging r203007:Tom Stellard1-2/+18
------------------------------------------------------------------------ r203007 | rafael.espindola | 2014-03-05 16:04:41 -0500 (Wed, 05 Mar 2014) | 4 lines Don't produce an alias between destructors with different calling conventions. Fixes pr19007. ------------------------------------------------------------------------ llvm-svn: 206059
2014-04-11Merging r205144:Tom Stellard1-0/+4
------------------------------------------------------------------------ r205144 | hfinkel | 2014-03-30 09:00:06 -0400 (Sun, 30 Mar 2014) | 7 lines [PowerPC] Make -pg generate calls to _mcount not mcount At least on REL6 (Linux/glibc 2.12), the proper symbol for generating gprof data is _mcount, not mcount. Prior to this change, compiling with -pg would generate linking errors (because of unresolved references to mcount), after this change -pg seems at least minimally functional. ------------------------------------------------------------------------ llvm-svn: 206058
2014-04-08Merging r197577:Tom Stellard1-0/+3
------------------------------------------------------------------------ r197577 | rafael.espindola | 2013-12-18 10:16:50 -0500 (Wed, 18 Dec 2013) | 4 lines Add -f64:32:64 to the darwin ppc32 DataLayout. A f64 inside a struct can be 32 bit aligned on darwin. ------------------------------------------------------------------------ llvm-svn: 205788
2014-04-08Merging r203050:Tom Stellard1-19/+19
------------------------------------------------------------------------ r203050 | rtrieu | 2014-03-05 20:09:03 -0500 (Wed, 05 Mar 2014) | 4 lines Change the color of comment nodes from bright yellow to blue. Bright yellow on a white background is difficult to read. Also include a chart showing which colors are used by which elements in the AST dump. ------------------------------------------------------------------------ llvm-svn: 205786
2014-04-08Merging r200953:Tom Stellard1-0/+9
------------------------------------------------------------------------ r200953 | rtrieu | 2014-02-06 18:26:23 -0500 (Thu, 06 Feb 2014) | 3 lines Fixes PR18762, stop the StmtPrinter for ObjCPropertyRefExpr from crashing on certain receiver types. ------------------------------------------------------------------------ llvm-svn: 205785
2014-04-08Merging r197445:Tom Stellard1-0/+8
------------------------------------------------------------------------ r197445 | rtrieu | 2013-12-16 19:40:40 -0500 (Mon, 16 Dec 2013) | 4 lines For -Wconsumed, walk the namespaces to find if the top most namespace is "std" to determine if a move function is the std::move function. This allows functions like std::__1::move to also be treated a the move function. ------------------------------------------------------------------------ llvm-svn: 205784
2014-04-08Merging r197428:Tom Stellard1-0/+19
------------------------------------------------------------------------ r197428 | rtrieu | 2013-12-16 16:41:30 -0500 (Mon, 16 Dec 2013) | 2 lines Fix PR18260 - Make std::move handling in -Wconsumed only trigger on std::move ------------------------------------------------------------------------ llvm-svn: 205783
2014-03-19Merging r203025:Tom Stellard1-0/+10
------------------------------------------------------------------------ r203025 | richard-llvm | 2014-03-05 15:32:50 -0800 (Wed, 05 Mar 2014) | 3 lines PR19010: Make sure we initialize (empty) indirect base class subobjects when evaluating trivial default initialization of a literal class type. llvm-svn: 204263
2014-03-17Merging r200954:Tom Stellard1-1/+16
------------------------------------------------------------------------ r200954 | richard-llvm | 2014-02-06 15:35:16 -0800 (Thu, 06 Feb 2014) | 9 lines Temporary fix for PR18473: Don't try to evaluate the initializer for a type-dependent variable, even if the initializer isn't value-dependent. This happens for ParenListExprs composed of non-value-dependent subexpressions, for instance. We should really give ParenListExprs (and InitListExprs) the type of the initialized entity if they're used to represent a dependent initialization (and if so, set them to be type-, value- and instantiation-dependent). llvm-svn: 204050
2014-03-13Merging r202721:Tom Stellard1-9/+9
------------------------------------------------------------------------ r202721 | thomas.stellard | 2014-03-03 07:22:14 -0800 (Mon, 03 Mar 2014) | 2 lines Update tests for addition of patch level to LLVM version llvm-svn: 203870
2013-12-23---Merging r196453Bill Wendling1-0/+6
Parse: Recover better from bad definitions with base specifiers We would skip until the next comma, hoping good things whould lie there, however this would fail when we have such things as this: struct A {}; template <typename> struct D; template <> struct D<C> : B, A::D; Once this happens, we would believe that D with a nested namespace specifier of A was a variable that was being declared. We would go on to complain that there was an extraneous 'template <>' on their variable declaration. Crashes would happen when 'A' gets defined as 'enum class A {}' as various asserts would fire. Instead, we should skip up until the semicolon if we see that we are in the middle of a definition and the current token is a ':' This fixes PR17084. llvm-svn: 197905
2013-12-17Merging r197409:Bill Wendling1-0/+18
------------------------------------------------------------------------ r197409 | rikka | 2013-12-16 11:19:18 -0800 (Mon, 16 Dec 2013) | 4 lines Make Sema::BuildCXXNestedNameSpecifier correctly clear the previous CXXScopeSpec when necessary while performing typo correction. This fixes the crash reported in PR18213 (the problem existed since r185487, and r193020 made it easier to hit). ------------------------------------------------------------------------ llvm-svn: 197463
2013-12-16Merging r196212:Bill Wendling4-3/+10
------------------------------------------------------------------------ r196212 | alp | 2013-12-02 22:13:01 -0800 (Mon, 02 Dec 2013) | 22 lines Emit an extension warning when changing system header tokens clang converts keywords to identifiers for compatibility with various system headers such as GNU libc. Implement a -Wkeyword-compat extension warning to diagnose those cases. The warning is on by default but will generally be ignored in system headers. It can however be enabled globally to aid standards conformance testing. This also changes the __uptr keyword avoidance from r195710 to no longer special-case system headers, bringing it in line with other similar workarounds in clang. Implementation returns bool for symmetry with token annotation functions. Some examples: warning: keyword '__is_pod' will be treated as an identifier for the remainder of the translation unit [-Wkeyword-compat] struct __is_pod warning: keyword '__uptr' will be treated as an identifier here [-Wkeyword-compat] union w *__uptr; ------------------------------------------------------------------------ llvm-svn: 197359
2013-12-14Merging r197298:Bill Wendling1-0/+49
------------------------------------------------------------------------ r197298 | rsmith | 2013-12-13 17:04:22 -0800 (Fri, 13 Dec 2013) | 3 lines PR18232: implement instantiation for class-scope explicit specializations of class templates (a Microsoft extension). ------------------------------------------------------------------------ llvm-svn: 197320
2013-12-14Merging r197305:Bill Wendling1-0/+19
------------------------------------------------------------------------ r197305 | rsmith | 2013-12-13 19:18:05 -0800 (Fri, 13 Dec 2013) | 7 lines PR18246: When performing template argument deduction to decide which template is specialized by an explicit specialization, start from the first declaration in case we've got a member of a class template (redeclarations might not number the template parameters the same way). Our recover here is still far from ideal. ------------------------------------------------------------------------ llvm-svn: 197319
2013-12-11Merging r196995:Bill Wendling1-0/+106
------------------------------------------------------------------------ r196995 | rsmith | 2013-12-10 17:40:16 -0800 (Tue, 10 Dec 2013) | 5 lines When performing an array new of a multidimensional array with an initializer list, each element of the initializer list may provide more than one of the base elements of the array. Be sure to initialize the right type and bump the array pointer by the right amount. ------------------------------------------------------------------------ llvm-svn: 197005
2013-12-10Merging r196852:Bill Wendling1-1/+8
------------------------------------------------------------------------ r196852 | majnemer | 2013-12-09 16:40:58 -0800 (Mon, 09 Dec 2013) | 10 lines Sema: Enforce C++11 pointer-to-member template arguments should rules The standard is pretty clear on what it allows inside of template arguments for non-type template parameters of pointer-to-member. They must be of the form &qualified-id and cannot come from sources like constexpr VarDecls or things of that nature. This fixes PR18192. ------------------------------------------------------------------------ llvm-svn: 196885
2013-12-10Merging r196771:Bill Wendling1-0/+38
------------------------------------------------------------------------ r196771 | majnemer | 2013-12-09 02:44:32 -0800 (Mon, 09 Dec 2013) | 17 lines [-cxx-abi microsoft] Mangle large integral constants correctly Testing has revealed that large integral constants (i.e. > INT64_MAX) are always mangled as-if they are negative, even in places where it would not make sense for them to be negative (like non-type template parameters of type unsigned long long). To address this, we change the way we model number mangling: always mangle as-if our number is an int64_t. This should result in correct results when we have large unsigned numbers. N.B. Bizarrely, things that are 32-bit displacements like vbptr offsets are mangled as-if they are unsigned 32-bit numbers. This is a pretty egregious waste of space, it would be a 4x savings if we could mangle it like a signed 32-bit number. Instead, we explicitly cast these displacements to uint32_t and let the mangler proceed. ------------------------------------------------------------------------ llvm-svn: 196878
2013-12-09Merging r195495:Manman Ren1-0/+8
------------------------------------------------------------------------ r195495 | mren | 2013-11-22 11:42:45 -0800 (Fri, 22 Nov 2013) | 5 lines Debug Info: add a "Debug Info Version" module flag to output the current debug info version number. Will error out when modules have different version numbers. ------------------------------------------------------------------------ llvm-svn: 196812
2013-12-09Merging r196599:Bill Wendling1-0/+6
------------------------------------------------------------------------ r196599 | zaks | 2013-12-06 11:28:16 -0800 (Fri, 06 Dec 2013) | 5 lines Fixup to r196593. This is another regression fixed by reverting r189090. In this case, the problem is not live variables but the approach that was taken in r189090. This regression was caused by explicitly binding "true" to the condition when we take the true branch. Normally that's okay, but in this case we're planning to reuse that condition as the value of the expression. ------------------------------------------------------------------------ llvm-svn: 196796
2013-12-09Merging r196593:Bill Wendling3-10/+65
------------------------------------------------------------------------ r196593 | zaks | 2013-12-06 10:56:29 -0800 (Fri, 06 Dec 2013) | 7 lines Revert "[analyzer] Refactor conditional expression evaluating code" This reverts commit r189090. The original patch introduced regressions (see the added live-variables.* tests). The patch depends on the correctness of live variable analyses, which are not computed correctly. I've opened PR18159 to track the proper resolution to this problem. The patch was a stepping block to r189746. This is why part of the patch reverts temporary destructor tests that started crashing. The temporary destructors feature is disabled by default. ------------------------------------------------------------------------ llvm-svn: 196795
2013-12-09Remove stray parts of (reverted on trunk) r196205 that are causing testTim Northover1-18/+0
failures. llvm-svn: 196774
2013-12-09Merging r196724:Bill Wendling1-0/+5
------------------------------------------------------------------------ r196724 | tnorthover | 2013-12-08 07:24:55 -0800 (Sun, 08 Dec 2013) | 5 lines ARM: teach Sema that "r" can match 64-bit values We already support using "r" on 64-bit values (a GPRPair is allocated), but Sema doesn't know this yet so issues a warning. This should fix it. ------------------------------------------------------------------------ llvm-svn: 196746
2013-12-09Merging r196712:Bill Wendling1-0/+14
------------------------------------------------------------------------ r196712 | rafael | 2013-12-07 17:13:22 -0800 (Sat, 07 Dec 2013) | 12 lines Fix pr18174. Clang outputs LLVM one top level decl at a time. This combined with the visibility computation code looking for the newest NamespaceDecl would cause it to produce different results for nested namespaces. The two options for producing consistent results are * Delay codegen of anything inside a namespace until the end of the file. * Don't look for the newest NamespaceDecl. This patch implements the second option. This matches the gcc behavior too. ------------------------------------------------------------------------ llvm-svn: 196745
2013-12-08Merging r196630:Bill Wendling1-0/+28
------------------------------------------------------------------------ r196630 | joerg | 2013-12-06 16:57:46 -0800 (Fri, 06 Dec 2013) | 3 lines Pass correct flags to assembler and linker for OpenBSD on AMD64, PowerPC and MIPS64. From Brad Smith. ------------------------------------------------------------------------ llvm-svn: 196706
2013-12-08Merging r196535:Bill Wendling1-0/+73
------------------------------------------------------------------------ r196535 | apazos | 2013-12-05 13:13:24 -0800 (Thu, 05 Dec 2013) | 1 line Implemented vget/vset_lane_f16 intrinsics ------------------------------------------------------------------------ llvm-svn: 196686
2013-12-08Merging r196361:Bill Wendling1-0/+6
------------------------------------------------------------------------ r196361 | kevinqin | 2013-12-04 00:02:11 -0800 (Wed, 04 Dec 2013) | 1 line [AArch64 NEON] Add ACLE intrinsic vceqz_f64. ------------------------------------------------------------------------ llvm-svn: 196682
2013-12-08Merging r196359:Bill Wendling2-1/+163
------------------------------------------------------------------------ r196359 | kevinqin | 2013-12-03 23:53:09 -0800 (Tue, 03 Dec 2013) | 1 line [AArch64 NEON] Add missing compare intrinsics. ------------------------------------------------------------------------ llvm-svn: 196680
2013-12-08Merging r196211:Bill Wendling1-0/+168
------------------------------------------------------------------------ r196211 | haoliu | 2013-12-02 22:07:13 -0800 (Mon, 02 Dec 2013) | 3 lines [AArch64]Add missing floating point convert, round and misc intrinsics. E.g. int64x1_t vcvt_s64_f64(float64x1_t a) -> FCVTZS Dd, Dn ------------------------------------------------------------------------ llvm-svn: 196679
2013-12-08Merging r196209:Bill Wendling1-0/+90
------------------------------------------------------------------------ r196209 | haoliu | 2013-12-02 21:58:49 -0800 (Mon, 02 Dec 2013) | 3 lines AArch64: add missing ACLE intrinsics mapping to general arithmetic operation from VFP instructions. E.g. float64x1_t vadd_f64(float64x1_t a, float64x1_t b) -> FADD Dd, Dn, Dm. ------------------------------------------------------------------------ llvm-svn: 196678
2013-12-08Merging r196199:Bill Wendling1-0/+97
------------------------------------------------------------------------ r196199 | haoliu | 2013-12-02 19:40:08 -0800 (Mon, 02 Dec 2013) | 3 lines AArch64: Add missing scalar pair intrinsics. E.g. "float32_t vaddv_f32(float32x2_t a)" to be matched into "faddp s0, v1.2s". ------------------------------------------------------------------------ llvm-svn: 196676
2013-12-08Merging r196191:Bill Wendling1-0/+54
------------------------------------------------------------------------ r196191 | jiangning | 2013-12-02 17:33:16 -0800 (Mon, 02 Dec 2013) | 2 lines Add some missing AArch64 Neon intrinsics like vuqadd_s64 and friends. ------------------------------------------------------------------------ llvm-svn: 196673
2013-12-07Merging r196189:Bill Wendling1-0/+149
------------------------------------------------------------------------ r196189 | jiangning | 2013-12-02 17:28:55 -0800 (Mon, 02 Dec 2013) | 2 lines Add some missing AArch64 Neon intrinsics like vmull_high_n_s16 and friends. ------------------------------------------------------------------------ llvm-svn: 196671
2013-12-07Merging r196488:Bill Wendling1-8/+28
------------------------------------------------------------------------ r196488 | rsmith | 2013-12-05 00:30:59 -0800 (Thu, 05 Dec 2013) | 4 lines PR17983: Fix crasher bug in C++1y mode when performing a non-global array delete on a class which has no array cookie and has no class-specific operator new. ------------------------------------------------------------------------ llvm-svn: 196670
2013-12-07Merging r196658:Bill Wendling1-0/+22
------------------------------------------------------------------------ r196658 | d0k | 2013-12-07 08:12:52 -0800 (Sat, 07 Dec 2013) | 7 lines CodeGen: Don't emit linkage on thunks that aren't emitted because they're vararg. This can happen when we're trying to emit a thunk with available_externally linkage with optimization enabled but bail because it doesn't make sense for vararg functions. PR18098. ------------------------------------------------------------------------ llvm-svn: 196666
2013-12-05Merging r196387:Bill Wendling1-0/+15
------------------------------------------------------------------------ r196387 | aaronballman | 2013-12-04 07:32:26 -0800 (Wed, 04 Dec 2013) | 1 line When parsing ignored attribute arguments, presuming the first argument is an unresolved identifier the same way that we do for unknown arguments. This resolves PR18075, where we regressed the handling of OpenBSD's bounded attribute. ------------------------------------------------------------------------ llvm-svn: 196522
2013-12-05Merging r196454:Bill Wendling1-6/+161
------------------------------------------------------------------------ r196454 | faisalv | 2013-12-04 17:40:41 -0800 (Wed, 04 Dec 2013) | 43 lines Fix init-captures for generic lambdas. For an init capture, process the initialization expression right away. For lambda init-captures such as the following: const int x = 10; auto L = [i = x+1](int a) { return [j = x+2, &k = x](char b) { }; }; keep in mind that each lambda init-capture has to have: - its initialization expression executed in the context of the enclosing/parent decl-context. - but the variable itself has to be 'injected' into the decl-context of its lambda's call-operator (which has not yet been created). Each init-expression is a full-expression that has to get Sema-analyzed (for capturing etc.) before its lambda's call-operator's decl-context, scope & scopeinfo are pushed on their respective stacks. Thus if any variable is odr-used in the init-capture it will correctly get captured in the enclosing lambda, if one exists. The init-variables above are created later once the lambdascope and call-operators decl-context is pushed onto its respective stack. Since the lambda init-capture's initializer expression occurs in the context of the enclosing function or lambda, therefore we can not wait till a lambda scope has been pushed on before deciding whether the variable needs to be captured. We also need to process all lvalue-to-rvalue conversions and discarded-value conversions, so that we can avoid capturing certain constant variables. For e.g., void test() { const int x = 10; auto L = [&z = x](char a) { <-- don't capture by the current lambda return [y = x](int i) { <-- don't capture by enclosing lambda return y; } }; If x was not const, the second use would require 'L' to capture, and that would be an error. Make sure TranformLambdaExpr is also aware of this. Patch approved by Richard (Thanks!!) http://llvm-reviews.chandlerc.com/D2092 ------------------------------------------------------------------------ llvm-svn: 196470
2013-12-05Merging r196423:Bill Wendling1-1/+61
------------------------------------------------------------------------ r196423 | faisalv | 2013-12-04 14:43:08 -0800 (Wed, 04 Dec 2013) | 17 lines Fix for PR18052 - Lambdas within NSDMI's and default arguments in Nested classes. Clang currently croaks on the following: struct X1 { struct X2 { int L = ([] (int i) { return i; })(2); }; }; asserting that the containing lexical context of the lambda is not Sema's cur context, when pushing the lambda's decl context on. This occurs because (prior to this patch) getContainingDC always returns the non-nested class for functions at class scope (even for inline member functions of nested classes (to account for delayed parsing of their bodies)). The patch addresses this by having getContainingDC always return the lexical DC for a lambda's call operator. Link to the bug: http://llvm.org/bugs/show_bug.cgi?id=18052 Link to Richard Smith's feedback on phabricator: http://llvm-reviews.chandlerc.com/D2331 Thanks! ------------------------------------------------------------------------ llvm-svn: 196469
2013-12-04Merging r196370:Richard Sandiford1-1/+1
------------------------------------------------------------------------ r196370 | rsandifo | 2013-12-04 09:59:57 +0000 (Wed, 04 Dec 2013) | 14 lines [SystemZ] Fix handling of pass-by-pointer arguments I'd misunderstood getIndirect() to mean that the argument should be passed as a pointer at the ABI level, with the ByVal argument choosing caller-copy semantics over no-caller-copy (callee-copy-on-write) semantics. But getIndirect(x) actually means that x is passed by pointer at the IR level but (at least on all other targets I looked at) directly at the ABI level. getIndirect(x, false) selects a pointer to a caller-made copy, which is what SystemZ was aiming for. This fixes a miscompilation of c-index-test. Structure arguments were being passed by pointer, but no copy was being made, so a write in the callee stomped over a caller's local variable. ------------------------------------------------------------------------ llvm-svn: 196371
2013-12-03Merging r196206:Bill Wendling1-4/+3
------------------------------------------------------------------------ r196206 | jiangning | 2013-12-02 21:36:55 -0800 (Mon, 02 Dec 2013) | 4 lines Patch by Ana Pazos. Fixed vcopy_laneq_f64 intrinsic implementation. ------------------------------------------------------------------------ llvm-svn: 196233
2013-12-03Merging r196153:Bill Wendling1-0/+53
------------------------------------------------------------------------ r196153 | mcrosier | 2013-12-02 13:07:27 -0800 (Mon, 02 Dec 2013) | 2 lines [AArch64] Implemented vcopy_lane patterns using scalar DUP instruction. Patch by Ana Pazos! ------------------------------------------------------------------------ llvm-svn: 196232
2013-12-02Merged r195756:Daniel Sanders1-0/+11
------------------------------------------------------------------------ r195756 | atanasyan | 2013-11-26 11:58:04 +0000 (Tue, 26 Nov 2013) | 1 line [Mips] Pass -mmsa option to the assembler. ------------------------------------------------------------------------ llvm-svn: 196083
2013-12-02Merged r195249:Daniel Sanders216-0/+946
------------------------------------------------------------------------ r195249 | atanasyan | 2013-11-20 13:53:20 +0000 (Wed, 20 Nov 2013) | 2 lines [Mips] Take in account the -mfp64 command line option when build paths to the crt*.o files, libraries and headers for the MIPS FSFS toolchain. ------------------------------------------------------------------------ llvm-svn: 196082
2013-12-02Merging r196048:Bill Wendling1-0/+6
------------------------------------------------------------------------ r196048 | d0k | 2013-12-01 07:09:32 -0800 (Sun, 01 Dec 2013) | 3 lines CommentLexer: When proceeding with a typo corrected name don't clobber the token. This would crash if the token is used in another diagnostic. PR18051. ------------------------------------------------------------------------ llvm-svn: 196075
2013-12-02Merging r196045:Bill Wendling1-6/+6
------------------------------------------------------------------------ r196045 | d0k | 2013-12-01 03:48:10 -0800 (Sun, 01 Dec 2013) | 3 lines Reenable ms inline asm test. LLVM r196044 should make it pass. ------------------------------------------------------------------------ llvm-svn: 196072