Commit Graph

20518 Commits

Author SHA1 Message Date
Bob Wilson 8e2b75dbad Revert "Re-enable byval for ARM in clang. rdar://problem/7662569"
This reverts commit 67d097e1232b7d66f58989c16a45b8a11721f76e.
We found a miscompile with ARM byval, which is still being investigated.
In the meantime, this works around the problem by disabling ARM byval.

Conflicts:
	lib/CodeGen/TargetInfo.cpp

llvm-svn: 136662
2011-08-01 23:39:04 +00:00
Anna Zaks 15f496c118 Add a skeleton for the Keychain Services API Checker. Register it as OSX experimental for now. Note, the checker still does not handle tracking of escaped values, taking into account the return value of the allocator functions, nor the actual bug reporting..
llvm-svn: 136659
2011-08-01 22:40:01 +00:00
Fariborz Jahanian e1506cbfda objective-c: reverse patch for // rdar://9818354
llvm-svn: 136658
2011-08-01 22:39:49 +00:00
Akira Hatanaka fb1d9f325c Implement MipsABIInfo::EmitVAArg. This fix enables clang to complete compilation
without bailing out when va_arg is an aggregate expression. However, 
alignment checking needs to be added in isSafeToEliminateVarargsCast in
InstCombineCalls.cpp in order to produce correct mips code (see link below).

http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-July/042047.html

llvm-svn: 136647
2011-08-01 20:48:01 +00:00
Chad Rosier 96d690ccdf Driver: When compiling i386 -fapple-kext code, we fallback to llvmgcc.
Unfortunately, llvmgcc doesn't always work when writing temporary output to
/dev/null.  Therefore, create a temp file that is later deleted.
rdar://9837692

llvm-svn: 136644
2011-08-01 19:58:48 +00:00
Akira Hatanaka df425dbf04 Pass records with non-trivial destructors or constructors indirectly.
llvm-svn: 136630
2011-08-01 18:09:58 +00:00
David Chisnall 28dc7f94f8 Fix linkage type for tentative definition of ivar offset variables (GNUstep runtime)
llvm-svn: 136628
2011-08-01 17:36:53 +00:00
Douglas Gregor 2df17cbeeb Move the serialization of the MODULE_OFFSET_MAP out of the source-manager-writing code and into the general chained-PCH writing code
llvm-svn: 136624
2011-08-01 16:54:33 +00:00
Douglas Gregor 5a1797c67b Rename the AST file's SOURCE_LOCATION_MAP to MODULE_OFFSET_MAP, to indicate the greater role it will soon play in remapping.
llvm-svn: 136619
2011-08-01 16:01:55 +00:00
Benjamin Kramer 558e37858b Remove dead code flagged by GCC's -Wunused-but-set-variable.
llvm-svn: 136581
2011-07-31 01:06:41 +00:00
Argyrios Kyrtzidis 582ae9916a Not sure why we bother updating FunctionDecl's EndRangeLoc in FunctionDecl::setParams.
EndRangeLoc should always be set to at least the ending paren or brace.

llvm-svn: 136573
2011-07-30 17:23:28 +00:00
Argyrios Kyrtzidis 4c6efa62e0 [libclang] Annotation of parameters that got default args from a previous declarations was
broken because the end location of the parameter was the end location of the default arg,
resulting in a source range that could begin in one file and end in another.

llvm-svn: 136572
2011-07-30 17:23:26 +00:00
Douglas Gregor 5ff4e98c61 Introduce a Fix-It for the "missing sentinel" warning, adding an
appropriate sentinel at the end of the argument list. Also, put the
sentinel warnings under -Wsentinel. Fixes <rdar://problem/8764236>.

llvm-svn: 136566
2011-07-30 08:57:03 +00:00
Douglas Gregor 4ecb7209bf Add code completion to produce "else" blocks after an "if"
statement. Fixes <rdar://problem/9229438>.

llvm-svn: 136564
2011-07-30 08:36:53 +00:00
Douglas Gregor 0c50531a46 When producing code completion results for variadic macros, fold the
variadic bit (", ..." or ", args...") into the prior placeholder, like
we do with functions and methods. Fixes <rdar://problem/9740808>.

