Douglas Gregor
e174bd05ca
If we're generating code to create a pointer-to-member function
...
aggregate and the result of the aggregate is unused, bail out
early. Fixes PR7027.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102942 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 20:00:27 +00:00
Anders Carlsson
32897fd3bd
When computing the address of a virtual member function pointer, use the pointer width instead of hardcoding for 64-bit.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102921 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-03 16:05:06 +00:00
Anders Carlsson
585fa68ca0
Use the right type when taking the address of a non-virtual member function pointer. Fixes PR6258.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95524 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-07 17:37:13 +00:00
Anders Carlsson
e8a81f7e8e
Calculate offset correctly when taking the address of a virtual member function.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95305 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-04 16:38:05 +00:00
Eli Friedman
3005efeb13
Make the AST explicitly represent the cast of the first operand of a
...
pointer-to-member operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93592 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 00:00:48 +00:00
Anders Carlsson
7af4ec744e
When emitting member function pointers, use the canonical decl if the member function is virtual. Fixes PR5940.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92680 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 05:04:05 +00:00
Daniel Dunbar
a5728872c7
Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
...
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 20:14:24 +00:00
Eli Friedman
3a1737030e
Move the code for converting a member pointer to a bool so that it is usable
...
for logical not.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91112 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 09:26:29 +00:00
Eli Friedman
b81c786de5
Fix for PR5718: implement equality comparisons for member function pointers.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91108 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 07:36:43 +00:00
Eli Friedman
9b3727457d
Some member pointer casting tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89989 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-27 04:56:40 +00:00
Anders Carlsson
a4c98cd60e
Convert the && and || operands to bool using standard conversions. Fixes PR5593.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89704 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 21:47:44 +00:00
Anders Carlsson
bc0e0781da
Handle converting member pointers to bool.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89692 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-23 20:04:44 +00:00
Daniel Dunbar
47d1e82867
Fix some tests in -Asserts mode.
...
- FileCheck is a *huuuuge* improvement here.
- Still feels like we could use a better tool for this though, either teach
llvm-dis to spit out the FileCheck syntax, or provide another tool to turn a
.ll into a "matchable" input.
- Also on my Christmas list is better FileCheck diagnostics with missing
variables or mismatches.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86800 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-11 03:48:26 +00:00
Anders Carlsson
bb378cbf04
Use CK_BitCast for member function pointer casts. Fixes PR5138.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84438 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 20:31:03 +00:00
Anders Carlsson
3eea635041
Don't assume that the LHS and RHS of a member pointer expression is a DeclRefExpr. Fixes PR5177.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83986 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 17:41:28 +00:00
Anders Carlsson
375c31c467
Implement code generation of member function pointer calls. Fixes PR5121.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83271 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03 19:43:08 +00:00
Anders Carlsson
a024d17048
Teach AggExprEmitter about pointers to member functions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83266 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03 15:43:24 +00:00
Anders Carlsson
2c51f092e4
Handle base-to-derived casts of member function pointers in CGExprConstant.cpp
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83265 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03 15:13:22 +00:00
Anders Carlsson
f57b4e44d0
Handle members to function pointers in CGExprConstant.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83264 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03 15:02:02 +00:00
Anders Carlsson
ee383163a6
Rewrite member function pointer test not to rely on -O2.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03 14:39:13 +00:00
Anders Carlsson
7b69956387
Forgot test.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 03:38:56 +00:00