Jay Foad
0c3675f432
Fix unused label warning.
...
llvm-svn: 133790
2011-06-24 09:29:56 +00:00
Alexis Hunt
1da39282ec
This patch started as an attempt to fix up the horrid naming
...
conventions. I then discovered a typo in the using declaration bit in
LookupSpecialMember. This led to discovering [namespace.udecl]p15, which
clang implements incorrectly. Thus I've added a comment and implemented
the code consistently with the rest of clang - that is incorrectly.
And because I don't want to include tests of something incorrect, I've
ripped the test out.
llvm-svn: 133784
2011-06-24 02:11:39 +00:00
Argyrios Kyrtzidis
cff00d9c12
Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'.
...
rdar://9477613.
llvm-svn: 133779
2011-06-24 00:08:59 +00:00
Fariborz Jahanian
3ee91fad90
When forming a cycle in objc's inheritance hierarchy,
...
diagnose it properly and don't throw clang into an
infinit loop. // rdar://9653341
llvm-svn: 133773
2011-06-23 23:16:19 +00:00
Alexis Hunt
8cba5d2f20
Unbreak the CMake build.
...
llvm-svn: 133769
2011-06-23 22:24:13 +00:00
Argyrios Kyrtzidis
0b2bd862ff
[arcmt] Fully migrate ObjC++ classes, rdar://9660007.
...
llvm-svn: 133763
2011-06-23 21:21:33 +00:00
Argyrios Kyrtzidis
795550691e
[arcmt] Remove rewriteAllocCopyWithZone transformation; not needed anymore.
...
llvm-svn: 133762
2011-06-23 21:21:28 +00:00
John McCall
63b45fef45
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. :)
llvm-svn: 133761
2011-06-23 21:18:31 +00:00
Fariborz Jahanian
08e17b506e
Improve on warning when objc pointer is used in
...
c++ catch in fragile abi - per Eli's request.
llvm-svn: 133760
2011-06-23 21:17:59 +00:00
Douglas Gregor
a919bd5cee
Remove superfluous comment
...
llvm-svn: 133757
2011-06-23 20:49:34 +00:00
Fariborz Jahanian
676e3a8c83
Move definition of template <typename T> void Decl::dropAttr
...
to its header to avoid an explicit instantiation.
llvm-svn: 133753
2011-06-23 20:24:38 +00:00
Douglas Gregor
2034c85125
Bump Token::Kind from an unsigned char to an unsigned short, from Anton Lokhmotov
...
llvm-svn: 133750
2011-06-23 20:15:25 +00:00
Fariborz Jahanian
831f0fc2e0
Support for catching objc pointer objects in c++ catch-statement
...
in fragile abi mode and some other cleanups. // rdar://8940528
llvm-svn: 133747
2011-06-23 19:00:08 +00:00
Eli Friedman
1408bc9a55
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>
llvm-svn: 133737
2011-06-23 18:10:35 +00:00
Fariborz Jahanian
d0cb83a6ab
Minor tweak to my last patch per Doug's comment.
...
llvm-svn: 133731
2011-06-23 18:04:27 +00:00
Andrew Trick
72d91dd6e4
cmake+lit: final cleanup related to the recent churn
...
llvm-svn: 133730
2011-06-23 18:00:48 +00:00
Fariborz Jahanian
0dfc950609
Remove multiple use of weak_import attribute on
...
same declaration. Templatize dropAttr for general use.
llvm-svn: 133724
2011-06-23 17:50:10 +00:00
Fariborz Jahanian
be5a4416ff
Remove weak_import attribute on new declaration.
...
// rdar://9538608
llvm-svn: 133721
2011-06-23 16:18:44 +00:00
Dylan Noblesmith
afed776fa9
fix autoconf build from r133710
...
Sorry! This commit worked in CMake, but
CXX_INCLUDE_ROOT is defined in a different
config.h for autoconf.
llvm-svn: 133715
2011-06-23 13:50:47 +00:00
Dylan Noblesmith
321cdb8551
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.
llvm-svn: 133710
2011-06-23 12:20:57 +00:00
Alexis Hunt
b0d8199925
Add documentation about __has_feature(cxx_delegationg_constructors)
...
llvm-svn: 133693
2011-06-23 06:11:37 +00:00
Nick Lewycky
1abf57d5a9
Fix this test on machines that don't run clang -cc1as when asked to assemble.
...
llvm-svn: 133688
2011-06-23 05:38:06 +00:00
Alexis Hunt
efa0716ab7
Fix a minor copy-paste-o that broke the stylesheets
...
llvm-svn: 133678
2011-06-23 01:22:53 +00:00
Alexis Hunt
aedbfe480f
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.
llvm-svn: 133677
2011-06-23 01:21:01 +00:00
Douglas Gregor
5476205b9b
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.
llvm-svn: 133674
2011-06-23 00:49:38 +00:00
Alexis Hunt
c0a2ab6421
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.
llvm-svn: 133673
2011-06-23 00:42:53 +00:00
Argyrios Kyrtzidis
ab72b6792b
Allow unavailable function calls inside unavailable functions in C++/ObjC++ as well. rdar://9660196
...
llvm-svn: 133672
2011-06-23 00:41:50 +00:00
Alexis Hunt
080709f82d
Clean up the heart of the caching code and miss fewer edge cases.
...
llvm-svn: 133671
2011-06-23 00:26:20 +00:00
Alexis Hunt
6d756895a9
-fexceptions does not, in fact, enable C++ exceptions
...
llvm-svn: 133666
2011-06-22 23:49:12 +00:00
Andrew Trick
1d4b176cd5
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.
llvm-svn: 133665
2011-06-22 23:23:49 +00:00
Douglas Gregor
835af98597
Check for placeholders early on in
...
Sema::CreateUnaryExprOrTypeTraitExpr() rather than recursing in some
cases. Fixes <rdar://problem/9659191>.
llvm-svn: 133663
2011-06-22 23:21:00 +00:00
Alexis Hunt
46d1ce23a7
Fix a think-o that amazingly didn't show up until I started writing
...
implicit move tests.
llvm-svn: 133655
2011-06-22 22:13:13 +00:00
Fariborz Jahanian
33e022650a
Issue warning if weak_import attribute is added to an already
...
declared variable and ignore it. // rdar://9538608
llvm-svn: 133654
2011-06-22 22:08:50 +00:00
Daniel Dunbar
a60a269e67
test/Unit: Fixup lit.cfg to allow running inside test/Unit (with llvm-config in
...
path).
llvm-svn: 133653
2011-06-22 21:46:43 +00:00
Fariborz Jahanian
0a3cfcc87f
Alloa catching Objective-C id's being thrown with C++ throw
...
in Darwin's fragile abi mode. // rdar://8940528
llvm-svn: 133639
2011-06-22 20:21:51 +00:00
Manuel Klimek
f2b4b69346
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.
llvm-svn: 133637
2011-06-22 20:02:16 +00:00
Douglas Gregor
3bde9b15a1
Copy diagnostic pragmas to the preprocessed output, from Richard Osborne!
...
llvm-svn: 133633
2011-06-22 19:41:48 +00:00
Douglas Gregor
bb9a5e6df1
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>.
llvm-svn: 133630
2011-06-22 18:41:08 +00:00
Douglas Gregor
1501f16cfe
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>.
llvm-svn: 133628
2011-06-22 18:16:25 +00:00
Argyrios Kyrtzidis
59b5f356ad
[arcmt] Make -Warc-unsafe-retained-assign an error when migrating. rdar://8939557
...
llvm-svn: 133627
2011-06-22 18:03:59 +00:00
Argyrios Kyrtzidis
92b12187dd
Put all ARC-related warnings into the "arc" diagnostic group.
...
llvm-svn: 133626
2011-06-22 18:03:56 +00:00
Argyrios Kyrtzidis
694f75db13
Change "cannot assign retained object.." warning to "assigning retained object.."
...
llvm-svn: 133625
2011-06-22 18:03:53 +00:00
Eric Christopher
c235d0c635
Build and use libcompiler_rt whenever possible.
...
Patch by Jean-Daniel Dupas!
llvm-svn: 133624
2011-06-22 17:41:40 +00:00
Douglas Gregor
ec793dde8e
Try to silence GCC warning
...
llvm-svn: 133623
2011-06-22 16:43:25 +00:00
Fariborz Jahanian
ec667fcc36
objc-arc: Allow unbridged cast of retainable object to
...
integral as it is not transferring ownership..
// rdar://9619861
llvm-svn: 133622
2011-06-22 16:36:45 +00:00
Douglas Gregor
1c8cd7c1a5
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>.
llvm-svn: 133621
2011-06-22 16:32:26 +00:00
Douglas Gregor
58df509fc0
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.
llvm-svn: 133620
2011-06-22 16:12:01 +00:00
Douglas Gregor
2fa40a3a06
Give MaterializeTemporaryExpr the exact type of the lvalue it binds
...
to, including cv-qualifications.
llvm-svn: 133618
2011-06-22 15:05:02 +00:00
Douglas Gregor
b6ea7d2e2d
Fix typo in comment
...
llvm-svn: 133617
2011-06-22 14:41:20 +00:00
Jay Foad
83be361b8a
Replace the existing forms of ConstantArray::get() with a single form
...
that takes an ArrayRef.
llvm-svn: 133615
2011-06-22 09:24:39 +00:00