llvm-svn: 136563
2011-07-30 08:17:44 +00:00
Douglas Gregor 8f08d74ee5 Add the various parameter-passing keywords for Distributed Objects
(such as in, inout, byref, and oneway) to code completion
results. Fixes <rdar://problem/8844158>.

llvm-svn: 136562
2011-07-30 07:55:26 +00:00
Douglas Gregor 6d40c57009 Fix a thinko in my __is_empty/__is_pod commit.
llvm-svn: 136561
2011-07-30 07:08:19 +00:00
Douglas Gregor df445f0ae1 Turn off __has_feature(is_empty) and __has_feature(is_pod) if the
libstdc++ hack has reverted these type traits to keywords. Icky, but
fixes <rdar://problem/9836262>.

llvm-svn: 136560
2011-07-30 07:01:49 +00:00
Douglas Gregor 2c595adf2e When performing code completion after at @interface, allow both
already-defined and forward-declared results. Already-defined results
are fine because they could be the start of a category. Fixes
<rdar://problem/9811691>.

llvm-svn: 136559
2011-07-30 06:55:39 +00:00
Douglas Gregor 7e1eb935db When complaining about a non-POD second argument to va_arg, use a
special diagnostic for ARC ownership-qualified types. We wouldn't want
to expose Objective-C programmers to the term "POD", would we? Fixes
<rdar://problem/9772982>.

llvm-svn: 136558
2011-07-30 06:45:27 +00:00
Douglas Gregor d8575e1e1d Use the "Bar.h" -> <Foo/Bar.h> remapping for index header maps only as
a fallback, if normal header search fails. Another attempt at
<rdar://problem/9824020>.

llvm-svn: 136557
2011-07-30 06:28:34 +00:00
Fariborz Jahanian d560ed7f1b objc rewriter - my last patch was not quite right.
Fixed again. // rdar://9846759

llvm-svn: 136550
2011-07-30 01:21:41 +00:00
Fariborz Jahanian bce9ee2ae6 objc rewriter - set the flag passed to _Block_object_assign/_Block_object_dispose correctly
for copying a captured block object. // rdar://9846759

llvm-svn: 136549
2011-07-30 01:07:55 +00:00
Douglas Gregor d451ea9ca9 Teach the ASTImporter to cope with cases where we have already
imported a forward declaration, but later the full definition of the
same entity becomes available. When this happens, import the definition.

llvm-svn: 136537
2011-07-29 23:31:30 +00:00
Eric Christopher b081ba651c Add support for the 'Q' arm memory constraint.
Fixes rdar://9866494

llvm-svn: 136524
2011-07-29 21:20:35 +00:00
Ted Kremenek 67d7136f26 [analyzer] Remove recursive visitation in ExprEngine::VisitDeclStmt because it isn't needed anymore.
llvm-svn: 136522
2011-07-29 21:18:41 +00:00
Ted Kremenek e905c68cbd [analyzer] Remove recursive visitation in ExprEngine::VisitCompoundLiteralExpr because it isn't needed anymore.
llvm-svn: 136521
2011-07-29 21:18:39 +00:00
Ted Kremenek dc492c29f7 [analyzer] Remove recursive visitation in ExprEngine::VisitCastExpr because it isn't needed anymore.
llvm-svn: 136520
2011-07-29 21:18:37 +00:00
Ted Kremenek cf36b0c64d [analyzer] Remove recursive visitation in ExprEngine::VisitObjCForCollectionStmt because it isn't needed anymore.
llvm-svn: 136519
2011-07-29 21:18:35 +00:00
Ted Kremenek 65eefed6c6 [analyzer] Remove explicit argument processing from ExprEngine::VisitObjCMessage() since it is no longer needed.
llvm-svn: 136518
2011-07-29 21:18:31 +00:00
Ted Kremenek 4e577fae2c [analyzer] Remove recursive visitation in ExprEngine::VisitLValObjCIvarRefExpr because it isn't needed anymore.
llvm-svn: 136517
2011-07-29 21:18:28 +00:00
Ted Kremenek 003ec6ff83 [analyzer] tighten up ExprEngine::VisitObjCAtSynchronizationStmt().
llvm-svn: 136516
2011-07-29 21:18:26 +00:00
Ted Kremenek f8c0bcf101 [analyzer] Remove recursive visitation in ExprEngine::VisitObjCPropertyRefExpr because it isn't needed anymore.
llvm-svn: 136515
2011-07-29 21:18:24 +00:00
Ted Kremenek 298e5cc7f4 [analyzer] Remove recursive visitation in ExprEngine::VisitCallExpr because it isn't needed anymore.
llvm-svn: 136514
2011-07-29 21:18:22 +00:00
Ted Kremenek 22a1e65532 [analyzer] Remove recursive visitation in ExprEngine::VisitMemberExpr because it isn't needed anymore.
llvm-svn: 136513
2011-07-29 21:18:19 +00:00
Ted Kremenek db835cc213 [analyzer] Remove recursive visitation in ExprEngine::VisitLvalArraySubscriptExpr() because it is no longer needed.
llvm-svn: 136512
2011-07-29 21:18:17 +00:00
Douglas Gregor f4016fdf71 On Darwin, libc++ may be installed alongside the compiler in
lib/c++/v1. Look there first, before falling back to the normal
/usr/include/c++/v1. <rdar://problem/9866149>

