Argyrios Kyrtzidis
b8b0313e84
Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'.
...
rdar://9477613.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133779 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-24 00:08:59 +00:00
Fariborz Jahanian
a81397323c
When forming a cycle in objc's inheritance hierarchy,
...
diagnose it properly and don't throw clang into an
infinit loop. // rdar://9653341
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133773 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 23:16:19 +00:00
Sean Hunt
89b29d14bc
Unbreak the CMake build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133769 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 22:24:13 +00:00
Argyrios Kyrtzidis
b1094a0621
[arcmt] Fully migrate ObjC++ classes, rdar://9660007.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133763 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 21:21:33 +00:00
Argyrios Kyrtzidis
7707c75ff9
[arcmt] Remove rewriteAllocCopyWithZone transformation; not needed anymore.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133762 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 21:21:28 +00:00
John McCall
7b3f853c6f
Apparently at some point in the past I forgot how 'continue'
...
works in a 'while(false)' loop. Simplify this code; it was
complicated only in anticipation of C++0x lambdas, and it can
become complicated again when those happen. :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133761 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 21:18:31 +00:00
Fariborz Jahanian
d028302b57
Improve on warning when objc pointer is used in
...
c++ catch in fragile abi - per Eli's request.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133760 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 21:17:59 +00:00
Douglas Gregor
4c4cbe5794
Remove superfluous comment
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133757 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 20:49:34 +00:00
Fariborz Jahanian
8cf0f52037
Move definition of template <typename T> void Decl::dropAttr
...
to its header to avoid an explicit instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133753 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 20:24:38 +00:00
Douglas Gregor
7f88c01332
Bump Token::Kind from an unsigned char to an unsigned short, from Anton Lokhmotov
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133750 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 20:15:25 +00:00
Fariborz Jahanian
cf5abc7ba0
Support for catching objc pointer objects in c++ catch-statement
...
in fragile abi mode and some other cleanups. // rdar://8940528
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133747 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 19:00:08 +00:00
Eli Friedman
b9b4b789eb
Fix Sema::CheckVectorOperands so that it doesn't try to insert a cast expression into the LHS of a compound assignment. Fixes compound assignment of various "compatible" vector types, including NEON-vector and gcc-vector types.
...
<rdar://problem/9640356>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133737 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 18:10:35 +00:00
Fariborz Jahanian
d6bf0effa9
Minor tweak to my last patch per Doug's comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133731 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 18:04:27 +00:00
Andrew Trick
7140b3cde0
cmake+lit: final cleanup related to the recent churn
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133730 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 18:00:48 +00:00
Fariborz Jahanian
c3ca14d137
Remove multiple use of weak_import attribute on
...
same declaration. Templatize dropAttr for general use.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133724 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 17:50:10 +00:00
Fariborz Jahanian
8785d115eb
Remove weak_import attribute on new declaration.
...
// rdar://9538608
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133721 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 16:18:44 +00:00
Dylan Noblesmith
89bb6146a8
fix autoconf build from r133710
...
Sorry! This commit worked in CMake, but
CXX_INCLUDE_ROOT is defined in a different
config.h for autoconf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133715 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 13:50:47 +00:00
Dylan Noblesmith
1626601b00
avoid using config.h in public headers
...
This is the only usage in clang's headers, and it's for a define
that only exists on CMake builds for the sake of the MSVC compiler,
so just use an ifdef instead.
Also add an include for config.h in a file that actually needs it,
and was picking it up by accident indirectly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133710 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 12:20:57 +00:00
Sean Hunt
d96249971d
Add documentation about __has_feature(cxx_delegationg_constructors)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133693 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 06:11:37 +00:00
Nick Lewycky
115f2b95d5
Fix this test on machines that don't run clang -cc1as when asked to assemble.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133688 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 05:38:06 +00:00
Sean Hunt
64f857b4ef
Fix a minor copy-paste-o that broke the stylesheets
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133678 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 01:22:53 +00:00
Sean Hunt
7e98b477de
Fix a bunch of HTML compliance problems with LanguageExtensions.html
...
One weird thing is the addition of several <a name=""> tags where
previously there were id attributes on the <h3> tags. This is because
the id attribute must begin with a letter, not an underscore. The name
attribute is not so constrained, so links will continue to work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133677 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 01:21:01 +00:00
Douglas Gregor
2b1ad8b42b
Move all of Sema's member-access-related checking out of SemaExpr.cpp
...
and into a new file, SemaExprMember.cpp, bringing SemaExpr.cpp just
under 10,000 lines of code (ugh). No functionality change, although I
intend to do some refactoring of this code to address PR8368 at some
point in the "near" future.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133674 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 00:49:38 +00:00
Sean Hunt
647ba1bc2e
Revert "-fexceptions does not, in fact, enable C++ exceptions"
...
In fact it does. For the driver anyway, and not cc1 which I'm supposed
to pretend doesn't exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133673 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 00:42:53 +00:00
Argyrios Kyrtzidis
572bbec2e0
Allow unavailable function calls inside unavailable functions in C++/ObjC++ as well. rdar://9660196
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133672 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 00:41:50 +00:00
Sean Hunt
4cc12c6e47
Clean up the heart of the caching code and miss fewer edge cases.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133671 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-23 00:26:20 +00:00
Sean Hunt
4b4ba8b1d4
-fexceptions does not, in fact, enable C++ exceptions
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133666 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 23:49:12 +00:00
Andrew Trick
b7bca251bc
lit support for REQUIRES: asserts.
...
Take #2 . Don't piggyback on the existing config.build_mode. Instead,
define a new lit feature for each build feature we need (currently
just "asserts"). Teach both autoconf'd and cmake'd Makefiles to define
this feature within test/lit.site.cfg. This doesn't require any lit
harness changes and should be more robust across build systems.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133665 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 23:23:49 +00:00
Douglas Gregor
4f0845ec62
Check for placeholders early on in
...
Sema::CreateUnaryExprOrTypeTraitExpr() rather than recursing in some
cases. Fixes <rdar://problem/9659191>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133663 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 23:21:00 +00:00
Sean Hunt
ab183dff7e
Fix a think-o that amazingly didn't show up until I started writing
...
implicit move tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133655 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 22:13:13 +00:00
Fariborz Jahanian
d543130a30
Issue warning if weak_import attribute is added to an already
...
declared variable and ignore it. // rdar://9538608
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133654 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 22:08:50 +00:00
Daniel Dunbar
9c7f469318
test/Unit: Fixup lit.cfg to allow running inside test/Unit (with llvm-config in
...
path).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133653 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 21:46:43 +00:00
Fariborz Jahanian
9d96bce991
Alloa catching Objective-C id's being thrown with C++ throw
...
in Darwin's fragile abi mode. // rdar://8940528
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133639 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 20:21:51 +00:00
Manuel Klimek
0d9106fc97
Changes ParenListExpr to always require a type.
...
Removes dead code found in the process.
Adds a test to verify that ParenListExprs do not have NULL types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133637 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 20:02:16 +00:00
Douglas Gregor
c09ce1224d
Copy diagnostic pragmas to the preprocessed output, from Richard Osborne!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133633 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 19:41:48 +00:00
Douglas Gregor
b27c7a199b
Fix the starting location of the Fix-It note for suspicious precedence
...
issues between a bitwise operator and a comparison operator. Fixes
<rdar://problem/9637759>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133630 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 18:41:08 +00:00
Douglas Gregor
1d441ee69a
When instantiating a function template declaration that was expressed
...
via a typedef of a function, make sure to synthesize parameter
declarations. Fixes PR9654 / <rdar://problem/9257497>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133628 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 18:16:25 +00:00
Argyrios Kyrtzidis
7bf952e601
[arcmt] Make -Warc-unsafe-retained-assign an error when migrating. rdar://8939557
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133627 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 18:03:59 +00:00
Argyrios Kyrtzidis
5b27b6d131
Put all ARC-related warnings into the "arc" diagnostic group.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133626 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 18:03:56 +00:00
Argyrios Kyrtzidis
d26fef0e80
Change "cannot assign retained object.." warning to "assigning retained object.."
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133625 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 18:03:53 +00:00
Eric Christopher
3404fe7105
Build and use libcompiler_rt whenever possible.
...
Patch by Jean-Daniel Dupas!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133624 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 17:41:40 +00:00
Douglas Gregor
34aace8933
Try to silence GCC warning
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133623 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 16:43:25 +00:00
Fariborz Jahanian
8295b7b51b
objc-arc: Allow unbridged cast of retainable object to
...
integral as it is not transferring ownership..
// rdar://9619861
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133622 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 16:36:45 +00:00
Douglas Gregor
d1bd98a2c2
Implement the C++0x move optimization for Automatic Reference Counting
...
objects, so that we steal the retain count of a temporary __strong
pointer (zeroing out that temporary), eliding a retain/release
pair. Addresses <rdar://problem/9364932>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133621 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 16:32:26 +00:00
Douglas Gregor
d7b2316776
When binding a reference to an Automatic Reference Counting temporary,
...
retain/release the temporary object appropriately. Previously, we
would only perform the retain/release operations when the reference
would extend the lifetime of the temporary, but this does the wrong
thing across calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133620 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 16:12:01 +00:00
Douglas Gregor
b4b7b5034b
Give MaterializeTemporaryExpr the exact type of the lvalue it binds
...
to, including cv-qualifications.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133618 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 15:05:02 +00:00
Douglas Gregor
45ba8a6ab7
Fix typo in comment
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133617 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 14:41:20 +00:00
Jay Foad
97357602a2
Replace the existing forms of ConstantArray::get() with a single form
...
that takes an ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133615 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 09:24:39 +00:00
Argyrios Kyrtzidis
25a767651d
Introduce DelayedCleanupPool useful for simplifying clean-up of certain resources that, while their
...
lifetime is well-known and restricted, cleaning them up manually is easy to miss and cause a leak.
Use it to plug the leaking of TemplateIdAnnotation objects. rdar://9634138.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133610 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 06:09:49 +00:00
Andrew Trick
fc0f40acc6
Only do config-time substitution of LLVM_BUILD_MODE in
...
test/lit.site.cfg, not Unit/test/lit.site.cfg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133609 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 05:44:01 +00:00