Chris Lattner
46a7ad7605
get some i32/i8/i1 constants from Builder, which is much less painful than
...
using ConstantInt::get.
llvm-svn: 120527
2010-12-01 01:47:15 +00:00
Douglas Gregor
e2e50d331c
Implement AST import support for class template specializations.
...
llvm-svn: 120523
2010-12-01 01:36:18 +00:00
Fariborz Jahanian
68500913ec
When unknown method is sent to a receiver of
...
'Class' type, disgnostic should refere to a
class method. Fixes // rdar://8592156
llvm-svn: 120517
2010-12-01 01:07:24 +00:00
John McCall
5a39bd2443
A CGRecordLayout object persists. Since its contained types may
...
refer to opaque types, they must be held via PATypeHolders. I'm
not sure why this hasn't blown up before.
llvm-svn: 120491
2010-11-30 23:21:46 +00:00
John McCall
bcd38217f3
CGRecordLayoutBuilder does not need to be exported from this module.
...
llvm-svn: 120489
2010-11-30 23:17:27 +00:00
Fariborz Jahanian
3a4ea9a76c
Declaring local static in global block
...
literal declaration caused crash in CodeGen.
This patch fixes it. pr8707
llvm-svn: 120486
2010-11-30 23:07:14 +00:00
Argyrios Kyrtzidis
e72f7154f1
Follow through references to catch returned stack addresses, local blocks, label addresses or references to temporaries, e.g:
...
const int& g2() {
int s1;
int &s2 = s1; // expected-note {{binding reference variable 's2' here}}
return s2; // expected-warning {{reference to stack memory associated with local variable 's1' returned}}
}
llvm-svn: 120483
2010-11-30 22:57:32 +00:00
Douglas Gregor
a082a49d9e
Implement basic AST importing and merging support for class template
...
declarations.
llvm-svn: 120448
2010-11-30 19:14:50 +00:00
Douglas Gregor
5d02a7e553
Eliminate more pointless default statements
...
llvm-svn: 120446
2010-11-30 19:14:03 +00:00
John McCall
4f22c9de48
L-value to r-value conversion is not ready for prime-time.
...
llvm-svn: 120433
2010-11-30 17:58:55 +00:00
Fariborz Jahanian
e8473c2feb
Such function decls,as objc's objc_msgSend, builtins in
...
a specific language. We are adding such language info. by
extensing Builtins.def and via a language flag added
to LIBBUILTIN/BUILTIN and check for that when deciding
a name is builtin or not. Implements //rdar://8689273.
llvm-svn: 120429
2010-11-30 17:35:24 +00:00
John McCall
824fd1dcff
Introduce an r-value to l-value cast kind. I'm not promising anything
...
about the reliability of this yet.
llvm-svn: 120422
2010-11-30 10:13:06 +00:00
John McCall
a048c30215
Make the dumper safe against null declaration names.
...
llvm-svn: 120421
2010-11-30 10:12:16 +00:00
Nick Lewycky
c25eb5d051
Take John McCall's suggestion and fix this silly gcc warnings in a way that
...
Doug isn't likely to rip back out.
llvm-svn: 120409
2010-11-30 07:50:28 +00:00
Douglas Gregor
3c9deef16a
I hate pointless default statements
...
llvm-svn: 120402
2010-11-30 06:40:00 +00:00
Douglas Gregor
2f53a0bbf2
Harden CGDebugInfo::CreateType() a bit for cases where we couldn't generate type info for its component types
...
llvm-svn: 120401
2010-11-30 06:38:09 +00:00
Douglas Gregor
f88e35ba0b
When using a precompiled preamble with detailed preprocessing records,
...
trap the serialized preprocessing records (macro definitions, macro
instantiations, macro definitions) from the generation of the
precompiled preamble, then replay those when walking the list of
preprocessed entities. This eliminates a bug where clang_getCursor()
wasn't able to find preprocessed-entity cursors in the preamble.
llvm-svn: 120396
2010-11-30 06:16:57 +00:00
Douglas Gregor
936a5b44ee
When loading a precompiled preamble, use the file ID of the
...
precompiled preamble as the "main" source file's file ID within the
source manager. This makes compiling with a precompiled preamble
produce the same source locations as when compiling without the
precompiled preamble; prior to this change, we ended up with different
file IDs for source locations within the precompiled preamble
vs. those after the precompiled preamble, even for entities (e.g.,
preprocessing entities) in the same file.
llvm-svn: 120390
2010-11-30 05:23:00 +00:00
Nico Weber
ebd45a004d
Fix bug in r120299 spotted by dgregor.
...
llvm-svn: 120389
2010-11-30 04:44:33 +00:00
John McCall
4cec5f806b
Fix another case of giving the wrong value kind to a dependent cast to
...
a non-dependent type.
llvm-svn: 120384
2010-11-30 02:05:44 +00:00
Nick Lewycky
c4f482b1b7
Add a default clause to avoid this GCC warning:
...
Type.cpp:1000: warning: control reaches end of non-void function
llvm-svn: 120376
2010-11-30 01:28:32 +00:00
Argyrios Kyrtzidis
091d97c709
Revert r120331 since it causes spurious warnings and a possible assertion hit when self-host.
...
llvm-svn: 120351
2010-11-29 23:42:03 +00:00
Fariborz Jahanian
e1802eefac
Incomplete enum types not to be treated as integer type
...
when checking for integer signed/unsigned-ness. PR8694,
// rdar://8707031
llvm-svn: 120345
2010-11-29 23:18:09 +00:00
Argyrios Kyrtzidis
569cad9734
Emit warnings if we are returning a reference to a local temporary.
...
The issue was brought to our attention by Matthieu Monrocq.
llvm-svn: 120331
2010-11-29 22:32:08 +00:00
Nico Weber
44887f69d5
Always use a function's decl context when building default arguments. Fixes http://http://llvm.org/pr8479 .
...
llvm-svn: 120299
2010-11-29 18:19:25 +00:00
Michael J. Spencer
8aaf49959c
Merge System into Support.
...
llvm-svn: 120297
2010-11-29 18:12:39 +00:00
John McCall
032092ffc2
Revert r120063, it was wrong.
...
llvm-svn: 120296
2010-11-29 18:01:58 +00:00
Douglas Gregor
da4a6272fa
I hate default statements
...
llvm-svn: 120293
2010-11-29 17:45:20 +00:00
Douglas Gregor
e9186e6d48
When performing code completion within ASTUnit, allocate the AugmentedCodeCompleteConsumer on the heap, so it's always cleaned up properly
...
llvm-svn: 120290
2010-11-29 16:13:56 +00:00
Douglas Gregor
a50ad13752
Teach the ASTImporter how to create CXXMethodDecls. Somehow, this case was missed previously
...
llvm-svn: 120289
2010-11-29 16:04:58 +00:00
Anders Carlsson
acf877be12
Don't store the maximum alignment, we can trivially compute it.
...
llvm-svn: 120268
2010-11-28 23:06:23 +00:00
Nico Weber
dcf6fc5dc4
Revert parts of r120266 that I did not mean to commit
...
llvm-svn: 120267
2010-11-28 22:58:38 +00:00
Nico Weber
20c9f1db48
Minor whitespace and comment fixes. No functionality change.
...
llvm-svn: 120266
2010-11-28 22:53:37 +00:00
Anders Carlsson
a459adb2ff
More work on laying out virtual bases.
...
llvm-svn: 120257
2010-11-28 19:18:44 +00:00
Anders Carlsson
3378d870d2
BuildVirtualCall doesn't need to take a reference to a pointer.
...
llvm-svn: 120252
2010-11-28 17:53:32 +00:00
Anders Carlsson
e8ba473ed2
Make the destructor be the 'vtable anchor' of the CGCXXABI class.
...
llvm-svn: 120251
2010-11-28 17:50:09 +00:00
Anders Carlsson
fdee32f8ed
Move CGCXXABI functions to CGCXXABI.cpp
...
llvm-svn: 120250
2010-11-28 17:49:03 +00:00
Anders Carlsson
81f6f3626e
Add a CGCXXABI.cpp file.
...
llvm-svn: 120249
2010-11-28 17:46:52 +00:00
Anders Carlsson
66bbf50877
Look through parentheses when deciding whether an expr is a temporary object. Fixes PR8683.
...
llvm-svn: 120247
2010-11-28 16:40:49 +00:00
Chandler Carruth
7e1fd053d5
Add GCC 4.4.5 for Gentoo, and order them in a more sensible way. This allows
...
Gentoo systems with multiple versions to pick up the newest one first. This is
especially important with Gentoo because some of the older versions are left on
systems in strange states.
llvm-svn: 120238
2010-11-28 07:20:14 +00:00
Rafael Espindola
739b9cf104
Add missing else.
...
llvm-svn: 120231
2010-11-28 01:08:36 +00:00
Sebastian Redl
346203105f
Allow access to non-static members without an object in sizeof expressions, in C++0x. Patch by Jakub Wieczorek.
...
llvm-svn: 120182
2010-11-26 16:28:07 +00:00
John McCall
29ac8e2ecd
For internal consistency's sake, compute the value kind of a dependent cast
...
based on the known properties of the casted-to type. Fixes a crash on spirit.
llvm-svn: 120180
2010-11-26 10:57:22 +00:00
Zhongxing Xu
e1e8565cd9
Do not use StripCasts() in this context.
...
llvm-svn: 120178
2010-11-26 09:14:07 +00:00
Zhongxing Xu
5afc4d80c7
Should not use StripCasts() in this context.
...
llvm-svn: 120177
2010-11-26 09:07:38 +00:00
Zhongxing Xu
032071688b
Rename CXXObjectRegion to CXXTempObjectRegion.
...
llvm-svn: 120176
2010-11-26 08:52:48 +00:00
Zhongxing Xu
ec0b8e32ee
Regionstore: support derived-to-base cast by creating a CXXBaseObjectRegion.
...
llvm-svn: 120173
2010-11-26 08:21:53 +00:00
Zhongxing Xu
e23ab6fae2
Add a fixme.
...
llvm-svn: 120172
2010-11-26 07:15:40 +00:00
Rafael Espindola
596402a87c
Add C++ header path for openSUSE 11.4.
...
Patch by İsmail Dönmez.
llvm-svn: 120154
2010-11-25 18:51:59 +00:00
Benjamin Kramer
90b5b68535
Hide a bunch of symbols.
...
llvm-svn: 120153
2010-11-25 18:29:30 +00:00