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

6454 Коммитов

Автор SHA1 Сообщение Дата
Eli Friedman ba68b08a05 PR6515: Implement __builtin_signbit and friends.
I'm reasonably sure my implementation is correct, but it would be nice if
someone could double-check.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97864 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-06 02:17:52 +00:00
Fariborz Jahanian dbf217af72 Allow use of byref (__block attributed) arrays inside
the block. Fixes radar 7671883.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97863 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-06 01:58:53 +00:00
Douglas Gregor 6d1828949d When declaring a catch block in C++, make sure that the type being
caught can be copy-initialized and destructed. Fixes PR6518.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97853 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 23:38:39 +00:00
Ted Kremenek 444b035b53 Augment __has_feature to report that Clang supports adding attribute 'unused'
to an Objective-C instance variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97850 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 22:43:32 +00:00
Fariborz Jahanian a42286486c Patch to build qualifier on objective-c
pointer types. Fixes radar 7626768.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97847 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 22:42:55 +00:00
Chris Lattner 02db31c62a Emit warning on indirect goto that potentially violates
scope instead of error, PR6517


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97826 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 20:38:02 +00:00
Chris Lattner fc3a0700bd address PR6502 by downgrading the scope checker's address
of label error to a warning controllable with a -W flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97815 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 19:26:49 +00:00
Fariborz Jahanian fdf30aee63 Remove header file dependencies in block patch
test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97777 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 01:49:18 +00:00
Blaine Garst a36e22399c add support for a 1<<29 bit in the block flags field to mark blocks using alternate struct return ABI
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97775 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-05 01:29:59 +00:00
Fariborz Jahanian a74326651c Make rewritten source compiled with clang++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97762 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 23:13:29 +00:00
Fariborz Jahanian ef2b0d8c7b Make rewritten source compiled with clang++ for correctness.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97761 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 23:03:49 +00:00
Fariborz Jahanian 7c7e349c99 Change test to compile rewritten test with clang++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97756 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 21:57:21 +00:00
Rafael Espindola da1826102f really fix 6473 by handling weakref in constant expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97750 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 21:26:03 +00:00
Douglas Gregor c2a2b3c2c2 c-index-test's printing of linkage was completely broken, as was the
test of this functionality. The API worked great, though! :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97736 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 19:36:27 +00:00
Fariborz Jahanian 61b82e3ed6 Fixes a bug whereby static const block var has static
moved incorrectly. (radar 7714443).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97734 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 18:54:29 +00:00
Rafael Espindola 6a836706c4 Fix PR6473.
Clang's support for weakref is now better than llvm-gcc's :-)

We don't introduce a new symbol and we correctly mark undefined references weak only if there is no
definition or regular undefined references in the same file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97733 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 18:17:24 +00:00
John McCall 0ea271c352 Steal the TARGET lit condition from the LLVM test suite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97727 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 09:38:07 +00:00
Zhongxing Xu 57d3b76761 When profiling Environment, also profile with AnalysisContext*, bacause
we now may have identical states with different analysis context.

Set the right AnalysisContext in state when entering and leaving a callee.

With both of the above changes, we can pass the test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97724 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 09:04:52 +00:00
John McCall 468ec6c026 Revert changes r97693, r97700, and r97718.
Our testing framework can't deal with disabled targets yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97719 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 04:29:44 +00:00
John McCall 3ff63027f6 XFAIL these tests on win32, since the win32 buildbot apparently disables all
targets except X86.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97718 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 04:14:44 +00:00
Eric Christopher 2ac7472f87 Fix __builtin_ia32_roundss and __builtin_ia32_roundsd definitions.
Re-enable test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97707 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 01:34:19 +00:00
Fariborz Jahanian 4819ac44c0 Refactor local class name mangling and make it
ABI conforming.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97702 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 01:02:03 +00:00
John McCall 06a3066ea1 Implement __builtin_dwarf_sp_column().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97700 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 00:44:01 +00:00
Chris Lattner 29a4071fc4 fix a buildbot failure, this was passing for me because the
'%t' file was left around on my disk.  doh.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97699 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 00:38:16 +00:00
Douglas Gregor 5fccd36204 Reinstate r97674 with a fix for the assertion that was firing in <list>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 23:55:11 +00:00
Douglas Gregor a7cb22d27f Revert r97674; it's causing failures
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97677 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 23:26:56 +00:00
Douglas Gregor b29b37d7e5 Implement disambiguation of base class members via a
nested-name-specifier. For example, this allows member access in
diamond-shaped hierarchies like:

  struct Base {
    void Foo();
    int Member;
  };

  struct D1 : public Base {};
  struct D2 : public Base {};

  struct Derived : public D1, public D2 { }

  void Test(Derived d) {
    d.Member = 17; // error: ambiguous cast from Derived to Base
    d.D1::Member = 17; // error: okay, modify D1's Base's Member
  }

