Daniel Dunbar
ecac0a408c
Tweak clang testing.
...
- Move CMake to using the new test runner.
- Switch Makefiles to use the lit.site.cfg.in template.
- Remove explicit --path arguments, instead this gets written into the site
configuration. This means running lit from the command line should use the
exact same configuration as is used in 'make test', assuming it can find the
site configuration file. You still need to run 'make test' (or the cmake
build target equivalent) at least once.
llvm-svn: 82160
2009-09-17 19:55:53 +00:00
Douglas Gregor
4f15f4dec1
Merge uninstantiated default arguments more carefully, and try not to
...
complain about specializations of member functions that are not
definitions. Fixes PR4995.
llvm-svn: 82159
2009-09-17 19:51:30 +00:00
Anders Carlsson
ca51ef156b
Ignore extern "C++" { } when mangling.
...
llvm-svn: 82146
2009-09-17 16:12:20 +00:00
Daniel Dunbar
51418c3b90
Force triple for tests using __strong.
...
llvm-svn: 82133
2009-09-17 07:21:40 +00:00
Daniel Dunbar
1da76c4e58
Add ARM register names and aliases.
...
- Patch by Shantonu Sen!
<rdar://problem/6922650> clang doesn't know about ARM registers for inline asm clobber lists
llvm-svn: 82132
2009-09-17 07:03:19 +00:00
Daniel Dunbar
687fa86a30
Fix two crashes on value dependent expressions (shift and null-pointer check).
...
- Doug, please check.
- PR4940.
llvm-svn: 82129
2009-09-17 06:31:27 +00:00
Anders Carlsson
f96da57adb
Revert r82123 for now.
...
llvm-svn: 82125
2009-09-17 05:31:47 +00:00
Anders Carlsson
93b6d5e85e
Temporary band-aid for handling empty classes somewhat better.
...
llvm-svn: 82124
2009-09-17 04:42:56 +00:00
Anders Carlsson
49fe8b4f97
Treat an unqualified RecordType as a RecordDecl when substituting.
...
llvm-svn: 82123
2009-09-17 04:38:23 +00:00
Anders Carlsson
4245bf9e13
Substitution for prefixes.
...
llvm-svn: 82122
2009-09-17 04:16:28 +00:00
Anders Carlsson
90332b8db4
Convert mangle-subst.cpp over to using FileCheck.
...
llvm-svn: 82121
2009-09-17 04:13:54 +00:00
Anders Carlsson
a2fb9bcd19
Substitute unscoped template names.
...
llvm-svn: 82119
2009-09-17 04:02:31 +00:00
Daniel Dunbar
df0e62d0a1
IRgen/ObjC: Correctly construct the function info for variadic message sends.
...
This fixes some bad -O0 codegen and the unnecessary clearing of al on entry to objc_msgSend for most message sends.
<rdar://problem/7102824> [irgen] unnecessary xorb on calls to objc_msgSend on x86_64
llvm-svn: 82118
2009-09-17 04:01:40 +00:00
Anders Carlsson
3e0d1e0747
Get rid of the last grep.
...
llvm-svn: 82115
2009-09-17 03:48:45 +00:00
Anders Carlsson
df644fb773
When mangling function template specialization, mangle the type encoding of the original function template. Also, port mangle.cpp and function-template-specialization.cpp over to using FileCheck.
...
llvm-svn: 82114
2009-09-17 03:46:43 +00:00
Daniel Dunbar
e9fee8a361
Initial support for code generation from .ast files.
...
- Doesn't actually work yet because only module level asm's get correctly marked as externally visible in the PCH.
- Other things like 'clang-cc foo.ast -ast-dump' now work, as well.
llvm-svn: 82107
2009-09-17 00:48:13 +00:00
Daniel Dunbar
1188987e23
clang-cc: Remove -ObjC -ObjC++ handling from clang-cc.
...
llvm-svn: 82103
2009-09-17 00:47:27 +00:00
Anders Carlsson
feb60501a8
Add basic substitution to the C++ mangler. It currently only looks at types.
...
llvm-svn: 82102
2009-09-17 00:43:46 +00:00
Daniel Dunbar
db7ec04fed
Force triple, although probably the real fix is to tie __strong to -fobjc-gc.
...
llvm-svn: 82101
2009-09-17 00:28:00 +00:00
Daniel Dunbar
6f8f276ce4
Fix substituto.
...
llvm-svn: 82099
2009-09-17 00:07:21 +00:00
Anders Carlsson
b3e533d9d0
Add a simple const mangling test.
...
llvm-svn: 82096
2009-09-16 23:53:19 +00:00
Fariborz Jahanian
1ff8299c67
Removed useless stuff from the test.
...
llvm-svn: 82095
2009-09-16 23:52:53 +00:00
Fariborz Jahanian
0bdc001b6e
More test for objc gc's mixed write-barriers.
...
llvm-svn: 82094
2009-09-16 23:49:04 +00:00
Anders Carlsson
e7e163cc0b
When creating function types, remove any top-level CVR qualifications in the function type argument types.
...
llvm-svn: 82093
2009-09-16 23:47:08 +00:00
Fariborz Jahanian
e29f04859b
Additional tests for write-bariers.
...
llvm-svn: 82092
2009-09-16 23:38:26 +00:00
Fariborz Jahanian
5f41a8c4af
Test for variety of write-barriers.
...
llvm-svn: 82091
2009-09-16 23:30:59 +00:00
Fariborz Jahanian
de1d324dce
patch for generating objc'2 objc_assign_ivar. WIP.
...
llvm-svn: 82090
2009-09-16 23:11:23 +00:00
John McCall
11083da4d0
Improved representation and support for friend class templates. Angst about same.
...
llvm-svn: 82088
2009-09-16 22:47:08 +00:00
Douglas Gregor
8addadc691
CMake: Generate LIT site configuration file for Clang tests, which Daniel will probably have to fix
...
llvm-svn: 82086
2009-09-16 22:30:48 +00:00
Fariborz Jahanian
a7fa6beb2e
Starting patch to generate more specific API for objc's
...
GC. Currently, new API will be generated under
clang-cc's -fobjc-newgc-api flag which will eventually
become the default. WIP.
llvm-svn: 82082
2009-09-16 21:37:16 +00:00
Anders Carlsson
570af5d426
Improve handling of vector casts in C++.
...
llvm-svn: 82072
2009-09-16 19:19:43 +00:00
Douglas Gregor
64621e6eb3
Teach Sema::FindInstantiatedDecl to find instantiated RecordDecls even
...
when we are not instantiating the corresponding "current
instantiation." This happens, e.g., when we are instantiating a
declaration reference that refers into the "current instantiation" but
occurs in a default function argument. The libstdc++ vector default
constructor now instantiates properly.
llvm-svn: 82069
2009-09-16 18:34:49 +00:00
Fariborz Jahanian
cceedbff27
Do not generate write-barrier in indirect assignment to
...
a weak object.
llvm-svn: 82061
2009-09-16 18:09:18 +00:00
Anders Carlsson
20759ad54c
x86-64 ABI: If a type is a C++ record with either a non-trivial destructor or a non-trivial copy constructor, it should be passed in a pointer. Daniel, plz review.
...
llvm-svn: 82050
2009-09-16 15:53:40 +00:00
Ted Kremenek
4f335c300a
Have divide-by-zero checker not handled undefined denominators. This is handled by the generic checking for undefined operands for BinaryOperators.
...
llvm-svn: 82019
2009-09-16 06:04:26 +00:00
Daniel Dunbar
f47fd58476
tests: Stash clang/clang-cc and LLVM src/obj paths for use elsewhere.
...
llvm-svn: 81989
2009-09-16 01:39:52 +00:00
Mike Stump
1d0da3932e
Some people don't want to fix their broken code just yet, so turn off
...
hard error for falling off a noreturn function.
llvm-svn: 81971
2009-09-16 00:39:34 +00:00
Douglas Gregor
87f5406081
When implicitly declaring operators new, new[], delete, and delete[],
...
give them the appropriate exception specifications. This,
unfortunately, requires us to maintain and/or implicitly generate
handles to namespace "std" and the class "std::bad_alloc". However,
every other approach I've come up with was more hackish, and this
standard requirement itself is quite the hack.
Fixes PR4829.
llvm-svn: 81939
2009-09-15 22:30:29 +00:00
Fariborz Jahanian
adcea10410
1) don't do overload resolution in selecting conversion
...
to pointer function for delete expression. 2)
Treat type conversion function and its 'const' version
as identical in building the visible conversion list.
llvm-svn: 81930
2009-09-15 22:15:23 +00:00
Anders Carlsson
c8bfc466f3
Add back the workaround since it lead to constructor conversion bugs :(
...
llvm-svn: 81917
2009-09-15 21:14:33 +00:00
Douglas Gregor
45068b3e29
Commit test case from PR4655, which tests the canonical-types fix in r81913
...
llvm-svn: 81916
2009-09-15 21:14:05 +00:00
Douglas Gregor
4fb9cde8ef
When printing an overload candidate that is a function template specialization,
...
point at the template and print out its template arguments, e.g.,
ambiguous-ovl-print.cpp:5:8: note: candidate function template specialization
[with T = int]
void f(T*, long);
llvm-svn: 81907
2009-09-15 20:11:42 +00:00
Fariborz Jahanian
3e6b57e593
Issue good diagnostics when initialization failes due to
...
ambiguity in type conversion function selection.
llvm-svn: 81898
2009-09-15 19:12:21 +00:00
Douglas Gregor
31fae89497
Add an assertion and a test case, in a fruitless attempt to track down an existing bug
...
llvm-svn: 81885
2009-09-15 18:26:13 +00:00
Fariborz Jahanian
c34c179f4b
Perform overload resolution when selecting a pointer conversion
...
function for delete of a class expression and issue
good diagnostic when result is ambiguous.
llvm-svn: 81870
2009-09-15 17:21:47 +00:00
Douglas Gregor
00a511f0c1
Slightly improved template argument deduction for use in partial
...
ordering, along with another test case for partial ordering of partial
specializations.
llvm-svn: 81869
2009-09-15 16:51:42 +00:00
Anders Carlsson
160e635ba6
Add test case.
...
llvm-svn: 81868
2009-09-15 16:36:17 +00:00
Douglas Gregor
be999390eb
Implement partial ordering of class template partial specializations
...
(C++ [temp.class.order]).
llvm-svn: 81866
2009-09-15 16:23:51 +00:00
Anders Carlsson
6b2737d591
If a conversion operator exists in a base class, make sure to cast the object to that base class.
...
llvm-svn: 81852
2009-09-15 07:42:44 +00:00
Anders Carlsson
7cd39e0721
Handle reinterpret_cast between integral types and pointer types.
...
llvm-svn: 81837
2009-09-15 04:48:33 +00:00