summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [c-index-test] For the '-remap-file' option use a comma for separator which ↵Argyrios Kyrtzidis2013-12-059-15/+15
| | | | | | | | 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-052-1/+4
| | | | | | | | 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
* AttributeList: tweak the conditional order to avoid two strcmpsAlp Toker2013-12-051-2/+2
| | | | llvm-svn: 196518
* clang-format vsix cmake build: use ${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}Hans Wennborg2013-12-051-2/+2
| | | | | | | | as the location for grabbing clang-format.exe, and also output the .vsix here. This allows us to find clang-format.exe when building from a MSVC Solution. llvm-svn: 196512
* Check the initial line number without going through PresumedLocAlp Toker2013-12-051-3/+2
| | | | | | | No practical difference in this case and would return 1 either way, but this is more self-explanatory. llvm-svn: 196511
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-0563-82/+83
| | | | llvm-svn: 196510
* PR17983: Fix crasher bug in C++1y mode when performing a non-global arrayRichard Smith2013-12-053-11/+34
| | | | | | | 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-057-1/+124
| | | | | | | | libclang. Patch by Erik Verbruggen! llvm-svn: 196487
* [c-index-test] Enhance perform_test_reparse_source() to allow remapping a fileArgyrios Kyrtzidis2013-12-051-12/+77
| | | | | | | | at a particular reparsing iteration. Passing '-remap-file-1=from:to' will remap the files in the second iteration. llvm-svn: 196486
* [c-index-test] For the '-remap-file=' option use ':' instead of ';' for ↵Argyrios Kyrtzidis2013-12-059-15/+15
| | | | | | | | separator. lldb does not like semicolon as part of an option. llvm-svn: 196485
* clang-format-diff.py: pass through errors to stderr, not stdoutAlp Toker2013-12-051-5/+2
| | | | | | | Also use write() for unified diff output to avoid further processing by the print function (e.g. trailing newline). llvm-svn: 196484
* Update C++ status from 'SVN' to 'Clang 3.4' in preparation for release. LeaveRichard Smith2013-12-051-11/+11
| | | | | | boxes yellow until we release, though. llvm-svn: 196482
* Implement DR482: namespace members can be redeclared with a qualified nameRichard Smith2013-12-0510-47/+96
| | | | | | | | | | 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
* Fix comment typo in r196476Alp Toker2013-12-051-1/+1
| | | | llvm-svn: 196477
* [objc] If an interface has no initializer marked as designated and ↵Argyrios Kyrtzidis2013-12-053-16/+93
| | | | | | | | | | | 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-0536-56/+56
| | | | | | | 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-056-34/+115
| | | | | | | name from the enclosing namespace set if the name is specified as a qualified-id. llvm-svn: 196464
* Fixed a bad assert from r194968. r194969 removed the assert.Richard Trieu2013-12-051-0/+1
| | | | llvm-svn: 196463
* Add an assert to make it clear we're on the first lineAlp Toker2013-12-051-1/+3
| | | | | | A raw lexer in its initial state is guaranteed to be on line number one. llvm-svn: 196461
* Remove unused variable.Richard Trieu2013-12-051-1/+0
| | | | llvm-svn: 196459
* Fix non-MSVC build error in ASTContext::getAdjustedTypeReid Kleckner2013-12-051-2/+4
| | | | | | | | Use FunctionTypeUnwrapper like we do in AttributedType to try to keep some sugar. We can actually do one better here in the future by avoiding the AdjustedType node altogether when no sugar would be lost. llvm-svn: 196455
* Fix init-captures for generic lambdas.Faisal Vali2013-12-0512-95/+455
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-052-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-0525-80/+239
| | | | | | | | | | | | | | | | 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
* Simplify the constructor to CodeGenABITypes.Mark Lacey2013-12-052-8/+12
| | | | | | | | | | | | The CodeGenOptions are not used for ABI type selection, so we will just create one with the default constructor (there is a FloatABI option in CodeGenOptions that is passed on to LLVM, but not used in Clang for LLVM IR type generation). We can use the DiagnosticsEngine on the ASTContext rather than making a client pass one in explicitly. llvm-svn: 196450
* Reject template-ids containing literal-operator-ids that have a dependentRichard Smith2013-12-056-7/+66
| | | | | | | | | 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
* Giving a Subjects list to DllExport, which allows the removal of some custom ↵Aaron Ballman2013-12-042-9/+4
| | | | | | semantic handling. The same cannot be done for DllImport, and so comments were left explaining why. llvm-svn: 196429
* Common functionality is already checked within SemaDeclAttr.cpp and so it ↵Aaron Ballman2013-12-041-65/+4
| | | | | | does not need to be re-checked for each target. llvm-svn: 196428
* Factor duplicated code for TransformTypeInObjectScopeReid Kleckner2013-12-041-49/+22
| | | | | | Fixes the relevant FIXME about copy-pasted code. llvm-svn: 196425
* Fix for PR18052 - Lambdas within NSDMI's and default arguments in Nested ↵Faisal Vali2013-12-042-2/+71
| | | | | | | | | | | | | | | | | | | | | | 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
* The MSP430Interrupt attribute does have a sema handler (it's in ↵Aaron Ballman2013-12-042-1/+7
| | | | | | TargetAttributesSema). Added a FIXME about the attribute being nameless when it really does have a valid name, and a comment explaining why we're using the name instead of the attribute kind. llvm-svn: 196420
* Getting rid of some hard-coded strings. No functional changes intended, ↵Aaron Ballman2013-12-042-9/+9
| | | | | | though some test cases needed to be updated for attribute names becoming quoted. llvm-svn: 196417
* This attribute somehow remained nameless in the attribute tablegen, until now.Aaron Ballman2013-12-042-3/+5
| | | | llvm-svn: 196415
* Remove empty header.Rafael Espindola2013-12-041-0/+0
| | | | llvm-svn: 196410
* ObjectiveC - Introducing objc_bridge_related attribute Fariborz Jahanian2013-12-047-0/+195
| | | | | | | | 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
* Enea Zaffanella's fix for the PPCallbacks Elif callback, with a slight ↵John Thompson2013-12-041-17/+15
| | | | | | re-org, and an update of the new PPCallbacks test (soon to be moved to clang from extra), rather the unittest. llvm-svn: 196407
* Fix indentation.Richard Smith2013-12-041-3/+3
| | | | llvm-svn: 196406
* [ms-cxxabi] Construct and destroy call arguments in the correct orderReid Kleckner2013-12-0410-106/+188
| | | | | | | | | | | | | | | | | | | 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-042-1/+17
| | | | | | 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
* Added a regression test for the change in r196380Alexander Kornienko2013-12-041-0/+8
| | | | llvm-svn: 196384
* Fix the regression caused by r196378Alexander Kornienko2013-12-041-3/+3
| | | | llvm-svn: 196380
* Leave constructor initializer lists on one line in styles with no column limit.Alexander Kornienko2013-12-042-12/+50
| | | | | | | | | | | | | | | | | Summary: Allow tryFitMultipleLinesInOne join unwrapped lines when ContinuationIndenter::mustBreak doesn't agree. But don't merge any lines, that are separate in the input. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2321 llvm-svn: 196378
* Revert r196372, "do not warn about unknown pragmas in modes that do not ↵NAKAMURA Takumi2013-12-045-17/+9
| | | | | | | | handle them (pr9537)" It broke clang tests on some hosts with +Asserts. Seems "STDC" clashes. llvm-svn: 196376
* do not warn about unknown pragmas in modes that do not handle them (pr9537)Lubos Lunak2013-12-045-9/+17
| | | | | | | And refactor to have just one place in code that sets up the empty pragma handlers. llvm-svn: 196372
* [SystemZ] Fix handling of pass-by-pointer argumentsRichard Sandiford2013-12-042-4/+4
| | | | | | | | | | | | | | | | 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-042-0/+35
| | | | | | | | | | | | | | | | | | 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-042-5/+19
| | | | llvm-svn: 196361
* [AArch64 NEON] Add missing compare intrinsics.Kevin Qin2013-12-044-20/+213
| | | | llvm-svn: 196359
* Fix error recovery in return statement.Serge Pavlov2013-12-042-2/+15
| | | | | | This patch fixes PR16989. llvm-svn: 196352
OpenPOWER on IntegriCloud