summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Provide an aka for the C++ operator name macro diagnosticAlp Toker2014-05-211-3/+3
| | | | llvm-svn: 209322
* Sema: Implement DR244David Majnemer2014-05-212-5/+11
| | | | | | | | | | | | | | | | Summary: Naming the destructor using a typedef-name for the class-name is well-formed. This fixes PR19620. Reviewers: rsmith, doug.gregor Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3583 llvm-svn: 209319
* Improved recovery of switch statementSerge Pavlov2014-05-212-1/+51
| | | | | | | | | Make better diagnostic produced by erroneous switch statement. It fixes PR19022. Differential Revision: http://reviews.llvm.org/D3137 llvm-svn: 209302
* Make global named registers internal variablesRenato Golin2014-05-211-0/+1
| | | | llvm-svn: 209289
* Preprocessor: support defined() with operator names for MS compatibilityAlp Toker2014-05-215-11/+40
| | | | | | | | | Also flesh out missing tests, improve diagnostic QOI and fix a couple of corner cases found in the process. Fixes PR10606. llvm-svn: 209276
* [objcmt] Make sure we don't edit the return type to add 'instancetype' if ↵Argyrios Kyrtzidis2014-05-211-0/+10
| | | | | | | | the return type is already that. rdar://16961577 llvm-svn: 209264
* Remove test. Replacing it with a backend test with the optimized IR.Eric Christopher2014-05-211-15/+0
| | | | llvm-svn: 209260
* Make this test emit llvm IR rather than assembly.Eric Christopher2014-05-201-1/+1
| | | | llvm-svn: 209255
* Fix testcase from r209228Duncan P. N. Exon Smith2014-05-201-1/+1
| | | | llvm-svn: 209229
* GlobalValue: Testcase for hidden visibility and local linkageDuncan P. N. Exon Smith2014-05-201-0/+8
| | | | | | | | | | | | | | This is a testcase for r209227, a change in LLVM that automatically sets visibility to default when the linkage is changed to local (rather than asserting). What this testcase triggers is hard to reproduce otherwise: the `GlobalValue` is created (with non-local linkage), the visibility is set to hidden, and then the linkage is set to local. PR19760 llvm-svn: 209228
* Add a check for tautological bitwise comparisons to -Wtautological-compare.Jordan Rose2014-05-201-0/+28
| | | | | | | | | | | This catches issues like: if ((x & 8) == 4) { ... } if ((x | 4) != 3) { ... } Patch by Anders Rönnholm! llvm-svn: 209221
* Fix testcase for case.Eric Christopher2014-05-201-1/+1
| | | | llvm-svn: 209218
* Implement the flatten attribute.Peter Collingbourne2014-05-203-0/+63
| | | | | | | | | | This is a GNU attribute that causes calls within the attributed function to be inlined where possible. It is implemented by giving such calls the alwaysinline attribute. Differential Revision: http://reviews.llvm.org/D3816 llvm-svn: 209217
* Clean up language and grammar.Eric Christopher2014-05-202-2/+2
| | | | | | | Based on a patch by jfcaron3@gmail.com! PR19806 llvm-svn: 209215
* clang/test/SemaCXX/err_init_conversion_failed.cpp: Tweak for i686-msvc.NAKAMURA Takumi2014-05-201-1/+1
| | | | | | | | | | | For targeting i686-msvc, declarations are seen as thiscall like; void (template_test::S::*)(const int &) __attribute__((thiscall)) void (template_test::S::*)(int) __attribute__((thiscall)) It didn't affect x86_64-msvc. llvm-svn: 209212
* None of these attributes require FunctionTemplate to be explicitly listed as ↵Aaron Ballman2014-05-204-65/+65
| | | | | | | | part of their subject definition. FunctionTemplateDecls are not what the attribute appertains to in the first place -- it attaches to the underlying FunctionDecl. The attribute emitter was using FunctionTemplate to map the diagnostic to "functions or methods", but that isn't a particularly clear diagnostic in these cases anyway (since they do not apply to ObjC methods). Updated the attribute emitter to remove custom logic for FunctionTemplateDecl, and updated the test cases for the change in diagnostic wording. llvm-svn: 209209
* XCore target: sort typestring enum fields alphabeticallyRobert Lytton2014-05-201-2/+2
| | | | llvm-svn: 209196
* Fix diagnostic message for member function pointer mismatches where one of theRichard Trieu2014-05-201-0/+16
| | | | | | classes is a template argument. llvm-svn: 209190
* Ignore void returning overloaded functions fom -Wunused-comparison. PR19791.Richard Trieu2014-05-201-0/+14
| | | | llvm-svn: 209186
* ARCMT/GC-check-warn-nsalloc.m: don't provide a diag groupAlp Toker2014-05-192-4/+4
| | | | | | | This diagnostic is now controlled solely by -no-ns-alloc-error thus matching the original intended behaviour. llvm-svn: 209184
* Demote the "Debug Info Version" module flag to llvm::Module::WarningAdrian Prantl2014-05-191-1/+1
| | | | | | | | | behavior on mismatch. The AutoUpgrader will drop incompatible debug info any way and also emit a warning diagnostic for it. rdar://problem/16926122 llvm-svn: 209182
* Using SmallString and correct addr varRenato Golin2014-05-191-2/+2
| | | | llvm-svn: 209180
* Improve test verification from r209172Alp Toker2014-05-191-2/+2
| | | | llvm-svn: 209175
* Get ARCMT/GC-check-warn-nsalloc.m workingAlp Toker2014-05-191-4/+5
| | | | | | | | | | | | | The -no-ns-alloc-error migration option now causes the diagnostic to be ignored completely. If this isn't desired, the error can be downgraded to a warning using the usual -Wno-error=arcmt-ns-alloc. Note that we can't use -verify right now on this test because VerifyDiagnosticConsumer gets confused by multiple SourceManager instances, which is presumably the reason it was XFAILed in the first place and why the regression wasn't detected. We'll grep instead for now. llvm-svn: 209172
* Fix usage of string when StringRef was neededRenato Golin2014-05-191-2/+2
| | | | | | | | | Also adding a variable to the test, so release bots match %1. This should also calm the gdb buildbot. . llvm-svn: 209171
* Implement the no_split_stack attribute.Peter Collingbourne2014-05-193-3/+78
| | | | | | | | | This is a GNU attribute that allows split stacks to be turned off on a per-function basis. Differential Revision: http://reviews.llvm.org/D3817 llvm-svn: 209167
* If two sibling modules declare the same entity, and we indirectly pull aRichard Smith2014-05-194-3/+46
| | | | | | | | declaration of that entity in from one of those modules, keep track of the fact that we've not completed the redeclaration chain yet so that we can pull the remaining declarations in from the other module if they're needed. llvm-svn: 209161
* Allow dllimport on function definitions when they're template instantiationsHans Wennborg2014-05-191-1/+1
| | | | llvm-svn: 209157
* Non-allocatable Global Named RegisterRenato Golin2014-05-193-3/+26
| | | | | | | | | | | | | This patch implements global named registers in Clang, lowering to the just created intrinsics in LLVM (@llvm.read/write_register). A new type of LValue had to be created (Register), which just adds support to carry the metadata node containing the name of the register. Two new methods to emit loads and stores interoperate with another to emit the named metadata node. No guarantees are being made and only non-allocatable global variable named registers are being supported. Local named register support is unchanged. llvm-svn: 209149
* Removing an XFAIL which shouldn't apply. We no longer care about MSVC 9, and ↵Aaron Ballman2014-05-191-6/+0
| | | | | | this test probably should not have been XFAILed everywhere regardless. The test passes on Windows with MSVC 12. llvm-svn: 209148
* test/CodeGenCXX/dllexport.cpp: -O2 and -disable-llvm-optzns aren't neddedHans Wennborg2014-05-191-1/+1
| | | | | | | We only need them on the dllimport.cpp test to make sure that we emit code for available_externaly functions, and don't inline the IR. llvm-svn: 209145
* This test doesn't need to be XFAILed anywhere; it just needed to be updated ↵Aaron Ballman2014-05-191-4/+3
| | | | | | to the appropriate diagnostic wording. llvm-svn: 209140
* Fix use-after-free and spurious error during module loadBen Langmuir2014-05-191-0/+25
| | | | | | | | | | | | | | FileManager::invalidateCache is not safe to call when there may be existing references to the file. What module load failure needs is to refresh so stale stat() info isn't stored. This may be the last user of invalidateCache; I'll take a look and remove it if possible in a future commit. This caused a use-after-free error as well as a spurious error message that a module was "found in both 'X.pcm' and 'X.pcm'" in some cases. llvm-svn: 209138
* This test is XFAILed on Windows, but I cannot see a reason as to why it ↵Aaron Ballman2014-05-191-2/+0
| | | | | | | | should be failing. The original commit which XFAILed this was r111581, which suggested something was wrong with file remapping, but that may have been subsequently fixed. Removing the XFAIL, but will watch the build bots to see if any go red because of this. Local testing on Windows succeeds. llvm-svn: 209130
* Fixing some comments in this test. No functional changes.Aaron Ballman2014-05-191-3/+3
| | | | llvm-svn: 209128
* [OpenCL] Reject reqd_work_group_size(X, Y, Z) where X, Y or Z == 0.Joey Gouly2014-05-191-0/+4
| | | | | | Patch by Pedro Ferreira! llvm-svn: 209127
* Pass -gdwarf-N options to integrated assemblerOliver Stannard2014-05-191-0/+14
| | | | llvm-svn: 209124
* ARM: PCS non-compliance when struct is padded to avoid register/stack split, ↵Oliver Stannard2014-05-191-3/+8
| | | | | | | | | | and requires internal padding When we were padding a struct to avoid splitting it between registers and the stack, we were throwing away the type which the argument should be coerced to. llvm-svn: 209122
* Make the ARCMT tests self-contained.Manuel Klimek2014-05-1910-2/+351
| | | | | | This is necessary to reduce staging times on parallel build systems. llvm-svn: 209120
* Driver: force restricted IT blocks for Windows on ARMSaleem Abdulrasool2014-05-181-0/+4
| | | | | | | Windows on ARM expects ARMv8 (restricted IT) conditional instructions only. Force enable the restricted IT mode via the backend option when targeting WoA. llvm-svn: 209086
* More fixes for isBetterOverloadCandidate not being a strict weak ordering. TheRichard Smith2014-05-171-0/+18
| | | | | | bug was obvious from inspection, figuring out a way to test it was... less so. llvm-svn: 209060
* [objcmt] Don't wrap a PCH generation action with a ObjCMigrateAction one, it ↵Argyrios Kyrtzidis2014-05-171-0/+12
| | | | | | | | messes up the PCH file. rdar://16941811 llvm-svn: 209059
* Correct incoherent function versus function template partial ordering for ↵Richard Smith2014-05-172-1/+21
| | | | | | conversion operators (the comparison could claim that two conversion operators are both better than each other). Actually implement DR495, rather than passing its test by chance because the declarations happened to be in the "lucky" order. llvm-svn: 209054
* Tweak diagnostic wording for init list narrowingAlp Toker2014-05-1710-113/+113
| | | | | | | | | The conventional form is '<action> to silence this warning'. Also call the diagnostic an 'issue' rather than a 'message' because the latter term is more widely used with reference to message expressions. llvm-svn: 209052
* Add missed file from r209046.Richard Smith2014-05-161-0/+5
| | | | llvm-svn: 209047
* If a declaration is loaded, and then a module import adds a redeclaration, thenRichard Smith2014-05-164-13/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ensure that querying the first declaration for its most recent declaration checks for redeclarations from the imported module. This works as follows: * The 'most recent' pointer on a canonical declaration grows a pointer to the external AST source and a generation number (space- and time-optimized for the case where there is no external source). * Each time the 'most recent' pointer is queried, if it has an external source, we check whether it's up to date, and update it if not. * The ancillary data stored on the canonical declaration is allocated lazily to avoid filling it in for declarations that end up being non-canonical. We'll still perform a redundant (ASTContext) allocation if someone asks for the most recent declaration from a decl before setPreviousDecl is called, but such cases are probably all bugs, and are now easy to find. Some finessing is still in order here -- in particular, we use a very general mechanism for handling the DefinitionData pointer on CXXRecordData, and a more targeted approach would be more compact. Also, the MayHaveOutOfDateDef mechanism should now be expunged, since it was addressing only a corner of the full problem space here. That's not covered by this patch. Early performance benchmarks show that this makes no measurable difference to Clang performance without modules enabled (and fixes a major correctness issue with modules enabled). I'll revert if a full performance comparison shows any problems. llvm-svn: 209046
* Update for llvm api change.Rafael Espindola2014-05-168-16/+25
| | | | | | | | | | Now that llvm cannot represent alias cycles, we have to diagnose erros just before trying to close the cycle. This degrades the errors a bit. The real solution is what it was before: if we want to provide good errors for these cases, we have to be able to find a clang level decl given a mangled name and produce the error from Sema. llvm-svn: 209008
* InstrProf: Look for the PIC-version of the profile runtimeDuncan P. N. Exon Smith2014-05-161-0/+58
| | | | | | | | If `-shared` is specified, pull in a PIC-version of the profile runtime, which was added to compiler-rt in r208947. I'm hoping this will get the bots on my side. llvm-svn: 208948
* Push implicitly-declared allocation functions into the IdResolver. Otherwise,Richard Smith2014-05-162-0/+6
| | | | | | | declaration merging in modules is unable to find them and we get bogus errors and even crashes. llvm-svn: 208944
* InstrProf: Set profile data to visibility hiddenDuncan P. N. Exon Smith2014-05-169-42/+42
| | | | | | | | | | | | | Shared objects are fairly broken for InstrProf right now -- a follow-up commit in compiler-rt will fix the rest of this. The main problem here is that at link time, profile data symbols in the shared object might get used instead of symbols from the main executable, creating invalid profile data sections. <rdar://problem/16918688> llvm-svn: 208939
OpenPOWER on IntegriCloud