llvm-svn: 136507
2011-07-29 20:21:18 +00:00
Jonathan D. Turner 10d52011d8 Renamed Loaded member to ImportedBy, as it's easier to read. Added another set to represent the modules a module imports.
llvm-svn: 136476
2011-07-29 18:09:09 +00:00
Jay Foad 5709f7c5f7 Remove some unnecessary single element array temporaries.
llvm-svn: 136461
2011-07-29 13:56:53 +00:00
Argyrios Kyrtzidis 1fa8b4b204 Make DiagnosticErrorTrap keep a count of the errors that occurred so multiple
DiagnosticErrorTraps can be composed (e.g. a trap inside another trap).

Fixes http://llvm.org/PR10462 & rdar://9852007.

llvm-svn: 136447
2011-07-29 01:25:44 +00:00
Douglas Gregor f6f2810c1f Remove unused debug function
llvm-svn: 136442
2011-07-29 00:59:35 +00:00
Douglas Gregor bab6d2c2d4 In the ASTReader, replace the continuous range maps whose value types
were (Module*, Offset) with equivalent maps whose value type is just a
Module*. The offsets have moved into corresponding "Base" fields
within the Module itself, where they will also be helpful for
local->global translation (eventually).

llvm-svn: 136441
2011-07-29 00:56:45 +00:00
Peter Collingbourne 05500ba6ec Fix assertion failure in CodeGen where the input operand to an asm
instruction is tied to an output operand which is a pointer, and
the input operand is narrower than the output operand.

llvm-svn: 136438
2011-07-29 00:24:50 +00:00
Peter Collingbourne 3bc84ca376 Fix an inconsistency in Sema::ConvertArgumentsForCall in that
the callee note diagnostic was not emitted in the case where
there were too few arguments.

llvm-svn: 136437
2011-07-29 00:24:42 +00:00
Douglas Gregor 8ab4ea8571 Move the base type ID from the ASTReader's global type map into the
Module itself, which makes more sense. This pattern to be repeated
several more times.

llvm-svn: 136436
2011-07-29 00:21:44 +00:00
Chandler Carruth 605415923f Remove an unused function (found by Clang's -Wunused-function)
llvm-svn: 136434
2011-07-29 00:15:44 +00:00
Fariborz Jahanian 9f8b19e9ae objective-c: warn if implementation of a method in category
masks an existing method in its primary class, class extensions,
and primary class's non-optional protocol methods; as primary
class, or one of its subclass's will implement this method.
This warning has potential of being noisy so it has its own
group.  // rdar://7020493

llvm-svn: 136426
2011-07-28 23:19:50 +00:00
Jonathan D. Turner 269f256645 Some documentation fixes so that we are explicit about which iteration order is source-order. Also, removing unused NextInSource field of Module.
llvm-svn: 136423
2011-07-28 23:15:22 +00:00
Ted Kremenek 73665188fc Really remove FlatStoreManager and BasicStoreManager, this time from the driver. Also remove associated tests. Sorry for the messy commits; this is the result of a botched Git merge.
llvm-svn: 136422
2011-07-28 23:08:16 +00:00
Ted Kremenek e2e37b9afc Remove FlatStoreManager and BasicStoreManager. The latter has long been obsolete and the former has no had development in a long time.
llvm-svn: 136420
2011-07-28 23:08:02 +00:00