summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a parser crash when there are #pragmas in a context which requires a singleRichard Smith2013-10-282-0/+49
| | | | | | statement (after a case label, if, etc). Patch by Olivier Goffart! llvm-svn: 193545
* More windows path handling.Rafael Espindola2013-10-281-2/+2
| | | | llvm-svn: 193533
* Relax test to pass with windows paths.Rafael Espindola2013-10-281-8/+8
| | | | llvm-svn: 193532
* Support cross linking to arm on ubuntu.Rafael Espindola2013-10-2815-10/+48
| | | | | | | | | | With this patch we correctly determine that ubuntu's ARM tree is not biarch and use "lib" istead of "lib32". Without this patch the search inside the arm tree for the crt files was failing and we would end up trying to use the i686 ones in lib32. llvm-svn: 193528
* Fix typo in test's REQUIRES lineAlp Toker2013-10-271-1/+1
| | | | llvm-svn: 193507
* Define [U]LLONG_{MIN,MAX} for C++11, add tests.JF Bastien2013-10-271-0/+42
| | | | | | Add tests for limits.h, not just [U]LLONG_{MIN,MAX}. llvm-svn: 193506
* Fix option typo.Rafael Espindola2013-10-271-2/+2
| | | | llvm-svn: 193504
* Fix option spelling.Rafael Espindola2013-10-272-2/+2
| | | | llvm-svn: 193503
* Use -target instead of triple and use FileCheck.Rafael Espindola2013-10-271-1/+3
| | | | llvm-svn: 193502
* Remove REQUIRES aarch64-registered-target from testAlp Toker2013-10-261-1/+0
| | | | | | Registered targets don't matter for Sema tests, this passes fine. llvm-svn: 193485
* Check IR and don't use temporary files.Rafael Espindola2013-10-261-11/+5
| | | | llvm-svn: 193484
* FileCheckizeAlp Toker2013-10-261-2/+5
| | | | llvm-svn: 193474
* Quote wildcard in test's grep argumentAlp Toker2013-10-261-1/+1
| | | | | | The * could otherwise cause shell pathname expansion. llvm-svn: 193473
* Sema: Emit a nicer diagnostic when IndirectFieldDecls show up ↵David Majnemer2013-10-261-1/+3
| | | | | | inappropriately in non-type template arguments llvm-svn: 193462
* Sema: Correctly build pointer-to-member arguments from a template argument ↵David Majnemer2013-10-261-0/+14
| | | | | | | | | | | | with an IndirectFieldDecl We only considered FieldDecl and CXXMethodDecl as appropriate which would cause us to believe the IndirectFieldDecl corresponded to an argument of it's field type instead of a pointer-to-member type. This fixes PR17696. llvm-svn: 193461
* clang/test/CodeGenCXX/debug-info-namespace.cpp: Suppress this also on msys, ↵NAKAMURA Takumi2013-10-261-0/+1
| | | | | | | | for now since r193116. Clang confuses among dosish paths. In this case, "Input/foo.cpp" and "Input\foo.cpp" cannot be unified. llvm-svn: 193456
* [analyzer] Don't emit an "Assuming x is <OP> y" if it's not a comparison op.Jordan Rose2013-10-261-0/+499
| | | | | | | | | We could certainly be more precise in many of our diagnostics, but before we were printing "Assuming x is && y", which is just ridiculous. <rdar://problem/15167979> llvm-svn: 193455
* ObjectiveC arc. Warn when an implicitly 'strong' property Fariborz Jahanian2013-10-261-0/+13
| | | | | | | is redeclared as 'weak' in class extension. // rdar://15304886 llvm-svn: 193453
* Skip this test when using lit integrated shellAlp Toker2013-10-251-0/+3
| | | | | | | It wasn't passing on UNIX with LIT_USE_INTERNAL_SHELL=1 due to cat globbing. llvm-svn: 193443
* ObjectiveC: under -Wunused-property-ivar warn if property'sFariborz Jahanian2013-10-251-0/+51
| | | | | | | backing warning is not used in one of its accessor methods. // rdar://14989999 llvm-svn: 193439
* Don't check for -L options that gcc doesn't use.Rafael Espindola2013-10-251-2/+0
| | | | | | | GCC on fedora 18 ARM only uses 2 -L options. Clang prints two extra ones, but we should not include them in the test as they are not required. llvm-svn: 193430
* Add -Wstring-plus-char, which warns when adding char literals to C strings.Jordan Rose2013-10-252-0/+47
| | | | | | | | | | | Specifically, this warns when a character literal is added (using '+') to a variable with type 'char *' (or any other pointer to character type). Like -Wstring-plus-int, there is a fix-it to change "foo + 'a'" to "&foo['a']" iff the character literal is on the right side of the string. Patch by Anders Rönnholm! llvm-svn: 193418
* Sema: Do not allow lambda expressions to appear inside of constant expressionsDavid Majnemer2013-10-252-4/+4
| | | | | | | | | We would previously not diagnose this which would lead to crashes (on very strange code). This fixes PR17675. llvm-svn: 193397
* Consider used attributes in hidden decls.Rafael Espindola2013-10-251-0/+6
| | | | | | Without this patch we would warn and fail to output the function in the test. llvm-svn: 193388
* Simplify and refactor the uninitialized field warning.Richard Trieu2013-10-251-3/+63
| | | | | | | | | | | Change the uninitialized field warnings so that field initializers are checked inside the constructor. Previously, in class initializers were checked separately. Running one set of checks also simplifies the logic for preventing duplicate warnings. Added new checks to warn when an uninitialized field is used in base class initialization. Also fixed misspelling of uninitialized and moved all code for this warning together. llvm-svn: 193386
* Refactor: Extract specializing the generic lambda call operator during ↵Faisal Vali2013-10-241-1/+4
| | | | | | | | | | | | conversion to fptr deduction into its own function. No functionality change. All clang regression tests pass. Thanks! llvm-svn: 193383
* Add driver support for FP, SIMD and crypto defaults.Bernard Ogden2013-10-242-1/+28
| | | | | | | | | Although we wire up a bit for v8fp for macro setting purposes, we don't set a macro yet. Need to ask list about that. Change-Id: Ic9819593ce00882fbec72757ffccc6f0b18160a0 llvm-svn: 193367
* Set appropriate FPU default for Linux on v8Bernard Ogden2013-10-241-0/+5
| | | | | Change-Id: If9b649c92e7196e3e791948545dc80901a0761eb llvm-svn: 193365
* Teach clang driver about Cortex-A53 and Cortex-A57.Bernard Ogden2013-10-241-0/+8
| | | | | | | | | | | Adds some Cortex-A53 strings where they were missing before. Cortex-A57 is entirely new to clang. Doesn't touch code only used by Darwin, in consequence of which one of the A53 lines has been removed. Change-Id: I5edb58f6eae93947334787e26a8772c736de6483 llvm-svn: 193364
* ObjectiveC IRGen. Replace _objc_empty_vtable pointer in Objective-C Fariborz Jahanian2013-10-241-0/+10
| | | | | | class metadata for certain deployment targets. // rdar://14802916 llvm-svn: 193359
* ARM-Darwin: Use the *-*-darwin-eabi triple for v6m & v7m archsTim Northover2013-10-242-0/+12
| | | | | | | These arch arguments are used for embedded targets (obviously) which need a different calling convention to iOS. llvm-svn: 193328
* Teach Clang to accept and ignore -f[no-]implicit-templates.Chandler Carruth2013-10-241-0/+1
| | | | | | | | | | | | | | | | This GCC flag is useful when you want to control whether implicit template instantiation occurs at the commandline level. Clang doesn't currently support such controls, but technically *always* implicitly instantiating (what Clang does, and what every other compiler still in use does by default) is valid behavior even under -fno-implicit-templates, it just may be slow and very wasteful. If people really want this, we can try to implement it, but I don't have an actual use. This should help fix the build of libstdc++ with Clang, its build system uses this flag. llvm-svn: 193319
* Teach Clang to recognize and ignore GCC's -fdiagnostics-show-locationChandler Carruth2013-10-241-0/+1
| | | | | | | | | flag. We should probably wire at least some variants of this up to our actual diagnostics engine, but I'm leaving that for someone else. This fixes the builds of packages which hard code something here, at least including libstdc++ itself. llvm-svn: 193318
* Use the same SourceManager for ModuleMaps and compilations.Manuel Klimek2013-10-246-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows using virtual file mappings on the original SourceManager to map in virtual module.map files. Without this patch, the ModuleMap search will find a module.map file (as the FileEntry exists in the FileManager), but will be unable to get the content from the SourceManager (as ModuleMap previously created its own SourceManager). Two problems needed to be fixed which this patch exposed: 1. Storing the inferred module map When writing out a module, the ASTWriter stores the names of the files in the main source manager; when loading the AST again, the ASTReader errs out if such a file is found missing, unless it is overridden. Previously CompilerInstance's compileModule method would store the inferred module map to a temporary file; the problem with this approach is that now that the module map is handled by the main source manager, the ASTWriter stores the name of the temporary module map as source to the compilation; later, when the module is loaded, the temporary file has already been deleted, which leads to a compilation error. This patch changes the inferred module map to instead inject a virtual file into the source manager. This both saves some disk IO, and works with how the ASTWriter/ASTReader handle overridden source files. 2. Changing test input in test/Modules/Inputs/* Now that the module map file is handled by the main source manager, the VerifyDiagnosticConsumer will not ignore diagnostics created while parsing the module map file. The module test test/Modules/renamed.m uses -I test/Modules/Inputs and triggers recursive loading of all module maps in test/Modules/Inputs, some of which had conflicting names, thus leading errors while parsing the module maps. Those diagnostics already occur on trunk, but before this patch they would not break the test, as they were ignored by the VerifyDiagnosticConsumer. This patch thus changes the module maps that have been recently introduced which broke the invariant of compatible modules maps in test/Modules/Inputs. llvm-svn: 193314
* Support GNU attributes in alias-declarations now that GCC has implemented themRichard Smith2013-10-241-0/+9
| | | | | | and we know where they go. llvm-svn: 193297
* Fix a test file option from -emit-llvm -o to -emit-llvm-only.Faisal Vali2013-10-241-1/+1
| | | | | | As requested by Rafael Espindola here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131021/091556.html llvm-svn: 193296
* PR17666: Instead of allowing an initial identifier argument in any attributeRichard Smith2013-10-242-2/+8
| | | | | | | | | | | | which we don't think can't have one, only allow it in the tiny number of attributes which opts into this weird parse rule. I've manually checked that the handlers for all these attributes can in fact cope with an identifier as the argument. This is still somewhat terrible; we should move more fully towards picking the parsing rules based on the attribute, and make the Parse -> Sema interface more type-safe. llvm-svn: 193295
* Fix an instantiation bug with nested generic lambdas and conversion to fptrs.Faisal Vali2013-10-241-0/+44
| | | | | | | | | | | | | | | | | This patch fixes the typelocs of the conversion-operator and the conversion-operator-name and adds the parameters of the call operator to the FunctionProtoTypeLoc of the respective entities. Thus, when the template declarations (conversion operators) undergo deduction and instantiation/transformation/substitution - they add themselves to the local instantiation scope if needed. This patch supports the following: auto L = [](auto b) { return [](auto a) ->decltype(a) { return a; }; }; int (*fp)(int) = L(8); Richard LGTM'd this patch: http://llvm-reviews.chandlerc.com/D1831 Thanks! llvm-svn: 193294
* Implements 64 bit microsoft record layout and adds lit tests to cover Warren Hunt2013-10-2311-66/+1468
| | | | | | | | | it. Also removes all of the microsoft C++ ABI related code from the itanium layout builder. Differential Revision: http://llvm-reviews.chandlerc.com/D2003 llvm-svn: 193290
* Parse: Disable delayed template parsing for constexpr functionsDavid Majnemer2013-10-231-0/+7
| | | | | | | | | | | | | | | Commit r191484 treated constexpr function templates as normal function templates with respect to delaying their parsing. However, this is unnecessarily restrictive because there is no compatibility concern with constexpr, MSVC doesn't support it. Instead, simply disable delayed template parsing for constexpr function templates. This largely reverts the changes made in r191484 but keeps it's unit test. This fixes PR17661. llvm-svn: 193274
* AST: Mangle fields in anonymous structs/unionsDavid Majnemer2013-10-231-0/+9
| | | | | | | | | | | | | The Itanium mangler couldn't cope with mangling an IndirectFieldDecl. Instead, mangle the field the IndirectFieldDecl refers to. Further, give IndirectFieldDecl no linkage just like FieldDecl. N.B. Decl.cpp:getLVForNamespaceScopeDecl tried to calculate linkage for data members of anonymous structs/unions. However, this seems impossible so turn it into an assertion. llvm-svn: 193269
* Intrinsics: fix extract & insert when index is out of bound.Manman Ren2013-10-232-0/+42
| | | | | | | | | Now, all extract & insert intrinsics should have the correct and operation to ignore higher bits. rdar://15250497 llvm-svn: 193267
* [analyzer] Generate a LazyCompoundVal when loading from a union-typed region.Jordan Rose2013-10-231-2/+59
| | | | | | | | | | This ensures that variables accessible through a union are invalidated when the union value is passed to a function. We still don't fully handle union values, but this should at least quiet some false positives. PR16596 llvm-svn: 193265
* Refactor out the circular reference to LambdaExpr in CXXRecordDecl.Faisal Vali2013-10-231-0/+58
| | | | | | | | | | | | | | | | | A prior commit of this patch was reverted because it was within the blamelist's purview of a failing test. The failure of that test has been addressed here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131021/091546.html. Therefore I am recommitting this patch (all tests pass on windows, except for the usual modules & index suspects that never pass on my box). Some background: Both Doug and Richard had asked me in Chicago to remove the circular reference in CXXRecordDecl to LambdaExpr by factoring out and storing the needed information from LambdaExpr directly into CXXRecordDecl. In addition, I have added an IsGenericLambda flag - this makes life a little easier when we implement capturing, and are Sema-analyzing the body of a lambda (and the calloperator hasn't been wired to the closure class yet). Any inner lambdas can have potential captures that could require walking up the scope chain and checking if any generic lambdas are capture-ready. This 'bit' makes some of that checking easier. No change in functionality. This patch was approved by Doug with minor modifications (comments were cleaned up, and all data members were converted from bool/enum to unsigned, as requested): http://llvm-reviews.chandlerc.com/D1856 Thanks! llvm-svn: 193246
* [mips][msa] Add intrinsics that map to pseudo-instructions.Daniel Sanders2013-10-231-0/+6
| | | | | | | | | | | Unlike the previously added intrinsics, these do not map to a single instruction on MIPS32. They are provided for regularity (to round out the .[bhw] variants of the same operation) and compatibility with GCC. Includes: copy_[us].d, fill.d, insert.d, insve.d llvm-svn: 193237
* And Again: Teach TreeTransform how to transform nested generic lambdas.Faisal Vali2013-10-232-20/+514
| | | | | | | | | | | | | | | | | | | | | | | | A previous attempt http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130930/090049.html resulted in PR 17476, and was reverted, The original TransformLambdaExpr (pre generic-lambdas) transformed the TypeSourceInfo of the Call operator in its own instantiation scope via TransformType. This resulted in the parameters of the call operator being mapped to their transformed counterparts in an instantiation scope that would get popped off. Then a call to TransformFunctionParameters would add the parameters and their transformed mappings (but newly created ones!) to the current instantiation scope. This would result in a disconnect between the new call operator's TSI parameters and those used to construct the call operator declaration. This was ok in the non-generic lambda world - but would cause issues with nested transformations (when non-generic and generics were interleaved) in the generic lambda world - that I somewhat kludged around initially - but this resulted in PR17476. The new approach seems cleaner. We only do the transformation of the TypeSourceInfo - but we make sure to do it in the current instantiation scope so we don't lose the untransformed to transformed mappings of the ParmVarDecls when they get created. Another attempt caused a test to fail (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131021/091533.html) and also had to be reverted - my apologies - in my haste, i did not run all the tests - argh! Now all the tests seem to pass - but a Fixme has been added - since I suspect Richard will find the fix a little inelegant ;) I shall try and work on a more elegant fix once I have had a chance to discuss with Richard or Doug at a later date. Hopefully the third time;s a charm *fingers crossed* This does not yet include capturing. Please see test file for examples. This patch was LGTM'd by Doug: http://llvm-reviews.chandlerc.com/D1784 llvm-svn: 193230
* Revert r193223 and r193216.Rafael Espindola2013-10-233-572/+20
| | | | | | | | | | They were causing CodeGenCXX/mangle-exprs.cpp to fail. Revert "Remove the circular reference to LambdaExpr in CXXRecordDecl." Revert "Again: Teach TreeTransform and family how to transform generic lambdas nested within templates and themselves." llvm-svn: 193226
* Remove the circular reference to LambdaExpr in CXXRecordDecl.Faisal Vali2013-10-231-0/+58
| | | | | | | | | | | | | | | Both Doug and Richard had asked me to remove the circular reference in CXXRecordDecl to LambdaExpr by factoring out and storing the needed information from LambdaExpr directly into CXXRecordDecl. No change in functionality. In addition, I have added an IsGenericLambda flag - this makes life a little easier when we implement capturing, and are Sema-analyzing the body of a lambda (and the calloperator hasn't been wired to the closure class yet). Any inner lambdas can have potential captures that could require walking up the scope chain and checking if any generic lambdas are capture-ready. This 'bit' makes some of that checking easier. This patch was approved by Doug with minor modifications (comments were cleaned up, and all data members were converted from bool/enum to unsigned, as requested): http://llvm-reviews.chandlerc.com/D1856 Thanks! llvm-svn: 193223
* Make UsingShadowDecls redeclarable. This fixes some visibility problems withRichard Smith2013-10-234-0/+34
| | | | | | | | | | modules. With this fixed, I no longer see any test regressions in the libc++ test suite when enabling a single-module module.map for libc++ (other than issues with my system headers). llvm-svn: 193219
* Again: Teach TreeTransform and family how to transform generic Faisal Vali2013-10-232-20/+514
| | | | | | | | | | | | | | | | | | | | | lambdas nested within templates and themselves. A previous attempt http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130930/090049.html resulted in PR 17476, and was reverted, The original TransformLambdaExpr (pre generic-lambdas) transformed the TypeSourceInfo of the Call operator in its own instantiation scope via TransformType. This resulted in the parameters of the call operator being mapped to their transformed counterparts in an instantiation scope that would get popped off. Then a call to TransformFunctionParameters would add the parameters and their transformed mappings (but newly created ones!) to the current instantiation scope. This would result in a disconnect between the new call operator's TSI parameters and those used to construct the call operator declaration. This was ok in the non-generic lambda world - but would cause issues with nested transformations (when non-generic and generics were interleaved) in the generic lambda world - that I somewhat kludged around initially - but this resulted in PR17476. The new approach seems cleaner. We only do the transformation of the TypeSourceInfo - but we make sure to do it in the current instantiation scope so we don't lose the untransformed to transformed mappings of the ParmVarDecls when they get created. This does not yet include capturing. Please see test file for examples. This patch was LGTM'd by Doug: http://llvm-reviews.chandlerc.com/D1784 llvm-svn: 193216
OpenPOWER on IntegriCloud