Eli Friedman
16c209610c
Catch a few more cases of illegal comparisons.
...
llvm-svn: 79793
2009-08-23 00:27:47 +00:00
Chris Lattner
d99bd52c73
Eli points out that we really must diagnose "void* > 0" as an extension.
...
Explicitly add it as an EXTENSION instead of an EXTWARN so that it only
comes out with -pedantic. Thanks Eli!
llvm-svn: 79791
2009-08-23 00:03:44 +00:00
Anders Carlsson
faeccc622f
Handle CK_NullToMemberPointer casts in the constant expr emitter.
...
llvm-svn: 79790
2009-08-23 00:02:11 +00:00
Fariborz Jahanian
a83c016d22
Type of a ?: expression whose either expression is a built-in 'id'
...
type is 'id' type.
llvm-svn: 79781
2009-08-22 22:27:17 +00:00
Fariborz Jahanian
cbf10f5de5
Don't issue warning on multiple selector found when
...
selector name is for a @selector expression.
llvm-svn: 79776
2009-08-22 21:13:55 +00:00
Fariborz Jahanian
1b5d6133f9
Removed -Wundeclared-selector and -Wreadonly-setter-attrs from
...
-Wmost group (too noisy). Placed warning on parameter type
misatch between methods in sub and super class under
-Wsuper-class-method-mismatch (also too noisy).
llvm-svn: 79745
2009-08-22 19:24:56 +00:00
Chris Lattner
f8344dbfdd
tweak some pointer sema checking stuff (which was added to implement PR4175) to
...
avoid emitting a warning on "someptr > 0". This is obviously questionable (they
could use != instead) but is reasonable, and the warning "ordered comparison
between pointer and integer" didn't make a ton of sense because 0 is a valid
null pointer constant.
Just silence the warning in this case, it is unlikely to indicate a bug.
llvm-svn: 79743
2009-08-22 18:58:31 +00:00
Douglas Gregor
c45a40afd1
Implement delayed parsing for member function templates. Fixes PR4608.
...
llvm-svn: 79709
2009-08-22 00:34:47 +00:00
Douglas Gregor
da21f27e09
Add test taking the address of a member function template and converting it to a member pointer.
...
llvm-svn: 79699
2009-08-21 23:32:45 +00:00
Douglas Gregor
05155d8d7b
Implement conversion function templates, along with the ability to use
...
template argument deduction from a conversion function (C++
[temp.deduct.conv]) with implicit conversions.
llvm-svn: 79693
2009-08-21 23:19:43 +00:00
Douglas Gregor
e839486de9
Refactor instantiation of destructors to use the common CXXMethodDecl
...
code, fixing a problem where instantiations of out-of-line destructor
definitions would had the wrong lexical context.
Introduce tests for out-of-line definitions of the constructors,
destructors, and conversion functions of a class template partial
specialization.
llvm-svn: 79682
2009-08-21 22:43:28 +00:00
Fariborz Jahanian
8adc973483
Patch to ir-gen copy assigning array members when synthesizing
...
a copy assignment operator function.
llvm-svn: 79681
2009-08-21 22:34:55 +00:00
Douglas Gregor
25e8e363df
Add test for out-of-line definition of a conversion function
...
llvm-svn: 79679
2009-08-21 22:23:24 +00:00
Douglas Gregor
e5bbb7d4ef
Fix parsing for out-of-line definitions of constructors and
...
destructors of class templates.
llvm-svn: 79678
2009-08-21 22:16:40 +00:00
Douglas Gregor
5ed5ae476e
Introduce support for constructor templates, which can now be declared
...
and will participate in overload resolution. Unify the instantiation
of CXXMethodDecls and CXXConstructorDecls, which had already gotten
out-of-sync.
llvm-svn: 79658
2009-08-21 18:42:58 +00:00
Fariborz Jahanian
5626384384
Patch to provide ir-gen support in copying array members
...
when synthesizing a copy constructor. Arrays's base element
may have a trivial or non-trivial copy constructor.
llvm-svn: 79653
2009-08-21 18:30:26 +00:00
Mike Stump
62b6680def
Testcase for a recent checkin.
...
llvm-svn: 79646
2009-08-21 18:05:02 +00:00
Fariborz Jahanian
7481bd88bb
Array member construction in prologue of user-declared
...
constructors.
llvm-svn: 79640
2009-08-21 17:09:38 +00:00
Mike Stump
c947a87655
Fix typo.
...
llvm-svn: 79632
2009-08-21 15:22:41 +00:00
Mike Stump
a002945a20
We now support overriding base functions in vtables. WIP.
...
llvm-svn: 79587
2009-08-21 01:45:00 +00:00
Douglas Gregor
97628d6a4c
Implement support for calling member function templates, which involves:
...
- Allowing one to name a member function template within a class
template and on the right-hand side of a member access expression.
- Template argument deduction for calls to member function templates.
- Registering specializations of member function templates (and
finding them later).
llvm-svn: 79581
2009-08-21 00:16:32 +00:00
Fariborz Jahanian
9c0d05454a
Added member arrays to more tests now that ir-gen supports it.
...
llvm-svn: 79575
2009-08-20 23:33:31 +00:00
Fariborz Jahanian
1a606ab12a
Patch to ir-gen destruction of array member elements in revers order
...
of their construction.
llvm-svn: 79571
2009-08-20 23:02:58 +00:00
Douglas Gregor
3447e76762
Initial support for parsing and representation of member function templates.
...
llvm-svn: 79570
2009-08-20 22:52:58 +00:00
Mike Stump
cae6178b3b
Refine vbase offsets for the inductive case. Things are now starting
...
to come together nicely. Still a WIP.
llvm-svn: 79521
2009-08-20 07:22:17 +00:00
Ted Kremenek
815fbb6026
retain/release checker: Treat NSObject method '-awakeAfterUsingCoder:'
...
just as if it behaved like an init function. This fixes <rdar://problem/7129086>.
llvm-svn: 79515
2009-08-20 05:13:36 +00:00
Ted Kremenek
e95b439cc3
Make this test case more portable by removing its dependency on system header files.
...
llvm-svn: 79511
2009-08-20 04:48:23 +00:00
Eli Friedman
629ffb9ad3
Fix bit-field promotion to be a bit closer to the behavior of gcc.
...
Patch by Enea Zaffanella, with some simplifications/corrections to
isPromotableBitField by me.
llvm-svn: 79510
2009-08-20 04:21:42 +00:00
Mike Stump
2220447adc
Ensure we don't output repeated vbase offsets. I have a testcase for
...
this, but need to fixup the actual offset value before I can check it
in. WIP.
llvm-svn: 79506
2009-08-20 02:11:48 +00:00
John McCall
87a44eb98a
Basic nested-template implementation.
...
llvm-svn: 79504
2009-08-20 01:44:21 +00:00
Fariborz Jahanian
dd46eb770f
Test case for my last patch plus a minor clean up.
...
llvm-svn: 79500
2009-08-20 01:01:06 +00:00
Ted Kremenek
d982f001c9
retain/release checker: Special case handling of CFAttributedStringSetAttribute,
...
fixing <rdar://problem/7152619>. Along the way, merge test cases in
'test/Analysis/rdar-6539791.c' into 'test/Analysis/retain-release.m'.
llvm-svn: 79499
2009-08-20 00:57:22 +00:00
Mike Stump
6bc4aac878
Update for recent improvements.
...
llvm-svn: 79421
2009-08-19 13:36:31 +00:00
Eli Friedman
5ae98ee006
Make integer promotions work correctly on PIC16 and other platforms
...
where sizeof(short) == sizeof(int). Move UsualArithmeticConversionsType
out of Sema, since it was only there as a historical artifact. Patch by
Enea Zaffanella.
llvm-svn: 79412
2009-08-19 07:44:53 +00:00
Mike Stump
984c99d190
Restore vbase offsets for classes without a primary.
...
llvm-svn: 79402
2009-08-19 02:53:08 +00:00
Mike Stump
583ef62149
Refine vcalls a little.
...
llvm-svn: 79400
2009-08-19 02:06:38 +00:00
Daniel Dunbar
d04405f036
Add test for finding bfin backend.
...
llvm-svn: 79326
2009-08-18 07:07:14 +00:00
Daniel Dunbar
2a4061929f
Fix some made up triples.
...
llvm-svn: 79316
2009-08-18 05:30:27 +00:00
Fariborz Jahanian
d172e91f2a
Patch to 1) synthesizing non-trivial default destructor when
...
one is not provided by user. 2) More complete
emission of ctor prologue when it has no initializer
list or when it is synthesized.
llvm-svn: 79269
2009-08-17 19:04:50 +00:00
Daniel Dunbar
3a4fc4b2ec
XFAIL this test for now. David/Steve, please sort out the correct fix.
...
llvm-svn: 79259
2009-08-17 18:01:54 +00:00
Anders Carlsson
81f0df9601
Improve handling of delete expressions.
...
llvm-svn: 79205
2009-08-16 21:13:42 +00:00
Mike Stump
996576f3aa
Refine vbase offset calculations. WIP.
...
llvm-svn: 79198
2009-08-16 19:04:13 +00:00
Chris Lattner
2ba5ca9d4f
Improve the diagnostic emitted when an unused ObjC property getter
...
is found. Instead of complaining about a generic "unused expr",
emit:
t.m:7:3: warning: property access result unused - getters should not have side effects
While objc property getters *could* have side effects, according to
the language best practices, they *shouldn't*. Hopefully the
diagnostic now gets this across.
llvm-svn: 79192
2009-08-16 16:57:27 +00:00
Anders Carlsson
e80ccac2cb
Call MaybeBindToTemporary for overloaded binary and unary operators.
...
llvm-svn: 79173
2009-08-16 04:11:06 +00:00
Anders Carlsson
1c83debc36
Call MaybeBindToTemporary when constructing functino call operator calls.
...
llvm-svn: 79172
2009-08-16 03:53:54 +00:00
Anders Carlsson
8c84c206d9
Add MaybeBindToTemporary calls for member call expressions.
...
llvm-svn: 79171
2009-08-16 03:42:12 +00:00
Anders Carlsson
f898401305
Make sure to call MaybeBindToTemporary when creating CallExprs.
...
llvm-svn: 79168
2009-08-16 03:06:32 +00:00
Mike Stump
94bc52c03b
Use the -NEXT feature of FileCheck.
...
llvm-svn: 79166
2009-08-16 02:40:14 +00:00
Mike Stump
22ea1f8a30
Cleanups and fixups for calculating the virtual base offsets. WIP.
...
llvm-svn: 79156
2009-08-16 01:46:26 +00:00
Anders Carlsson
445af45c29
Add a simple test for temporaries.
...
llvm-svn: 79147
2009-08-15 22:30:50 +00:00