Hans Wennborg
be4be16be3
Don't suppress warning about dllimport on typedefs etc. in MicrosoftExt mode
...
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
2014-05-23 20:16:41 +00:00
Hans Wennborg
f436b2837c
An inline function redeclaration does not drop the dllimport attribute
...
llvm-svn: 209449
2014-05-22 15:46:15 +00:00
Nico Rieck
6047866232
Reorganize and improve semantic tests for dllexport/import
...
llvm-svn: 201947
2014-02-22 19:47:30 +00:00
Nico Rieck
4f6428030d
Use -target instead of ignored -arch to fix x86_64 builders
...
llvm-svn: 201480
2014-02-16 08:18:13 +00:00
Nico Rieck
e6a1582595
Fix broken CHECK lines
...
llvm-svn: 201477
2014-02-16 07:29:41 +00:00
Aaron Ballman
3e424b5070
Teach the diagnostics engine about the Attr type to make reporting on 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
2013-12-26 18:30:57 +00:00
Alp Toker
99416d3ef2
Correct test to target 'unknown'
...
llvm-svn: 196060
2013-12-02 03:50:16 +00:00
Fariborz Jahanian
d38951acff
ObjectiveC modern translator. Fixes a translation bug
...
tranalation @protocol expression. // rdar://15517895
llvm-svn: 195480
2013-11-22 18:43:41 +00:00
Fariborz Jahanian
d29406233b
ObjectiveC modern rewriter. Rewrite typedefs
...
declared locally in ObjectiveC containers.
// rdar://15143875
llvm-svn: 192127
2013-10-07 19:54:22 +00:00
Rafael Espindola
ea1ba0adfc
Replace -fobjc-default-synthesize-properties with 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
2013-09-27 20:21:48 +00:00
Fariborz Jahanian
0dded8ab04
Revert my patch in r191155 to allow forward
...
class/protocol decls in @implementation and
fixup modern rewriter to handle that.
// rdar://15066233
llvm-svn: 191311
2013-09-24 17:03:07 +00:00
Fariborz Jahanian
ff0c460863
ObjectiveC modern translator: Provide proper cast of
...
the ObjectiveC object of an @synchronized statement.
// rdar://14993814
llvm-svn: 190874
2013-09-17 17:51:48 +00:00
Fariborz Jahanian
b1a2124652
Modern ObjectiveC translator. Fix translation of
...
message sent to aggregate-valued methods. Fix
visibility of trampoline type used in translation
of such expressions. // rdar://14932320
llvm-svn: 190341
2013-09-09 19:59:59 +00:00
Fariborz Jahanian
6c0af64f0c
ObjectiveC modern translator: fix up generated fast enumeration
...
code to work for bit 32bit and 64bit APIs.
// rdar://14913632
llvm-svn: 190072
2013-09-05 17:17:32 +00:00
Eli Friedman
0718591771
Adjust clang for change to APFloat::toString.
...
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
2013-08-29 23:44:43 +00:00
Roman Divacky
718fb1cdf9
Make the information about disabled ARCMT/Rewriter/StaticAnalyzer available
...
to lit and use this info to disable Analysis/FixIt/Rewriter/Analysis tests
when those are not compiled into clang.
llvm-svn: 189395
2013-08-27 19:27:35 +00:00
Tim Northover
19ae1175ae
Fix FileCheck --check-prefix lines.
...
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
2013-08-12 12:51:05 +00:00
Rafael Espindola
925213b0fa
Add 'not' to commands that are expected to fail.
...
This is at least good documentation, but also opens the possibility of
using pipefail.
llvm-svn: 185652
2013-07-04 16:16:58 +00:00
Rafael Espindola
273bc841b3
Define id to the correct type.
...
Found this while working on pr16247. The fix for that bug will cause clang to
reject this.
llvm-svn: 183545
2013-06-07 18:41:01 +00:00
Nico Weber
4e8626f708
Objective-C: Correctly encode 'retain' and 'copy' for readonly properties.
...
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
2013-05-08 23:47:40 +00:00
Richard Smith
3b87038631
Fix PR15845: apparently MSVC does not support implicit int in C++ mode.
...
llvm-svn: 180822
2013-04-30 22:43:51 +00:00
Fariborz Jahanian
3a65ce3a56
Objective-C modern rewriter. Fixes a bug
...
rewriting typedef for a qualified object type
and also when two declarations happen to be on the
same line. // rdar://13562505
llvm-svn: 178680
2013-04-03 19:11:21 +00:00
Fariborz Jahanian
e0a75d67a3
Objective-C modern translator. Don't put line info
...
into the pre-preprocessed file to be passed to
modern translator when compiling in no debug mode.
// rdar://13138170
llvm-svn: 177311
2013-03-18 19:41:18 +00:00
Fariborz Jahanian
b0fdab26d1
objective-C modern translator: Fixes a mistranslation
...
of @throw statement by finding location of the ';'
correctly. // rdar://13186010
llvm-svn: 174898
2013-02-11 19:30:33 +00:00
Fariborz Jahanian
4254cdb7ed
objective-C modern translation: Fix another random translation bug
...
involving property getter expressions on rhs of property setter.
// rdar://13138459
llvm-svn: 174729
2013-02-08 18:57:50 +00:00
Fariborz Jahanian
e8730a3558
objective-C modern translator. Fixes a trivial
...
rewriting bug where #ifdef ended up on the same
line as the attribute declaration.
llvm-svn: 174719
2013-02-08 17:15:07 +00:00
Fariborz Jahanian
e4c7e855f1
objective-C modern translator. Generate #line
...
info in the translated code under -g only.
// rdar://13138170
llvm-svn: 174684
2013-02-08 00:27:34 +00:00
Fariborz Jahanian
e499613d60
objective-C modern translator. More fixups for
...
modern meta-data abi translation. Still wip.
// rdar://13138459
llvm-svn: 174672
2013-02-07 22:50:40 +00:00
Fariborz Jahanian
57dd66baa4
objective-C modern translator. Fix up the translated
...
metadata to handle ivar bitfields. This is wip.
// rdar://13138459
llvm-svn: 174573
2013-02-07 01:53:15 +00:00
Benjamin Kramer
e42d406105
-arch is a darwin-specific driver feature, use a triple instead in rewriter test.
...
llvm-svn: 164995
2012-10-02 09:42:36 +00:00
Fariborz Jahanian
e2a9d42297
Modern translator test. Breakup test into two and
...
skip the x86_64 version for mingw32 and win32.
llvm-svn: 164977
2012-10-01 23:25:52 +00:00
Fariborz Jahanian
40b169ec68
Rename a test I just added.
...
llvm-svn: 164971
2012-10-01 21:21:50 +00:00
Fariborz Jahanian
572cc970fb
objective-C modern translator. Test for producing both
...
32bit and 64bit version of modern translator.
// rdar://12189793
llvm-svn: 164970
2012-10-01 20:55:56 +00:00
Benjamin Kramer
8a52676b85
StmtPrinter: Print floating point literals with the right suffix to disambiguate them from integers.
...
Based on a patch by Olaf Krzikalla, UDL fixes by me.
llvm-svn: 164303
2012-09-20 14:07:17 +00:00
Fariborz Jahanian
f1f36c6a9a
Modern objc translator: Fixes a crash in rewriter when rewriting the API
...
for structure valued method messaging. // rdar://12142241
llvm-svn: 162303
2012-08-21 18:56:50 +00:00
Fariborz Jahanian
e55c61bc51
Remove dependency on string.h
...
llvm-svn: 159475
2012-06-29 23:48:43 +00:00
Fariborz Jahanian
2794ad59aa
objective-c modern translator: synthesize argument type
...
correctly for blocks and function pointer arguments
in the written constructor. // rdar://11359268
llvm-svn: 159456
2012-06-29 19:55:46 +00:00
Fariborz Jahanian
4a031bdc8f
objective-c modern translator: Translation into objc_msgSend_stret
...
entry point which requires nil check before calling objc_msgSend_stret.
// rdar://11359268 - wip.
llvm-svn: 159445
2012-06-29 18:27:08 +00:00
John McCall
5fb5df9c83
Restructure how the driver communicates information about the
...
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
2012-06-20 06:18:46 +00:00
Fariborz Jahanian
9b43c3f0c5
modern objc translation: Add translation of @autoreleasepool
...
statement. // rdar://11474836.
llvm-svn: 157359
2012-05-23 23:47:20 +00:00
Argyrios Kyrtzidis
6062da47b8
[objc] When boxing a BOOL/NSInteger/NSUInteger type, use the corresponding
...
numberWithBool:/numberWithInteger:/numberWithUnsignedInteger: NSNumber selectors.
rdar://11428703
llvm-svn: 156583
2012-05-10 23:12:03 +00:00
Fariborz Jahanian
b6e9b6cfe7
Test for previously checked in patch.
...
// rdar://11374235
llvm-svn: 156552
2012-05-10 17:05:15 +00:00
Fariborz Jahanian
44645837bc
Remove this test again which fails the build-bot for reasons yet
...
unknown to me.
llvm-svn: 156480
2012-05-09 17:18:19 +00:00
Fariborz Jahanian
cbabea83d4
Re-add test for // rdar://11374235
...
llvm-svn: 156477
2012-05-09 16:15:46 +00:00
Fariborz Jahanian
f60f5ee43d
Remove thid test for now.
...
llvm-svn: 156455
2012-05-09 00:27:52 +00:00
Fariborz Jahanian
89919ccd17
Modern objective-c translation. Translating default
...
synthesis of property getter/setters. // rdar://11374235
llvm-svn: 156447
2012-05-08 23:54:35 +00:00
Fariborz Jahanian
9c0c0501e8
modern objc translation. objc_getClass() and objc_getMetaClass()
...
prototypes should both return `struct objc_class *`.
// rdar://11375495
llvm-svn: 156418
2012-05-08 20:55:55 +00:00
Douglas Gregor
8a59a957fb
Revert r156097, which appears to be causing some breakage.
...
llvm-svn: 156304
2012-05-07 14:17:47 +00:00
Fariborz Jahanian
e9863b5c8e
objc modern translator: fix up attribute for dynamic property in a category.
...
// rdar://11095151
llvm-svn: 156127
2012-05-03 23:19:33 +00:00
Fariborz Jahanian
f687e7b2ff
modern objc translator: support for default property
...
synthesis translation. // rdar://11374235 - wip.
llvm-svn: 156125
2012-05-03 22:52:13 +00:00