Fixes PR5820 and <rdar://problem/7535045>. Also, eliminate some
redundancy between Sema::PerformObjectMemberConversion() and
Sema::PerformObjectArgumentInitialization() -- the latter now calls
the former.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97674 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 22:53:40 +00:00
Fariborz Jahanian 9f9efe6d58 Fix code gen bug generating code for
((id)cat)->isa. Fixes radar 7709015.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97672 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 22:09:47 +00:00
Chris Lattner eeeb49a69a merge asm-2.c into asm.c, remove asm-inout.c because it is
XFAIL and already tracked in bugzilla.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97671 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 21:56:57 +00:00
Chris Lattner b992259f77 fix PR6475, we were doing side-effecting stuff in an assert.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97669 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 21:52:23 +00:00
Fariborz Jahanian 570585307e Implements mangling of local class names to
fix a code gen crash. This is WIP as not
all ABI cases are covered (there is a FIXME to 
this effect). Fixes radar 7696748.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97658 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 19:41:08 +00:00
Chris Lattner 2752c0137d add framework for ARM builtins, Patch by Edmund Grimley Evans!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97656 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 19:03:45 +00:00
Ted Kremenek 3bed527b10 Add '-test-print-linkage-source' option to c-index-test
to test clang_getCursorLinkage()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97648 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 06:37:58 +00:00
Anders Carlsson ce57dd5f9f Fix a bug with base offset merging that Devang noticed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97641 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 04:58:02 +00:00
Douglas Gregor 4e6ba4be8d Implement name hiding for names found through virtual base subobjects
that are hidden by other derived base subobjects reached along a
lookup path that does *not* pass through the hiding subobject (C++
[class.member.lookup]p6). Fixes PR6462.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 04:38:46 +00:00
John McCall 9a70846c5f Don't emit derived-to-base destructor aliases if we don't have a definition
for the base destructor, because aliases to declarations aren't legal.

Fixes PR 6471.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97637 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 03:40:11 +00:00
Zhongxing Xu 97ccfa599c Add comments to test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97619 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 01:02:48 +00:00
Douglas Gregor 51d07cb2f9 Don't use echo in the Index test, which I hope will work around an intermittent Windows failure
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97613 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-03 00:03:22 +00:00
John McCall e97c32f957 Suppress implicit member redeclarations arising from explicit instantiation
declarations after the member has been explicitly specialized.  We already
did this after explicit instantiation definitions;  not doing it for
declarations meant that subsequent definitions would see a previous
member declaration with specialization kind "explicit instantiation decl",
which would then happily get overridden.

Fixes PR 6458.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97605 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 23:09:38 +00:00
Rafael Espindola 7b9a5aa7c0 During codegen assert that any copy assignment, destructor or constructor that
we need to synthesize has been marked as used by Sema.

Change Sema to avoid these asserts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97589 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 21:28:26 +00:00
Douglas Gregor 2366cd5d04 Add test case from PR6064, which now works
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97575 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 18:48:07 +00:00
Douglas Gregor 9b9edd619a Diagnose the declaration of enum templates. Also, be a bit more
careful about value-dependent enumerators. Fixes PR5786.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97570 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 17:53:14 +00:00
Douglas Gregor 91be6f5ccb Use CXXTemporaryObjectExpr for explicitly-constructed temporaries. We
used to do this, but it got lost when we switched functional-style
cast syntax over to using the new initialization code. Fixes PR6457.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97568 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 17:18:33 +00:00
Zhongxing Xu 15f6b42b68 Register all parameters even if they didn't occur in the function body.
We may query their liveness because they are added to store when passing
argument values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97562 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 10:08:30 +00:00
Douglas Gregor bbbd54e979 Add test case from PR5812, which works now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97535 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 01:36:28 +00:00
Douglas Gregor 8f8210c477 Fix an amusing typo that completely the re-introduction of parameters
for the purposes of parsing default arguments. In effect, we would
re-introduce the parameter with a default argument N times (where N is
the number of parameters preceding the parameter with a default
argument). This showed up when a defaulted parameter of a member
function of a local class shadowed a parameter of the enclosing
function. Fixes PR6383.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97534 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-02 01:29:43 +00:00
Douglas Gregor 21d53e1796 When we're parsing template names as part of base-specifiers, we are
*not* entering the context of the nested-name-specifier. This was
causing us to look into an uninstantiated template that we shouldn't
look into. Fixes PR6376.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97524 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 23:49:23 +00:00
John McCall ad5e738870 Split out types that are non-canonical unless dependent as their own
category.  Use this in a few places to eliminate unnecessary TST cases and
do some future-proofing.  Provide terrible manglings for typeof.  Mangle
decltype with some hope of accuracy.

Our manglings for some of the cases covered in the testcase are different
from gcc's, which I've raised as an issue with the ABI list.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97523 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 23:49:17 +00:00
Fariborz Jahanian 72952fc11f More rewriter of nested blocks fun stuff.
Radar 7696893.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97520 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 23:36:21 +00:00
Douglas Gregor 9ea9bdbc14 Keep an explicit stack of function and block scopes, each element of
which has the label map, switch statement stack, etc. Previously, we
had a single set of maps in Sema (for the function) along with a stack
of block scopes. However, this lead to funky behavior with nested
functions, e.g., in the member functions of local classes.

The explicit-stack approach is far cleaner, and we retain a 1-element
cache so that we're not malloc/free'ing every time we enter a
function. Fixes PR6382.

Also, tweaked the unused-variable warning suppression logic to look at
errors within a given Scope rather than within a given function. The
prior code wasn't looking at the right number-of-errors count when
dealing with blocks, since the block's count would be deallocated
before we got to ActOnPopScope. This approach works with nested
blocks/functions, and gives tighter error recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 23:15:13 +00:00