]> granicus.if.org Git - clang/log
clang
13 years agoDriver: When compiling i386 -fapple-kext code, we fallback to llvmgcc.
Chad Rosier [Mon, 1 Aug 2011 19:58:48 +0000 (19:58 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136644 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPass records with non-trivial destructors or constructors indirectly.
Akira Hatanaka [Mon, 1 Aug 2011 18:09:58 +0000 (18:09 +0000)]
Pass records with non-trivial destructors or constructors indirectly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136630 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix linkage type for tentative definition of ivar offset variables (GNUstep runtime)
David Chisnall [Mon, 1 Aug 2011 17:36:53 +0000 (17:36 +0000)]
Fix linkage type for tentative definition of ivar offset variables (GNUstep runtime)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136628 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMove the serialization of the MODULE_OFFSET_MAP out of the source-manager-writing...
Douglas Gregor [Mon, 1 Aug 2011 16:54:33 +0000 (16:54 +0000)]
Move the serialization of the MODULE_OFFSET_MAP out of the source-manager-writing code and into the general chained-PCH writing code

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136624 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRename the AST file's SOURCE_LOCATION_MAP to MODULE_OFFSET_MAP, to indicate the great...
Douglas Gregor [Mon, 1 Aug 2011 16:01:55 +0000 (16:01 +0000)]
Rename the AST file's SOURCE_LOCATION_MAP to MODULE_OFFSET_MAP, to indicate the greater role it will soon play in remapping.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136619 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTest for // rdar://9846759
Fariborz Jahanian [Sun, 31 Jul 2011 20:27:31 +0000 (20:27 +0000)]
Test for // rdar://9846759

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136602 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove dead code flagged by GCC's -Wunused-but-set-variable.
Benjamin Kramer [Sun, 31 Jul 2011 01:06:41 +0000 (01:06 +0000)]
Remove dead code flagged by GCC's -Wunused-but-set-variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136581 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoNot sure why we bother updating FunctionDecl's EndRangeLoc in FunctionDecl::setParams.
Argyrios Kyrtzidis [Sat, 30 Jul 2011 17:23:28 +0000 (17:23 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136573 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[libclang] Annotation of parameters that got default args from a previous declaration...
Argyrios Kyrtzidis [Sat, 30 Jul 2011 17:23:26 +0000 (17:23 +0000)]
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136572 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIntroduce a Fix-It for the "missing sentinel" warning, adding an
Douglas Gregor [Sat, 30 Jul 2011 08:57:03 +0000 (08:57 +0000)]
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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136566 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd code completion to produce "else" blocks after an "if"
Douglas Gregor [Sat, 30 Jul 2011 08:36:53 +0000 (08:36 +0000)]
Add code completion to produce "else" blocks after an "if"
statement. Fixes <rdar://problem/9229438>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136564 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoWhen producing code completion results for variadic macros, fold the
Douglas Gregor [Sat, 30 Jul 2011 08:17:44 +0000 (08:17 +0000)]
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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136563 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd the various parameter-passing keywords for Distributed Objects
Douglas Gregor [Sat, 30 Jul 2011 07:55:26 +0000 (07:55 +0000)]
Add the various parameter-passing keywords for Distributed Objects
(such as in, inout, byref, and oneway) to code completion
results. Fixes <rdar://problem/8844158>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136562 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a thinko in my __is_empty/__is_pod commit.
Douglas Gregor [Sat, 30 Jul 2011 07:08:19 +0000 (07:08 +0000)]
Fix a thinko in my __is_empty/__is_pod commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136561 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTurn off __has_feature(is_empty) and __has_feature(is_pod) if the
Douglas Gregor [Sat, 30 Jul 2011 07:01:49 +0000 (07:01 +0000)]
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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136560 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoWhen performing code completion after at @interface, allow both
Douglas Gregor [Sat, 30 Jul 2011 06:55:39 +0000 (06:55 +0000)]
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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136559 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoWhen complaining about a non-POD second argument to va_arg, use a
Douglas Gregor [Sat, 30 Jul 2011 06:45:27 +0000 (06:45 +0000)]
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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136558 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse the "Bar.h" -> <Foo/Bar.h> remapping for index header maps only as
Douglas Gregor [Sat, 30 Jul 2011 06:28:34 +0000 (06:28 +0000)]
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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136557 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoobjc rewriter - my last patch was not quite right.
Fariborz Jahanian [Sat, 30 Jul 2011 01:21:41 +0000 (01:21 +0000)]
objc rewriter - my last patch was not quite right.
Fixed again. // rdar://9846759

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136550 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoobjc rewriter - set the flag passed to _Block_object_assign/_Block_object_dispose...
Fariborz Jahanian [Sat, 30 Jul 2011 01:07:55 +0000 (01:07 +0000)]
objc rewriter - set the flag passed to _Block_object_assign/_Block_object_dispose correctly
for copying a captured block object. // rdar://9846759

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136549 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTeach the ASTImporter to cope with cases where we have already
Douglas Gregor [Fri, 29 Jul 2011 23:31:30 +0000 (23:31 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136537 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd support for the 'Q' arm memory constraint.
Eric Christopher [Fri, 29 Jul 2011 21:20:35 +0000 (21:20 +0000)]
Add support for the 'Q' arm memory constraint.

Fixes rdar://9866494

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136524 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Remove recursive visitation in ExprEngine::VisitDeclStmt because it isn...
Ted Kremenek [Fri, 29 Jul 2011 21:18:41 +0000 (21:18 +0000)]
[analyzer] Remove recursive visitation in ExprEngine::VisitDeclStmt because it isn't needed anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136522 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Remove recursive visitation in ExprEngine::VisitCompoundLiteralExpr becaus...
Ted Kremenek [Fri, 29 Jul 2011 21:18:39 +0000 (21:18 +0000)]
[analyzer] Remove recursive visitation in ExprEngine::VisitCompoundLiteralExpr because it isn't needed anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136521 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Remove recursive visitation in ExprEngine::VisitCastExpr because it isn...
Ted Kremenek [Fri, 29 Jul 2011 21:18:37 +0000 (21:18 +0000)]
[analyzer] Remove recursive visitation in ExprEngine::VisitCastExpr because it isn't needed anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136520 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Remove recursive visitation in ExprEngine::VisitObjCForCollectionStmt...
Ted Kremenek [Fri, 29 Jul 2011 21:18:35 +0000 (21:18 +0000)]
[analyzer] Remove recursive visitation in ExprEngine::VisitObjCForCollectionStmt because it isn't needed anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136519 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Remove explicit argument processing from ExprEngine::VisitObjCMessage...
Ted Kremenek [Fri, 29 Jul 2011 21:18:31 +0000 (21:18 +0000)]
[analyzer] Remove explicit argument processing from ExprEngine::VisitObjCMessage() since it is no longer needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136518 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Remove recursive visitation in ExprEngine::VisitLValObjCIvarRefExpr becaus...
Ted Kremenek [Fri, 29 Jul 2011 21:18:28 +0000 (21:18 +0000)]
[analyzer] Remove recursive visitation in ExprEngine::VisitLValObjCIvarRefExpr because it isn't needed anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136517 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] tighten up ExprEngine::VisitObjCAtSynchronizationStmt().
Ted Kremenek [Fri, 29 Jul 2011 21:18:26 +0000 (21:18 +0000)]
[analyzer] tighten up ExprEngine::VisitObjCAtSynchronizationStmt().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136516 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Remove recursive visitation in ExprEngine::VisitObjCPropertyRefExpr becaus...
Ted Kremenek [Fri, 29 Jul 2011 21:18:24 +0000 (21:18 +0000)]
[analyzer] Remove recursive visitation in ExprEngine::VisitObjCPropertyRefExpr because it isn't needed anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136515 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Remove recursive visitation in ExprEngine::VisitCallExpr because it isn...
Ted Kremenek [Fri, 29 Jul 2011 21:18:22 +0000 (21:18 +0000)]
[analyzer] Remove recursive visitation in ExprEngine::VisitCallExpr because it isn't needed anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136514 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Remove recursive visitation in ExprEngine::VisitMemberExpr because it...
Ted Kremenek [Fri, 29 Jul 2011 21:18:19 +0000 (21:18 +0000)]
[analyzer] Remove recursive visitation in ExprEngine::VisitMemberExpr because it isn't needed anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136513 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Remove recursive visitation in ExprEngine::VisitLvalArraySubscriptExpr...
Ted Kremenek [Fri, 29 Jul 2011 21:18:17 +0000 (21:18 +0000)]
[analyzer] Remove recursive visitation in ExprEngine::VisitLvalArraySubscriptExpr() because it is no longer needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136512 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoOn Darwin, libc++ may be installed alongside the compiler in
Douglas Gregor [Fri, 29 Jul 2011 20:21:18 +0000 (20:21 +0000)]
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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136507 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRenamed Loaded member to ImportedBy, as it's easier to read. Added another set to...
Jonathan D. Turner [Fri, 29 Jul 2011 18:09:09 +0000 (18:09 +0000)]
Renamed Loaded member to ImportedBy, as it's easier to read.  Added another set to represent the modules a module imports.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136476 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd a missing \endcode for Doxygen
Douglas Gregor [Fri, 29 Jul 2011 17:35:37 +0000 (17:35 +0000)]
Add a missing \endcode for Doxygen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136469 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove some unnecessary single element array temporaries.
Jay Foad [Fri, 29 Jul 2011 13:56:53 +0000 (13:56 +0000)]
Remove some unnecessary single element array temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136461 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake DiagnosticErrorTrap keep a count of the errors that occurred so multiple
Argyrios Kyrtzidis [Fri, 29 Jul 2011 01:25:44 +0000 (01:25 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136447 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThis patch makes the string/character literal tests run in C,
Douglas Gregor [Fri, 29 Jul 2011 01:08:54 +0000 (01:08 +0000)]
This patch makes the string/character literal tests run in C,
C++98/03, and C++0x mode, from Craig Topper!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136443 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove unused debug function
Douglas Gregor [Fri, 29 Jul 2011 00:59:35 +0000 (00:59 +0000)]
Remove unused debug function

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136442 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIn the ASTReader, replace the continuous range maps whose value types
Douglas Gregor [Fri, 29 Jul 2011 00:56:45 +0000 (00:56 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136441 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix assertion failure in CodeGen where the input operand to an asm
Peter Collingbourne [Fri, 29 Jul 2011 00:24:50 +0000 (00:24 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136438 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix an inconsistency in Sema::ConvertArgumentsForCall in that
Peter Collingbourne [Fri, 29 Jul 2011 00:24:42 +0000 (00:24 +0000)]
Fix an inconsistency in Sema::ConvertArgumentsForCall in that
the callee note diagnostic was not emitted in the case where
there were too few arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136437 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMove the base type ID from the ASTReader's global type map into the
Douglas Gregor [Fri, 29 Jul 2011 00:21:44 +0000 (00:21 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136436 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove an unused function (found by Clang's -Wunused-function)
Chandler Carruth [Fri, 29 Jul 2011 00:15:44 +0000 (00:15 +0000)]
Remove an unused function (found by Clang's -Wunused-function)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136434 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoobjective-c: warn if implementation of a method in category
Fariborz Jahanian [Thu, 28 Jul 2011 23:19:50 +0000 (23:19 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136426 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSome documentation fixes so that we are explicit about which iteration order is sourc...
Jonathan D. Turner [Thu, 28 Jul 2011 23:15:22 +0000 (23:15 +0000)]
Some documentation fixes so that we are explicit about which iteration order is source-order.  Also, removing unused NextInSource field of Module.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136423 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoReally remove FlatStoreManager and BasicStoreManager, this time from the driver....
Ted Kremenek [Thu, 28 Jul 2011 23:08:16 +0000 (23:08 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136422 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove flat store tests.
Ted Kremenek [Thu, 28 Jul 2011 23:08:04 +0000 (23:08 +0000)]
Remove flat store tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136421 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove FlatStoreManager and BasicStoreManager. The latter has long been obsolete...
Ted Kremenek [Thu, 28 Jul 2011 23:08:02 +0000 (23:08 +0000)]
Remove FlatStoreManager and BasicStoreManager.  The latter has long been obsolete and the former has no had development in a long time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136420 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Overhaul how the static analyzer expects CFGs by forcing CFGs to be linear...
Ted Kremenek [Thu, 28 Jul 2011 23:07:59 +0000 (23:07 +0000)]
[analyzer] Overhaul how the static analyzer expects CFGs by forcing CFGs to be linearized only when used by the static analyzer.  This required a rewrite of LiveVariables, and exposed a ton of subtle bugs.

The motivation of this large change is to drastically simplify the logic in ExprEngine going forward.

Some fallout is that the output of some BugReporterVisitors is not as accurate as before; those will
need to be fixed over time.  There is also some possible performance regression as RemoveDeadBindings
will be called frequently; this can also be improved over time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136419 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] fix bug in malloc checker where the tracked symbol would not properly...
Ted Kremenek [Thu, 28 Jul 2011 23:07:51 +0000 (23:07 +0000)]
[analyzer] fix bug in malloc checker where the tracked symbol would not properly be removed from the state.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136418 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] add accessor to StoreRef.
Ted Kremenek [Thu, 28 Jul 2011 23:07:49 +0000 (23:07 +0000)]
[analyzer] add accessor to StoreRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136417 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Add StoreManager::includedInBindings() to to query whether a region is...
Ted Kremenek [Thu, 28 Jul 2011 23:07:46 +0000 (23:07 +0000)]
[analyzer] Add StoreManager::includedInBindings() to to query whether a region is used in any bindings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136416 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Add safety checking in RegionStoreManager for string literal underruns.
Ted Kremenek [Thu, 28 Jul 2011 23:07:43 +0000 (23:07 +0000)]
[analyzer] Add safety checking in RegionStoreManager for string literal underruns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136415 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Teach Environment to not look through MaterializeTemporaryExprs.
Ted Kremenek [Thu, 28 Jul 2011 23:07:41 +0000 (23:07 +0000)]
[analyzer] Teach Environment to not look through MaterializeTemporaryExprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136414 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] Fix bug in ObjCMessage where casts were being incorrectly ignored.
Ted Kremenek [Thu, 28 Jul 2011 23:07:38 +0000 (23:07 +0000)]
[analyzer] Fix bug in ObjCMessage where casts were being incorrectly ignored.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136413 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[analyzer] fix handling of MaterializeTemporaryExpr by binding the result value to
Ted Kremenek [Thu, 28 Jul 2011 23:07:36 +0000 (23:07 +0000)]
[analyzer] fix handling of MaterializeTemporaryExpr by binding the result value to
the proper expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136412 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIntroduce the local-global mapping for preprocessed entities, and use
Douglas Gregor [Thu, 28 Jul 2011 22:39:26 +0000 (22:39 +0000)]
Introduce the local-global mapping for preprocessed entities, and use
it appropriately. Also, patch up a place where we were failing to map
local macro definition IDs into global macro definition IDs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136411 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse local-to-global mapping appropriately for macro definitions in the ASTReader
Douglas Gregor [Thu, 28 Jul 2011 22:16:57 +0000 (22:16 +0000)]
Use local-to-global mapping appropriately for macro definitions in the ASTReader

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136410 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse the local -> global mapping functions for selectors more
Douglas Gregor [Thu, 28 Jul 2011 21:16:51 +0000 (21:16 +0000)]
Use the local -> global mapping functions for selectors more
consistently in the ASTReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136395 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTeach the ASTReader to perform local and global mapping of identifier
Douglas Gregor [Thu, 28 Jul 2011 20:55:49 +0000 (20:55 +0000)]
Teach the ASTReader to perform local and global mapping of identifier
IDs properly, although the mapping itself is still trivial.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136391 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd a fixit for removal of unused label.
Anna Zaks [Thu, 28 Jul 2011 20:52:06 +0000 (20:52 +0000)]
Add a fixit for removal of unused label.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136389 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a test case that was intermittently failing. The issue was that instantiations...
Richard Trieu [Thu, 28 Jul 2011 20:30:10 +0000 (20:30 +0000)]
Fix a test case that was intermittently failing.  The issue was that instantiations are not stored in an order preserving structure, so the print order may be impacted.  Modified test case to do two FileCheck passes to ensure that both instantiations are in the same place.

Test originially commited at r136306 and temporarily silenced at r136348.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136385 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdded basic parsing for all remaining attributes, thread safety
Caitlin Sadowski [Thu, 28 Jul 2011 20:12:35 +0000 (20:12 +0000)]
Added basic parsing for all remaining attributes, thread safety
analysis. This includes checking that the attributes are applied in the
correct contexts and with the correct number of arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136383 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAnother test case for the &/* mismatch fixit.
Anna Zaks [Thu, 28 Jul 2011 19:55:52 +0000 (19:55 +0000)]
Another test case for the &/* mismatch fixit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136380 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd */& mismatch fixit generation to the Sema::DiagnoseAssignmentResult().
Anna Zaks [Thu, 28 Jul 2011 19:51:27 +0000 (19:51 +0000)]
Add */& mismatch fixit generation to the  Sema::DiagnoseAssignmentResult().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136379 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake the deserialization of Sema::PendingInstantiations lazy. At this
Douglas Gregor [Thu, 28 Jul 2011 19:49:54 +0000 (19:49 +0000)]
Make the deserialization of Sema::PendingInstantiations lazy. At this
point, ASTReader::InitializeSema() has very little interesting work,
*except* issues stemming from preloaded declarations. That's something
we'll still need to cope with.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136378 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRefactor the */& mismatch fixit generation out of SemaOverload and provide a simple...
Anna Zaks [Thu, 28 Jul 2011 19:46:48 +0000 (19:46 +0000)]
Refactor the */& mismatch fixit generation out of SemaOverload and provide a simple conversion checking function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136376 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPromote the deserialized PendingInstantiations vector from being a
Douglas Gregor [Thu, 28 Jul 2011 19:26:52 +0000 (19:26 +0000)]
Promote the deserialized PendingInstantiations vector from being a
Module member to being an ASTReader member; we want it to be
centralized for lazy deserialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136373 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoLazily deserialize Sema::VTableUses. Plus, fix the utterly and
Douglas Gregor [Thu, 28 Jul 2011 19:11:31 +0000 (19:11 +0000)]
Lazily deserialize Sema::VTableUses. Plus, fix the utterly and
completely broken deserialization mapping code we had for VTableUses,
which would have broken horribly as soon as our local-to-global ID
mapping became interesting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136371 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThread safety: Fix typo in documentation
Caitlin Sadowski [Thu, 28 Jul 2011 18:38:36 +0000 (18:38 +0000)]
Thread safety: Fix typo in documentation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136370 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake Sema::WeakUndeclaredIdentifiers lazily deserialized.
Douglas Gregor [Thu, 28 Jul 2011 18:09:57 +0000 (18:09 +0000)]
Make Sema::WeakUndeclaredIdentifiers lazily deserialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136368 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd missing documentation onto new member variable.
Jonathan D. Turner [Thu, 28 Jul 2011 17:42:18 +0000 (17:42 +0000)]
Add missing documentation onto new member variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136365 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdded parsing for guarded_var, pt_guarded_var, lockable,
Caitlin Sadowski [Thu, 28 Jul 2011 17:21:07 +0000 (17:21 +0000)]
Added parsing for guarded_var, pt_guarded_var, lockable,
scoped_lockable, and no_thread_safety_analysis attributes, all for thread safety analysis

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136364 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSwitch the ModuleManager over to using a FileManager and FileEntry* as part of its...
Jonathan D. Turner [Thu, 28 Jul 2011 17:20:23 +0000 (17:20 +0000)]
Switch the ModuleManager over to using a FileManager and FileEntry* as part of its lookup instead of the filename.  This is a more correct unique identifier, as symlinks can be handled by the FileManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136363 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake Sema::ReferencedSelectors lazily deserialized.
Douglas Gregor [Thu, 28 Jul 2011 14:54:22 +0000 (14:54 +0000)]
Make Sema::ReferencedSelectors lazily deserialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136357 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMove a Module's ReferencedSelectorsData into the ASTReader itself, so
Douglas Gregor [Thu, 28 Jul 2011 14:41:43 +0000 (14:41 +0000)]
Move a Module's ReferencedSelectorsData into the ASTReader itself, so
that it accumulates referenced selectors from each of the modules/PCH
files as they are loaded. No actual functionality change, yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136356 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake Sema::LocallyScopedExternalDecls lazily deserialized. In theory,
Douglas Gregor [Thu, 28 Jul 2011 14:20:37 +0000 (14:20 +0000)]
Make Sema::LocallyScopedExternalDecls lazily deserialized. In theory,
we could turn this into an on-disk hash table so we don't load the
whole thing the first time we need it. However, it tends to be very,
very small (i.e., empty) for most precompiled headers, so it isn't all
that interesting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136352 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agotest/Misc/ast-dump-templates.cpp: Disable this temporarily due to unstable output.
NAKAMURA Takumi [Thu, 28 Jul 2011 12:10:58 +0000 (12:10 +0000)]
test/Misc/ast-dump-templates.cpp: Disable this temporarily due to unstable output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136348 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agotest/CodeGen/2004-03-16-AsmRegisterCrash.c: XTARGET should accept the part of triplet...
NAKAMURA Takumi [Thu, 28 Jul 2011 11:25:02 +0000 (11:25 +0000)]
test/CodeGen/2004-03-16-AsmRegisterCrash.c: XTARGET should accept the part of triplet. ("x86" is not the part of triplet)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136346 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake a note about a missing optimization.
John McCall [Thu, 28 Jul 2011 07:41:22 +0000 (07:41 +0000)]
Make a note about a missing optimization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136340 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a couple of problems with initialization and assignment to
John McCall [Thu, 28 Jul 2011 07:23:35 +0000 (07:23 +0000)]
Fix a couple of problems with initialization and assignment to
__block variables where the act of initialization/assignment
itself causes the __block variable to be copied to the heap
because the variable is of block type and is being assigned
a block literal which captures the variable.

rdar://problem/9814099

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136337 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agotest/CodeGen/struct-matching-constraint.c: Fixup not to emit garbage to source tree.
NAKAMURA Takumi [Thu, 28 Jul 2011 04:50:11 +0000 (04:50 +0000)]
test/CodeGen/struct-matching-constraint.c: Fixup not to emit garbage to source tree.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136333 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAST serialization support for the Framework in IndexHeaderMapHeader
Douglas Gregor [Thu, 28 Jul 2011 04:50:02 +0000 (04:50 +0000)]
AST serialization support for the Framework in IndexHeaderMapHeader
fields of HeaderFileInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136332 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIntroduce the "-index-header-map" option, to give special semantics
Douglas Gregor [Thu, 28 Jul 2011 04:45:53 +0000 (04:45 +0000)]
Introduce the "-index-header-map" option, to give special semantics
for quoted header lookup when dealing with not-yet-installed
frameworks. Fixes <rdar://problem/9824020>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136331 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agotest/CodeGen/struct-init.c, struct-matching-constraint.c: Tweak commandline, or they...
NAKAMURA Takumi [Thu, 28 Jul 2011 03:53:54 +0000 (03:53 +0000)]
test/CodeGen/struct-init.c, struct-matching-constraint.c: Tweak commandline, or they would not be recognized as armv7 on some hosts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136330 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDon't set Sema's StdNamespace or StdBadAlloc if they've already been set
Douglas Gregor [Thu, 28 Jul 2011 00:57:24 +0000 (00:57 +0000)]
Don't set Sema's StdNamespace or StdBadAlloc if they've already been set

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136318 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSwitch Sema::DynamicClasses over to LazyVector
Douglas Gregor [Thu, 28 Jul 2011 00:53:40 +0000 (00:53 +0000)]
Switch Sema::DynamicClasses over to LazyVector

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136317 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCut down the number of open/close system calls for output files.
Argyrios Kyrtzidis [Thu, 28 Jul 2011 00:45:10 +0000 (00:45 +0000)]
Cut down the number of open/close system calls for output files.

For PCH files, have only one open/close for temporary + rename to be safe from race conditions.
For all other output files open/close the output file directly.

Depends on llvm r136310. rdar://9082880 & http://llvm.org/PR9374.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136315 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSwitch Sema::ExtVectorDecls over to LazyVector.
Douglas Gregor [Thu, 28 Jul 2011 00:39:29 +0000 (00:39 +0000)]
Switch Sema::ExtVectorDecls over to LazyVector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136314 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix thinko in last checkin.
Eric Christopher [Thu, 28 Jul 2011 00:30:42 +0000 (00:30 +0000)]
Fix thinko in last checkin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136311 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove the need for a header and specify a triple so that the type
Eric Christopher [Thu, 28 Jul 2011 00:28:22 +0000 (00:28 +0000)]
Remove the need for a header and specify a triple so that the type
sizes make sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136309 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix this up for clang codegen versus llvm-gcc.
Eric Christopher [Thu, 28 Jul 2011 00:25:28 +0000 (00:25 +0000)]
Fix this up for clang codegen versus llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136308 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix this test to work for arm and on all platforms.
Eric Christopher [Thu, 28 Jul 2011 00:22:59 +0000 (00:22 +0000)]
Fix this test to work for arm and on all platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136307 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd template instantiations to the output of -ast-dump.
Richard Trieu [Thu, 28 Jul 2011 00:19:05 +0000 (00:19 +0000)]
Add template instantiations to the output of -ast-dump.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136306 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd a triple to this test and make sure it passes on arm where it was
Eric Christopher [Thu, 28 Jul 2011 00:13:53 +0000 (00:13 +0000)]
Add a triple to this test and make sure it passes on arm where it was
supposed to.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136305 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCorrect the triple here.
Eric Christopher [Thu, 28 Jul 2011 00:11:03 +0000 (00:11 +0000)]
Correct the triple here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136304 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThis works on arm.
Eric Christopher [Thu, 28 Jul 2011 00:10:10 +0000 (00:10 +0000)]
This works on arm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136303 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoApparently this does work on arm.
Eric Christopher [Thu, 28 Jul 2011 00:09:38 +0000 (00:09 +0000)]
Apparently this does work on arm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136302 91177308-0d34-0410-b5e6-96231b3b80d8