summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [c-index-test] For the '-remap-file' option use a comma for separator which ↵Argyrios Kyrtzidis2013-12-058-8/+8
| | | | | | | | is more Windows friendly than the colon. llvm-svn: 196529
* Fix assertion failure left over from changes to move away from "darwin" triples.Bob Wilson2013-12-051-0/+3
| | | | | | | | I happened to notice this while trying to write a test for an iOS simulator target. I suspect we just missed this when we added separate "macosx" and "ios" triples instead of the generic "darwin" OS. llvm-svn: 196527
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-0523-26/+26
| | | | llvm-svn: 196510
* PR17983: Fix crasher bug in C++1y mode when performing a non-global arrayRichard Smith2013-12-051-8/+28
| | | | | | | delete on a class which has no array cookie and has no class-specific operator new. llvm-svn: 196488
* [libclang] Record ranges skipped by the preprocessor and expose them with ↵Argyrios Kyrtzidis2013-12-051-0/+25
| | | | | | | | libclang. Patch by Erik Verbruggen! llvm-svn: 196487
* [c-index-test] For the '-remap-file=' option use ':' instead of ';' for ↵Argyrios Kyrtzidis2013-12-058-8/+8
| | | | | | | | separator. lldb does not like semicolon as part of an option. llvm-svn: 196485
* Implement DR482: namespace members can be redeclared with a qualified nameRichard Smith2013-12-055-11/+53
| | | | | | | | | | within their namespace, and such a redeclaration isn't required to be a definition any more. Update DR status page to say Clang 3.4 instead of SVN and add new Clang 3.5 category (but keep Clang 3.4 yellow for now). llvm-svn: 196481
* [objc] If an interface has no initializer marked as designated and ↵Argyrios Kyrtzidis2013-12-051-1/+27
| | | | | | | | | | | introduces at least one new initializer, don't assume that it inherits the designated initializers from the super class. If the assumption was wrong because a new initializer was a designated one that was not marked as such, we will emit misleading warnings for subclasses of the interface. llvm-svn: 196476
* Correct hyphenations in comments and assert messagesAlp Toker2013-12-0512-23/+23
| | | | | | | This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities in nearby lines. llvm-svn: 196466
* Per [dcl.meaning]p1, a name in an inline namespace can be redeclared using aRichard Smith2013-12-051-0/+79
| | | | | | | name from the enclosing namespace set if the name is specified as a qualified-id. llvm-svn: 196464
* Fix init-captures for generic lambdas.Faisal Vali2013-12-051-6/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 196454
* Parse: Recover better from bad definitions with base specifiersDavid Majnemer2013-12-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: 196453
* Add an AdjustedType sugar node for adjusting calling conventionsReid Kleckner2013-12-052-9/+22
| | | | | | | | | | | | | | | | Summary: In general, this type node can be used to represent any type adjustment that occurs implicitly without losing type sugar. The immediate use of this is to adjust the calling conventions of member function pointer types without breaking template instantiation. Fixes PR17996. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2332 llvm-svn: 196451
* Reject template-ids containing literal-operator-ids that have a dependentRichard Smith2013-12-051-0/+24
| | | | | | | | | nested-name-specifier, rather than crashing. (In fact, reject all literal-operator-ids that have a non-namespace nested-name-specifier). The grammar doesn't allow these in some cases, and in other cases does allow them but instantiation will always fail. llvm-svn: 196443
* Fix for PR18052 - Lambdas within NSDMI's and default arguments in Nested ↵Faisal Vali2013-12-041-1/+61
| | | | | | | | | | | | | | | | | | | | | | 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: 196423
* Getting rid of some hard-coded strings. No functional changes intended, ↵Aaron Ballman2013-12-041-4/+4
| | | | | | though some test cases needed to be updated for attribute names becoming quoted. llvm-svn: 196417
* ObjectiveC - Introducing objc_bridge_related attribute Fariborz Jahanian2013-12-041-0/+15
| | | | | | | | which specifies couple of (optional) method selectors for bridging a CFobject to or from an ObjectiveC object. This is wip. // rdsr://15499111 llvm-svn: 196408
* [ms-cxxabi] Construct and destroy call arguments in the correct orderReid Kleckner2013-12-043-2/+63
| | | | | | | | | | | | | | | | | | | Summary: MSVC destroys arguments in the callee from left to right. Because C++ objects have to be destroyed in the reverse order of construction, Clang has to construct arguments from right to left and destroy arguments from left to right. This patch fixes the ordering by reversing the order of evaluation of all call arguments under the MS C++ ABI. Fixes PR18035. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2275 llvm-svn: 196402
* Fix test case due to r196394 and improve it to not rely on LLVM code ↵David Blaikie2013-12-041-4/+3
| | | | | | generation either. llvm-svn: 196399
* When parsing ignored attribute arguments, presuming the first argument is an ↵Aaron Ballman2013-12-041-0/+15
| | | | | | 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: 196387
* [SystemZ] Fix handling of pass-by-pointer argumentsRichard Sandiford2013-12-041-1/+1
| | | | | | | | | | | | | | | | 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: 196370
* Sema: Propagate the mangling number into instantiationsDavid Majnemer2013-12-041-0/+22
| | | | | | | | | | | | | | | | | | We would lose track of the mangling number assigned to the original declaration which would cause us to create manglings that didn't match the Itanium C++ specification. e.g. Two static fields with the same name inside of a function template would receive the same mangling with LLVM fixing up the second field so they wouldn't collide. This would create an incompatibility with other compilers following the Itanium ABI. I've confirmed that the new mangling is identical to the ones generated by icc and gcc. N.B. This was uncovered while working on Microsoft mangler. llvm-svn: 196368
* [AArch64 NEON] Add ACLE intrinsic vceqz_f64.Kevin Qin2013-12-041-0/+6
| | | | llvm-svn: 196361
* [AArch64 NEON] Add missing compare intrinsics.Kevin Qin2013-12-042-1/+163
| | | | llvm-svn: 196359
* Fix error recovery in return statement.Serge Pavlov2013-12-041-0/+13
| | | | | | This patch fixes PR16989. llvm-svn: 196352
* Fix PR17637: incorrect calculation of template parameter depthFaisal Vali2013-12-042-0/+78
| | | | | | In delayed template parsing mode, adjust the template depth counter for each template parameter list associated with an out of line member template specialization. llvm-svn: 196351
* clang/test: REQUIRES: s/x86-64-registered-target/x86-registered-target/NAKAMURA Takumi2013-12-0423-23/+23
| | | | llvm-svn: 196350
* clang/test: REQUIRES: s/ppc{32|64}-registered-target/powerpc-registered-target/NAKAMURA Takumi2013-12-0417-17/+17
| | | | llvm-svn: 196349
* clang/test/CodeGen/builtins-nvptx.c: Prune "REQUIRES: ↵NAKAMURA Takumi2013-12-041-1/+0
| | | | | | nvptx64-registered-target". "nvptx" should imply it. llvm-svn: 196348
* check-clang: Introduce get_llvm_config_props in clang/test/lit.cfg.NAKAMURA Takumi2013-12-042-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In trunk, we can use features as below: aarch64-registered-target hexagon-registered-target msp430-registered-target r600-registered-target systemz-registered-target xcore-registered-target Each of them, as below, implies corresponding subtargets: arm-registered-target -- arm, thumb mips-registered-target -- mips, mips64, mips64el, mipsel nvptx-registered-target -- nvptx, nvptx64 sparc-registered-target -- sparc, sparcv9 x86-registered-target -- x86, x86-64 They will be renamed: cppbackend-registered-target -- was "cpp". Unused in trunk. powerpc-registered-target -- was "ppc32", "ppc64" and "ppc64le". The feature "asserts" is also taken from llvm-config. llvm-svn: 196347
* Fix crash if a dependent template-id was assumed to be a type but instantiatesRichard Smith2013-12-041-0/+24
| | | | | | to a variable template specialization. llvm-svn: 196337
* Fix crash if a variable template specialization is used in a ↵Richard Smith2013-12-041-3/+2
| | | | | | nested-name-specifier. llvm-svn: 196335
* Fix several crash-on-invalids when using template-ids that aren'tRichard Smith2013-12-042-1/+34
| | | | | | simple-template-ids (eg, 'operator+<int>') in weird places. llvm-svn: 196333
* [objc] Add a warning when a class that provides a designated initializer, ↵Argyrios Kyrtzidis2013-12-031-6/+8
| | | | | | | | does not override all of the designated initializers of its superclass. llvm-svn: 196319
* [objc] Emit warning when the implementation of a secondary initializer calls onArgyrios Kyrtzidis2013-12-031-3/+43
| | | | | | | | | | | super another initializer and when the implementation does not delegate to another initializer via a call on 'self'. A secondary initializer is an initializer method not marked as a designated initializer within a class that has at least one initializer marked as a designated initializer. llvm-svn: 196318
* [objc] Emit warnings when the implementation of a designated initializer ↵Argyrios Kyrtzidis2013-12-031-8/+17
| | | | | | | | calls on super an initializer that is not a designated one or any initializer on self. llvm-svn: 196317
* [objc] Emit a warning when the implementation of a designated initializer ↵Argyrios Kyrtzidis2013-12-031-0/+96
| | | | | | | | does not chain to an init method that is a designated initializer for the superclass. llvm-svn: 196316
* [objc] Introduce attribute 'objc_designated_initializer'.Argyrios Kyrtzidis2013-12-031-0/+32
| | | | | | It only applies to methods of init family in an interface declaration. llvm-svn: 196314
* Fix corner case in module-based layering warning.Daniel Jasper2013-12-031-1/+2
| | | | | | | | | | | Before, there SourceManager would not return a FileEntry for a SourceLocation of a macro expansion (if the header name itself is defined in a macro). We'd then fallback to assume that the module currently being built is the including module. However, in this case we are actually interested in the spelling location of the filename loc in order to derive the including module. llvm-svn: 196311
* Issue diagnostic when constructor or destructorFariborz Jahanian2013-12-031-0/+10
| | | | | | | return void expression. // rdar://15366494 pr17759. llvm-svn: 196296
* Check IR on this test.Rafael Espindola2013-12-031-10/+6
| | | | llvm-svn: 196287
* Check IR on this test.Rafael Espindola2013-12-031-9/+8
| | | | llvm-svn: 196286
* Check IR on this test.Rafael Espindola2013-12-031-8/+5
| | | | llvm-svn: 196285
* Check IR on this test.Rafael Espindola2013-12-031-10/+6
| | | | llvm-svn: 196284
* Check IR on this test.Rafael Espindola2013-12-031-11/+6
| | | | llvm-svn: 196282
* check IR in this testRafael Espindola2013-12-031-8/+5
| | | | llvm-svn: 196281
* check IR in this test.Rafael Espindola2013-12-031-12/+7
| | | | llvm-svn: 196280
* check IR in this test.Rafael Espindola2013-12-031-12/+7
| | | | llvm-svn: 196279
* Check IR in this test.Rafael Espindola2013-12-031-18/+10
| | | | llvm-svn: 196278
* Check IR in this test.Rafael Espindola2013-12-031-8/+5
| | | | llvm-svn: 196277
OpenPOWER on IntegriCloud