Fariborz Jahanian
9fc39c4944
No need to warn if 'unavailable' method/property
...
is not implemented. // rdar://9651605
llvm-svn: 133819
2011-06-24 20:31:37 +00:00
Fariborz Jahanian
6fc3029eb8
objc-arc: Give more descriptive diagnostics when
...
making unsafe assignment of a retainable
object, Per John's request.
llvm-svn: 133817
2011-06-24 20:00:03 +00:00
Argyrios Kyrtzidis
d8a2771109
Only do delayed diagnostics if there were no errors when parsing the decl.
...
Fixes crash in http://llvm.org/PR10109 & rdar://9584039.
llvm-svn: 133816
2011-06-24 19:59:27 +00:00
Argyrios Kyrtzidis
5a9e5c4df6
[arcmt] Add test for rdar://9601437.
...
llvm-svn: 133807
2011-06-24 18:41:23 +00:00
Fariborz Jahanian
5f98da0ea2
objc-arc: Check on a variety of unsafe assignment of retained
...
objects. // rdar://9495837
llvm-svn: 133806
2011-06-24 18:25:34 +00:00
Bob Wilson
cb8fa3ec1d
Fix comments.
...
llvm-svn: 133805
2011-06-24 18:08:10 +00:00
Argyrios Kyrtzidis
2cfce18645
Allow Lexer::getLocForEndOfToken to return the location just passed the macro instantiation
...
if the location given points at the last token of the macro instantiation.
Fixes rdar://9045701.
llvm-svn: 133804
2011-06-24 17:58:59 +00:00
Argyrios Kyrtzidis
6c7b185357
In TextDiagnosticPrinter::EmitCaretDiagnostic, don't always drop fixits if the caret location
...
points to a macro instantiation.
llvm-svn: 133802
2011-06-24 17:28:31 +00:00
Argyrios Kyrtzidis
3ea4adb841
Allow the fixit for missing ':' in the ?: ternary operator if it is pointing
...
at the start of a macro instantiation.
llvm-svn: 133801
2011-06-24 17:28:29 +00:00
Argyrios Kyrtzidis
f096a6e754
SourceManager::isAtStartOfMacroInstantiation should check not only if the location
...
is at the first token but that the location's offset is not inside the token as well.
llvm-svn: 133800
2011-06-24 17:28:26 +00:00
NAKAMURA Takumi
67677898d3
unittests/Basic/FileManagerTest.cpp: Unbreak Win32, mingw and msvc.
...
LLVM_ON_WIN32 is defined in llvm/Config/config.h.
IMO, it might be enough with _WIN32 in most cases, LLVM_ON_xxx could be deprecated.
llvm-svn: 133794
2011-06-24 14:10:29 +00:00
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