summaryrefslogtreecommitdiffstats
path: root/clang/test/Rewriter
Commit message (Collapse)AuthorAgeFilesLines
* Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman2015-10-081-1/+1
| | | | | | | | | | | | | | | | With this change, most 'g' options are rejected by CompilerInvocation. They remain only as Driver options. The new way to request debug info from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}" and "-dwarf-version={2|3|4}". In the absence of a command-line option to specify Dwarf version, the Toolchain decides it, rather than placing Toolchain-specific logic in CompilerInvocation. Also fix a bug in the Windows compatibility argument parsing in which the "rightmost argument wins" principle failed. Differential Revision: http://reviews.llvm.org/D13221 llvm-svn: 249655
* __declspec is not a core Clang language extension. Instead, require ↵Aaron Ballman2015-05-261-1/+1
| | | | | | | -fms-extensions or -fborland to enable the language extension. Note: __declspec is also temporarily enabled when compiling for a CUDA target because there are implementation details relying on __declspec(property) support currently. When those details change, __declspec should be disabled for CUDA targets. llvm-svn: 238238
* [Objective-C modern translation]. Patch to fix type ofFariborz Jahanian2015-04-094-22/+22
| | | | | | | objc_msgSend's first argument to "Class" because objc_getClass is passed. rdar://20477025 llvm-svn: 234520
* Add a bunch of missing "CHECK" colons in tests. NFC.Ahmed Bougacha2015-03-142-2/+2
| | | | llvm-svn: 232237
* Give some obj-c rewriter tests that use MS pragmas a triple as a speculative fixReid Kleckner2015-03-052-6/+6
| | | | llvm-svn: 231320
* Update Clang tests to handle explicitly typed gep changes in LLVM.David Blaikie2015-02-271-0/+0
| | | | llvm-svn: 230783
* Objective-C modern rewriter. Patch to fix a rewriting bug Fariborz Jahanian2014-10-283-2/+5
| | | | | | | rewriting an Objective-C block. Patch by Ryan Govostes. rdar://18799145 llvm-svn: 220834
* Make clang's rewrite engine a core featureAlp Toker2014-07-161-1/+2
| | | | | | | | | | | | | | | The rewrite facility's footprint is small so it's not worth going to these lengths to support disabling at configure time, particularly since key compiler features now depend on it. Meanwhile the Objective-C rewriters have been moved under the ENABLE_CLANG_ARCMT umbrella for now as they're comparatively heavy and still potentially worth excluding from lightweight builds. Tests are now passing with any combination of feature flags. The flags historically haven't been tested by LLVM's build servers so caveat emptor. llvm-svn: 213171
* Consolidate header inclusion diagnosticsAlp Toker2014-07-111-1/+1
| | | | | | | Make argument orders match, unify diagnostic IDs and reword the message to be a little less saccharine. llvm-svn: 212845
* Don't suppress warning about dllimport on typedefs etc. in MicrosoftExt modeHans Wennborg2014-05-231-17/+0
| | | | | | | | | | | | | | | | | It's true the MSVC doesn't warn about dllimport when applied to e.g. a typedef, but that applies to dllexport too. I'd like us to be consistent, and I think the right thing to do is to warn. The original test that came with implementing the old behaviour doesn't provide a good motivation, and it said it was checking that we're not repoting an *error*, which is still true since this is just a warning. There are plenty of tests e.g. in Sema/dllimport.c to check that we do warn about dllimport on non functions or variables. Differential Revision: http://reviews.llvm.org/D3832 llvm-svn: 209546
* An inline function redeclaration does not drop the dllimport attributeHans Wennborg2014-05-221-14/+3
| | | | llvm-svn: 209449
* Reorganize and improve semantic tests for dllexport/importNico Rieck2014-02-221-1/+1
| | | | llvm-svn: 201947
* Use -target instead of ignored -arch to fix x86_64 buildersNico Rieck2014-02-161-1/+1
| | | | llvm-svn: 201480
* Fix broken CHECK linesNico Rieck2014-02-161-1/+1
| | | | llvm-svn: 201477
* Teach the diagnostics engine about the Attr type to make reporting on ↵Aaron Ballman2013-12-261-1/+1
| | | | | | semantic attributes easier (and not require hard-coded strings). This requires a getSpelling() function on the Attr class, which is table-driven. Updates a handful of cases where a hard-coded string was being used to test the functionality out. Updating associated test cases for the improved quoting. llvm-svn: 198055
* Correct test to target 'unknown'Alp Toker2013-12-021-1/+1
| | | | llvm-svn: 196060
* ObjectiveC modern translator. Fixes a translation bugFariborz Jahanian2013-11-221-1/+26
| | | | | | tranalation @protocol expression. // rdar://15517895 llvm-svn: 195480
* ObjectiveC modern rewriter. Rewrite typedefsFariborz Jahanian2013-10-071-0/+20
| | | | | | | declared locally in ObjectiveC containers. // rdar://15143875 llvm-svn: 192127
* Replace -fobjc-default-synthesize-properties with ↵Rafael Espindola2013-09-271-1/+1
| | | | | | | | | disable-objc-default-synthesize-properties. We want the modern behavior most of the time, so inverting the option simplifies the driver and the tests. llvm-svn: 191551
* Revert my patch in r191155 to allow forwardFariborz Jahanian2013-09-241-1/+12
| | | | | | | | class/protocol decls in @implementation and fixup modern rewriter to handle that. // rdar://15066233 llvm-svn: 191311
* ObjectiveC modern translator: Provide proper cast ofFariborz Jahanian2013-09-171-2/+13
| | | | | | | the ObjectiveC object of an @synchronized statement. // rdar://14993814 llvm-svn: 190874
* Modern ObjectiveC translator. Fix translation of Fariborz Jahanian2013-09-091-0/+58
| | | | | | | | message sent to aggregate-valued methods. Fix visibility of trampoline type used in translation of such expressions. // rdar://14932320 llvm-svn: 190341
* ObjectiveC modern translator: fix up generated fast enumerationFariborz Jahanian2013-09-051-0/+25
| | | | | | | code to work for bit 32bit and 64bit APIs. // rdar://14913632 llvm-svn: 190072
* Adjust clang for change to APFloat::toString.Eli Friedman2013-08-292-4/+4
| | | | | | | | I changed the diagnostic printing code because it's probably better to cut off a digit from DBL_MAX than to print something like 1.300000001 when the user wrote 1.3. llvm-svn: 189625
* Make the information about disabled ARCMT/Rewriter/StaticAnalyzer availableRoman Divacky2013-08-271-0/+2
| | | | | | | to lit and use this info to disable Analysis/FixIt/Rewriter/Analysis tests when those are not compiled into clang. llvm-svn: 189395
* Fix FileCheck --check-prefix lines.Tim Northover2013-08-129-12/+12
| | | | | | | | | | Various tests had sprung up over the years which had --check-prefix=ABC on the RUN line, but "CHECK-ABC:" later on. This happened to work before, but was strictly incorrect. FileCheck is getting stricter soon though. Patch by Ron Ofir. llvm-svn: 188174
* Add 'not' to commands that are expected to fail.Rafael Espindola2013-07-042-4/+4
| | | | | | | This is at least good documentation, but also opens the possibility of using pipefail. llvm-svn: 185652
* Define id to the correct type.Rafael Espindola2013-06-074-5/+5
| | | | | | | Found this while working on pr16247. The fix for that bug will cause clang to reject this. llvm-svn: 183545
* Objective-C: Correctly encode 'retain' and 'copy' for readonly properties.Nico Weber2013-05-081-0/+12
| | | | | | | | | | clang would omit 'C' for 'copy' properties and '&' for 'retain' properties if the property was also 'readonly'. Fix this, which makes clang match gcc4.2's behavior. Fixes PR15928. llvm-svn: 181491
* Fix PR15845: apparently MSVC does not support implicit int in C++ mode.Richard Smith2013-04-301-1/+1
| | | | llvm-svn: 180822
* Objective-C modern rewriter. Fixes a bugFariborz Jahanian2013-04-031-0/+11
| | | | | | | | rewriting typedef for a qualified object type and also when two declarations happen to be on the same line. // rdar://13562505 llvm-svn: 178680
* Objective-C modern translator. Don't put line infoFariborz Jahanian2013-03-181-0/+18
| | | | | | | | into the pre-preprocessed file to be passed to modern translator when compiling in no debug mode. // rdar://13138170 llvm-svn: 177311
* objective-C modern translator: Fixes a mistranslationFariborz Jahanian2013-02-111-0/+26
| | | | | | | of @throw statement by finding location of the ';' correctly. // rdar://13186010 llvm-svn: 174898
* objective-C modern translation: Fix another random translation bugFariborz Jahanian2013-02-081-0/+43
| | | | | | | involving property getter expressions on rhs of property setter. // rdar://13138459 llvm-svn: 174729
* objective-C modern translator. Fixes a trivialFariborz Jahanian2013-02-081-0/+20
| | | | | | | rewriting bug where #ifdef ended up on the same line as the attribute declaration. llvm-svn: 174719
* objective-C modern translator. Generate #lineFariborz Jahanian2013-02-081-0/+40
| | | | | | | info in the translated code under -g only. // rdar://13138170 llvm-svn: 174684
* objective-C modern translator. More fixups for Fariborz Jahanian2013-02-071-0/+48
| | | | | | | modern meta-data abi translation. Still wip. // rdar://13138459 llvm-svn: 174672
* objective-C modern translator. Fix up the translatedFariborz Jahanian2013-02-072-6/+62
| | | | | | | metadata to handle ivar bitfields. This is wip. // rdar://13138459 llvm-svn: 174573
* -arch is a darwin-specific driver feature, use a triple instead in rewriter ↵Benjamin Kramer2012-10-021-3/+1
| | | | | | test. llvm-svn: 164995
* Modern translator test. Breakup test into two andFariborz Jahanian2012-10-012-8/+28
| | | | | | skip the x86_64 version for mingw32 and win32. llvm-svn: 164977
* Rename a test I just added.Fariborz Jahanian2012-10-011-0/+0
| | | | llvm-svn: 164971
* objective-C modern translator. Test for producing bothFariborz Jahanian2012-10-011-0/+34
| | | | | | | 32bit and 64bit version of modern translator. // rdar://12189793 llvm-svn: 164970
* StmtPrinter: Print floating point literals with the right suffix to ↵Benjamin Kramer2012-09-202-2/+2
| | | | | | | | disambiguate them from integers. Based on a patch by Olaf Krzikalla, UDL fixes by me. llvm-svn: 164303
* Modern objc translator: Fixes a crash in rewriter when rewriting the APIFariborz Jahanian2012-08-211-0/+30
| | | | | | for structure valued method messaging. // rdar://12142241 llvm-svn: 162303
* Remove dependency on string.hFariborz Jahanian2012-06-291-1/+1
| | | | llvm-svn: 159475
* objective-c modern translator: synthesize argument typeFariborz Jahanian2012-06-291-0/+3
| | | | | | | correctly for blocks and function pointer arguments in the written constructor. // rdar://11359268 llvm-svn: 159456
* objective-c modern translator: Translation into objc_msgSend_stretFariborz Jahanian2012-06-292-1/+44
| | | | | | | entry point which requires nil check before calling objc_msgSend_stret. // rdar://11359268 - wip. llvm-svn: 159445
* Restructure how the driver communicates information about theJohn McCall2012-06-2087-89/+89
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* modern objc translation: Add translation of @autoreleasepoolFariborz Jahanian2012-05-231-0/+32
| | | | | | statement. // rdar://11474836. llvm-svn: 157359
* [objc] When boxing a BOOL/NSInteger/NSUInteger type, use the correspondingArgyrios Kyrtzidis2012-05-101-0/+4
| | | | | | | | numberWithBool:/numberWithInteger:/numberWithUnsignedInteger: NSNumber selectors. rdar://11428703 llvm-svn: 156583
OpenPOWER on IntegriCloud