Граф коммитов

15025 Коммитов

Автор SHA1 Сообщение Дата
John McCall d520253666 Add a reduced test case for the weak ivar infinite recursion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82747 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 02:18:37 +00:00
Anders Carlsson a4c6081abd Who would have thought that empty classes were so tricky? Handle cases where an empty virtual base class needs to be moved aside because it conflicts with the first field.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82746 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 01:54:38 +00:00
John McCall a180529e3d Fix an infinite loop arising when trying to generate debug information
for a ObjC class with an ivar of weak self type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 01:40:47 +00:00
Anders Carlsson fbbce49c11 Handle array fields that contain empty structs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82744 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 01:23:32 +00:00
Ted Kremenek 80417471b0 Fix <rdar://problem/7249327> by allowing silent conversions between signed and unsigned integer values for symbolic values. This is an intermediate solution (i.e. hack) until we support extension/truncation of symbolic integers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82737 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 00:18:15 +00:00
Anders Carlsson 6026504302 More work on empty classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82736 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 00:02:51 +00:00
Fariborz Jahanian 76368e843c Fixed another code gen bug in objc's new write-barrier API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82735 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 00:00:20 +00:00
Anders Carlsson 8fdccd95fc Improve the record layout dumper.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82733 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 23:50:42 +00:00
Douglas Gregor 7dfd0fb083 When entering the scope of a declarator, make sure that the scope is
complete (or, possibly causing template instantiation).

Test this via some explicit specializations of member functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82732 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 23:39:01 +00:00
John McCall 6b304a0254 Make it really, really easy to change the alignment of Type (and ExtQuals).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82730 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 23:30:46 +00:00
Douglas Gregor b9aa6b214c WIP implementation of explicit function template specialization. This
first implementation recognizes when a function declaration is an
explicit function template specialization (based on the presence of a
template<> header), performs template argument deduction + ambiguity
resolution to determine which template is being specialized, and hooks

There are many caveats here:
  - We completely and totally drop any explicitly-specified template
  arguments on the floor
  - We don't diagnose any of the extra semantic things that we should
  diagnose. 
  - I haven't looked to see that we're getting the right linkage for
  explicit specializations

