summaryrefslogtreecommitdiff
path: root/test/Rewriter
AgeCommit message (Collapse)Author
2017-08-24[clang] Remove unit test which uses reverse-iterate flagMandeep Singh Grang
Summary: This patch is in response to https://reviews.llvm.org/D35043 which removed -reverse-iterate flag. Reviewers: dblaikie, mehdi_amini Reviewed By: dblaikie Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D36386 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311720 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06 [Objective-C] Fix non-determinism in clangMandeep Singh Grang
Summary: Iteration of the unordered Ivars causes objc-modern-metadata-visibility.mm (uncovered by reverse iterating SmallPtrSet). Reviewers: dblaikie, davide, rsmith Reviewed By: dblaikie Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D34860 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307296 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-25[test] Port clang tests to canonicalized booleansMichal Gorny
Use the new llvm_canonicalize_cmake_booleans() function to canonicalize booleans for lit tests. Replace the duplicate ENABLE_CLANG* variables used to hold canonicalized values with in-place canonicalization. Use implicit logic in Python code to avoid overrelying on exact 0/1 values. Differential Revision: https://reviews.llvm.org/D28529 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-09Specify -std=gnu++98 on some Rewriter tests. NFC.Paul Robinson
Rewriter tests rewrite Objective-C++ to C++, and then compile the result. The rewritten result sometimes doesn't work with C++11. As we want to allow Clang's default dialect to become C++11, we need to make sure the tests will still pass. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289167 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-08Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249655 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26__declspec is not a core Clang language extension. Instead, require ↵Aaron Ballman
-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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238238 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-09[Objective-C modern translation]. Patch to fix type ofFariborz Jahanian
objc_msgSend's first argument to "Class" because objc_getClass is passed. rdar://20477025 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234520 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-14Add a bunch of missing "CHECK" colons in tests. NFC.Ahmed Bougacha
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232237 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-05Give some obj-c rewriter tests that use MS pragmas a triple as a speculative fixReid Kleckner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231320 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-27Update Clang tests to handle explicitly typed gep changes in LLVM.David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230783 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-28Objective-C modern rewriter. Patch to fix a rewriting bug Fariborz Jahanian
rewriting an Objective-C block. Patch by Ryan Govostes. rdar://18799145 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220834 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-16Make clang's rewrite engine a core featureAlp Toker
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213171 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-11Consolidate header inclusion diagnosticsAlp Toker
Make argument orders match, unify diagnostic IDs and reword the message to be a little less saccharine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212845 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-23Don't suppress warning about dllimport on typedefs etc. in MicrosoftExt modeHans Wennborg
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209546 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-22An inline function redeclaration does not drop the dllimport attributeHans Wennborg
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209449 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-22Reorganize and improve semantic tests for dllexport/importNico Rieck
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201947 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16Use -target instead of ignored -arch to fix x86_64 buildersNico Rieck
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201480 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16Fix broken CHECK linesNico Rieck
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201477 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-26Teach the diagnostics engine about the Attr type to make reporting on ↵Aaron Ballman
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198055 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-02Correct test to target 'unknown'Alp Toker
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196060 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-22ObjectiveC modern translator. Fixes a translation bugFariborz Jahanian
tranalation @protocol expression. // rdar://15517895 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195480 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-07ObjectiveC modern rewriter. Rewrite typedefsFariborz Jahanian
declared locally in ObjectiveC containers. // rdar://15143875 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192127 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27Replace -fobjc-default-synthesize-properties with ↵Rafael Espindola
disable-objc-default-synthesize-properties. We want the modern behavior most of the time, so inverting the option simplifies the driver and the tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191551 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24Revert my patch in r191155 to allow forwardFariborz Jahanian
class/protocol decls in @implementation and fixup modern rewriter to handle that. // rdar://15066233 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191311 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-17ObjectiveC modern translator: Provide proper cast ofFariborz Jahanian
the ObjectiveC object of an @synchronized statement. // rdar://14993814 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190874 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-09Modern ObjectiveC translator. Fix translation of Fariborz Jahanian
message sent to aggregate-valued methods. Fix visibility of trampoline type used in translation of such expressions. // rdar://14932320 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190341 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-05ObjectiveC modern translator: fix up generated fast enumerationFariborz Jahanian
code to work for bit 32bit and 64bit APIs. // rdar://14913632 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190072 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29Adjust clang for change to APFloat::toString.Eli Friedman
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189625 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-27Make the information about disabled ARCMT/Rewriter/StaticAnalyzer availableRoman Divacky
to lit and use this info to disable Analysis/FixIt/Rewriter/Analysis tests when those are not compiled into clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189395 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-12Fix FileCheck --check-prefix lines.Tim Northover
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188174 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-04Add 'not' to commands that are expected to fail.Rafael Espindola
This is at least good documentation, but also opens the possibility of using pipefail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185652 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07Define id to the correct type.Rafael Espindola
Found this while working on pr16247. The fix for that bug will cause clang to reject this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183545 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08Objective-C: Correctly encode 'retain' and 'copy' for readonly properties.Nico Weber
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181491 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30Fix PR15845: apparently MSVC does not support implicit int in C++ mode.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180822 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-03Objective-C modern rewriter. Fixes a bugFariborz Jahanian
rewriting typedef for a qualified object type and also when two declarations happen to be on the same line. // rdar://13562505 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178680 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18Objective-C modern translator. Don't put line infoFariborz Jahanian
into the pre-preprocessed file to be passed to modern translator when compiling in no debug mode. // rdar://13138170 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177311 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-11objective-C modern translator: Fixes a mistranslationFariborz Jahanian
of @throw statement by finding location of the ';' correctly. // rdar://13186010 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174898 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08objective-C modern translation: Fix another random translation bugFariborz Jahanian
involving property getter expressions on rhs of property setter. // rdar://13138459 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174729 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08objective-C modern translator. Fixes a trivialFariborz Jahanian
rewriting bug where #ifdef ended up on the same line as the attribute declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174719 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08objective-C modern translator. Generate #lineFariborz Jahanian
info in the translated code under -g only. // rdar://13138170 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174684 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07objective-C modern translator. More fixups for Fariborz Jahanian
modern meta-data abi translation. Still wip. // rdar://13138459 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174672 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07objective-C modern translator. Fix up the translatedFariborz Jahanian
metadata to handle ivar bitfields. This is wip. // rdar://13138459 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174573 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-02-arch is a darwin-specific driver feature, use a triple instead in rewriter ↵Benjamin Kramer
test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164995 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-01Modern translator test. Breakup test into two andFariborz Jahanian
skip the x86_64 version for mingw32 and win32. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164977 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-01Rename a test I just added.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164971 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-01objective-C modern translator. Test for producing bothFariborz Jahanian
32bit and 64bit version of modern translator. // rdar://12189793 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164970 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-20StmtPrinter: Print floating point literals with the right suffix to ↵Benjamin Kramer
disambiguate them from integers. Based on a patch by Olaf Krzikalla, UDL fixes by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164303 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-21Modern objc translator: Fixes a crash in rewriter when rewriting the APIFariborz Jahanian
for structure valued method messaging. // rdar://12142241 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162303 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29Remove dependency on string.hFariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159475 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29objective-c modern translator: synthesize argument typeFariborz Jahanian
correctly for blocks and function pointer arguments in the written constructor. // rdar://11359268 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159456 91177308-0d34-0410-b5e6-96231b3b80d8