On a happy note, this silences a bunch of errors that show up in
libstdc++'s <iostream>, although Clang still can't get through the
entire header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82728 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 23:14:47 +00:00
Douglas Gregor 119fa68eb1 Clean up the CodeCompletion testsuite's use of FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82726 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 22:57:42 +00:00
Mike Stump bb30419d81 Fix 80-col violation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82725 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 22:31:14 +00:00
Fariborz Jahanian 6c7a1f3647 Patch fixes a code gen. bug in generation of objc_assign_ivar
(objc GC's API).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82724 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 22:25:38 +00:00
John McCall 2ff248911b Update the PTH performance "script".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82718 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 22:03:45 +00:00
Steve Naroff ff9e18cb38 Add test for C-based indexing API, using FileCheck utility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82706 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 20:03:06 +00:00
John McCall 0953e767ff Refactor the representation of qualifiers to bring ExtQualType out of the
Type hierarchy.  Demote 'volatile' to extended-qualifier status.  Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right;  many more remain.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 19:53:00 +00:00
Chris Lattner e7a5fd4a29 wpa is an experiment, don't build it by default, it adds to build times due to everything it links in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82704 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 19:45:12 +00:00
Anders Carlsson 78762ebb9a Add a -dump-record-layouts argument to clang-cc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 18:54:49 +00:00
Ted Kremenek 6c2497248b When building CFGs, no longer reverse the statements in the CFGBlock. Instead
have the iterators and operator[] handle the traversal of statements, as they
are stored in reverse order. Tests show this has no real performance impact, but
it does simply the CFG construction logic and will make it slightly easier to
change the allocation strategy for CFGBlocks (as we have fewer copies).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 18:45:41 +00:00
Daniel Dunbar 584425c301 cmake: Run tests with 'verbose' enabled by default, so that the failure is
visible in the log.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82688 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 07:18:36 +00:00
Daniel Dunbar ee45d6dc89 We no longer need anything from the llvm/test/Scripts dir.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 06:31:08 +00:00
Ted Kremenek 35dcad8aee Fix crash in RegionStoreManager::Bind() by using 'getAs<PointerType>()' instead of 'cast<PointerType>()' (to handle pointer typedefs).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82686 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 06:24:32 +00:00
Anders Carlsson ffbdefc7a2 More improvements with laying out empty bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82682 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 05:21:31 +00:00
Daniel Dunbar 55e59e139d Darwin/x86-32: Enumerated types and block pointer types in structures were not
handled correctly.
 - <rdar://problem/7247671> Function arguments incorrect when function returns a
   struct on i386 w/ llvm-g++ and clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82681 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 05:12:36 +00:00
Ted Kremenek 0954cdec4b Fix: <rdar://problem/7249340> [RegionStore] model stores to symbolic parameter regions
The issue was a discrepancy between how RegionStoreManager::Bind() and
RegionStoreManager::Retrieve() derived the "key" for the first element
of a symbolic region.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82680 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 04:11:44 +00:00
Anders Carlsson 1345bd2b09 More work on empty classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82679 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 03:22:10 +00:00
Anders Carlsson 9606149722 Scaffolding for supporting empty bases/fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 03:13:30 +00:00
Ted Kremenek 112ba7e57e Shorten the static analyzer diagnostic for 'use of garbage value'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82672 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 00:44:26 +00:00
Fariborz Jahanian 7ad2d562e8 Use Doug's DeclLoc to pinpoint location of the declaration
in a reference initialization diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82671 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 00:42:43 +00:00
Douglas Gregor 739d828314 Improve diagnostic location information when checking the initialization of a reference
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82666 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 23:04:10 +00:00
Douglas Gregor 96be6917e1 Make C++ temporary-related expressions provide proper source-range information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82665 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 22:51:26 +00:00
Fariborz Jahanian 8f489d692f patch to ir-gen conversion function call used in
initializing a reference class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82664 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 22:34:00 +00:00
Douglas Gregor eb5758bbfd For code completion, note that injected-class-names found as part of
lookup in a member access expression always start a
nested-name-specifier. Additionally, rank names that start
nested-name-specifiers after other names.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82663 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 22:26:46 +00:00
Fariborz Jahanian 2b51138433 Remove the FIXME as I said.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82650 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 20:56:34 +00:00
Fariborz Jahanian 51bebc83e7 This patch addresses a few issues related to 8.5.3 [dcl.init.ref]
It uses a recent API to find inherited conversion functions to do
the initializer to reference lvalue conversion (and removes a FIXME).
It issues the ambiguity diagnostics when multiple conversions are found.
WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82649 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 20:55:32 +00:00
Steve Naroff f7469a38ca Some minor cleanups...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 20:00:53 +00:00
Anders Carlsson 018837b081 Handle namespace aliases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82644 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 19:19:16 +00:00
Anders Carlsson 6ac5fc49ee Emit new[] cookie when needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82642 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 18:59:48 +00:00
Steve Naroff 4ade6d6eae More work to enable more exhaustive testing of the indexing API.
Next step: Add actual some test cases:-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82636 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 17:52:52 +00:00
Anders Carlsson a4d4c019bf Basic support for new[].
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82628 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 16:07:23 +00:00
Douglas Gregor 5bd1a1151f When code-completion after a "," is building an overload set, note
that there is one more argument (the one following the comma) and make
the candidate non-viable if the function cannot accept any argument in
that position.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82625 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 14:56:09 +00:00
Torok Edwin 38a809571b The test/ directory needs to be created always when building objdir != srcdir,
because the toplevel 'make check-all' needs the rule for test/lit.site.cfg,
and for that test/ must exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82624 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 14:23:05 +00:00
Gabor Greif a441283c60 fix typo in file name
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82623 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 13:15:04 +00:00
Daniel Dunbar 9fe4a5d8a6 Factor Windows target into VS, MinGW and Cygwin variants.
- Patch by John Thompson!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82621 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 07:31:35 +00:00
Chris Lattner 21fb98ee00 implement support for __builtin_eh_return_data_regno on x86-32 and x86-64.
This implements PR5034 and rdar://6836445.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 06:06:36 +00:00
Chris Lattner 6a3bc6df36 return a bool value as a bool
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82613 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 05:39:46 +00:00
Anders Carlsson 569c1f4a6c Add a new variant of EmitCXXAggrConstructorCall that takes a Value that holds the number of elements to construct, to be used when implementing new[].
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 02:45:36 +00:00
Ted Kremenek 657406dd40 Fix PR 4988 by removing an invalid assertion (a function can be referenced in
GRExprEngine::VisitDeclRefExpr without 'asLValue' being true).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82598 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 01:30:01 +00:00
Fariborz Jahanian b1663d0507 Produce detailed diagnostics when overload
resolution failed to select a candidate due to
ambiguity in type conversion function selection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-23 00:58:07 +00:00