]> granicus.if.org Git - clang/log
clang
15 years agocleanups, no functionality change.
Chris Lattner [Tue, 12 May 2009 20:58:15 +0000 (20:58 +0000)]
cleanups, no functionality change.

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

15 years agoMethod who have definitions in structs/classes are semantically inline.
Chris Lattner [Tue, 12 May 2009 20:55:07 +0000 (20:55 +0000)]
Method who have definitions in structs/classes are semantically inline.
Per the FIXME, it might be interesting to track whether the inline keyword
was also used on the method, but for now we don't do this.  Testcase pending.

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

15 years agostatic methods don't get this pointers.
Chris Lattner [Tue, 12 May 2009 20:27:19 +0000 (20:27 +0000)]
static methods don't get this pointers.

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

15 years agorevert my previous patch, I committed the wrong file.
Chris Lattner [Tue, 12 May 2009 20:26:52 +0000 (20:26 +0000)]
revert my previous patch, I committed the wrong file.

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

15 years agoDiagnostic wording fix, from Anders Johnsen
Douglas Gregor [Tue, 12 May 2009 20:24:52 +0000 (20:24 +0000)]
Diagnostic wording fix, from Anders Johnsen

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

15 years agostatic methods don't get this pointers.
Chris Lattner [Tue, 12 May 2009 20:21:39 +0000 (20:21 +0000)]
static methods don't get this pointers.

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

15 years agoFix: <rdar://problem/6320065> false positive - init method returns an object owned...
Ted Kremenek [Tue, 12 May 2009 20:06:54 +0000 (20:06 +0000)]
Fix: <rdar://problem/6320065> false positive - init method returns an object owned by caller

Now 'init' methods are treated by the retain/release checker as
claiming their receiver and allocating a new object.

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

15 years agoFixed typos, used DenseSet for keeping track of
Fariborz Jahanian [Tue, 12 May 2009 20:06:41 +0000 (20:06 +0000)]
Fixed typos, used DenseSet for keeping track of
selectors which need use Nonfrgile API for
message dispatch.

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

15 years agoAlign the N/A in the C++ status table, from Anders Johnsen
Douglas Gregor [Tue, 12 May 2009 18:36:58 +0000 (18:36 +0000)]
Align the N/A in the C++ status table, from Anders Johnsen

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

15 years agoaccept "#pragma clang foo" where we accept "#pragma GCC foo".
Chris Lattner [Tue, 12 May 2009 18:21:11 +0000 (18:21 +0000)]
accept "#pragma clang foo" where we accept "#pragma GCC foo".

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

15 years agoPatch to implement ivar synthesis of properties declared in protocols
Fariborz Jahanian [Tue, 12 May 2009 18:14:29 +0000 (18:14 +0000)]
Patch to implement ivar synthesis of properties declared in protocols
only and used in class imllementations (objc2 Nonfragile ABI specific).

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

15 years agoMake scan-build process of --use-cc and --html-title more robust.
Ted Kremenek [Tue, 12 May 2009 18:04:43 +0000 (18:04 +0000)]
Make scan-build process of --use-cc and --html-title more robust.

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

15 years agoFill in more C++ status. We're now using the check mark to mean,
Douglas Gregor [Tue, 12 May 2009 17:55:28 +0000 (17:55 +0000)]
Fill in more C++ status. We're now using the check mark to mean,
"complete, and we have tests for every paragraph".

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

15 years agoDarwin x86-32 ABI: Now that structure passing is farther along, we
Daniel Dunbar [Tue, 12 May 2009 17:00:20 +0000 (17:00 +0000)]
Darwin x86-32 ABI: Now that structure passing is farther along, we
don't need special treatment for unions.

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

15 years agox86-64 ABI: clang incorrectly passes union { long double, float } in
Daniel Dunbar [Tue, 12 May 2009 15:22:40 +0000 (15:22 +0000)]
x86-64 ABI: clang incorrectly passes union { long double, float } in
register.
 - Merge algorithm was returning MEMORY as it should.

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

15 years agoAdd logic for invalidating array region to CFRefCount.cpp. When invalidating
Zhongxing Xu [Tue, 12 May 2009 10:10:00 +0000 (10:10 +0000)]
Add logic for invalidating array region to CFRefCount.cpp. When invalidating
array region, set its default value to conjured symbol. When retrieving its
element, create new region value symbol for the element.

Also fix some 80 columns violations.

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

15 years agoFix <rdar://problem/6877235> Classes typedef-ed to CF objects should get the same...
Ted Kremenek [Tue, 12 May 2009 04:53:03 +0000 (04:53 +0000)]
Fix <rdar://problem/6877235> Classes typedef-ed to CF objects should get the same treatment as CF objects

This was accomplished by having 'isTypeRef' recursively walk the typedef stack.

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

15 years agoMake precompiled headers work with -E. When we're only preprocessing
Douglas Gregor [Tue, 12 May 2009 01:31:05 +0000 (01:31 +0000)]
Make precompiled headers work with -E. When we're only preprocessing
(with -E), we turn the PCH include into an implicit include of the
file from which the PCH file was generated.

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

15 years agowrap up a version of the man page that is minimally helpful, but somewhat complete.
Chris Lattner [Tue, 12 May 2009 00:47:40 +0000 (00:47 +0000)]
wrap up a version of the man page that is minimally helpful, but somewhat complete.

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

15 years agoUpdate checker build.
Ted Kremenek [Tue, 12 May 2009 00:45:33 +0000 (00:45 +0000)]
Update checker build.

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

15 years agoadd some more content.
Chris Lattner [Tue, 12 May 2009 00:01:32 +0000 (00:01 +0000)]
add some more content.

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

15 years agoEncapsulate template arguments lists in a new class,
Douglas Gregor [Mon, 11 May 2009 23:53:27 +0000 (23:53 +0000)]
Encapsulate template arguments lists in a new class,
TemplateArgumentList. This avoids the need to pass around
pointer/length pairs of template arguments lists, and will eventually
make it easier to introduce member templates and variadic templates.

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

15 years agoBugReport::getEndPath() - Only add a Stmt's range to the constructed PathDiagnosticEv...
Ted Kremenek [Mon, 11 May 2009 23:50:59 +0000 (23:50 +0000)]
BugReport::getEndPath() - Only add a Stmt's range to the constructed PathDiagnosticEventPiece if the BugReport contained no explicit ranges.

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

15 years agoFactor code that's common to EmitCXXMemberCallExpr and EmitCXXConstructorCall out...
Anders Carlsson [Mon, 11 May 2009 23:37:08 +0000 (23:37 +0000)]
Factor code that's common to EmitCXXMemberCallExpr and EmitCXXConstructorCall out into a EmitCXXMemberCall function.

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

15 years agoUse Text::ParseWords to make 'clang -###' parsing more robust.
Ted Kremenek [Mon, 11 May 2009 23:29:51 +0000 (23:29 +0000)]
Use Text::ParseWords to make 'clang -###' parsing more robust.

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

15 years agoTweak this non-default test so it still works w/ x86 feature support.
Daniel Dunbar [Mon, 11 May 2009 23:11:21 +0000 (23:11 +0000)]
Tweak this non-default test so it still works w/ x86 feature support.

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

15 years agoTest for x86 target features, I forgot to commit this.
Daniel Dunbar [Mon, 11 May 2009 23:06:15 +0000 (23:06 +0000)]
Test for x86 target features, I forgot to commit this.

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

15 years agoDarwin x86-32: Multi-dimensional arrays were not handled correctly,
Daniel Dunbar [Mon, 11 May 2009 23:01:34 +0000 (23:01 +0000)]
Darwin x86-32: Multi-dimensional arrays were not handled correctly,
spotted by Eli!

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

15 years agoFriend declarations are only valid inside class definitions.
Anders Carlsson [Mon, 11 May 2009 22:55:49 +0000 (22:55 +0000)]
Friend declarations are only valid inside class definitions.

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

15 years agoWhen stripping element regions for invalidating region values, treat FieldRegions...
Ted Kremenek [Mon, 11 May 2009 22:55:17 +0000 (22:55 +0000)]
When stripping element regions for invalidating region values, treat FieldRegions and ObjCIvarRegions as "base" regions in addition to VarRegions.

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

15 years agopull a bunch of options out of clang-cc.cpp. This doesn't include
Chris Lattner [Mon, 11 May 2009 22:45:37 +0000 (22:45 +0000)]
pull a bunch of options out of clang-cc.cpp.  This doesn't include
options that the driver swizzles.

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

15 years agoFix test case by always setting the type spec type, even for friend decls.
Anders Carlsson [Mon, 11 May 2009 22:42:30 +0000 (22:42 +0000)]
Fix test case by always setting the type spec type, even for friend decls.

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

15 years agoMake cleanup-stack.c test stronger, and work in release-asserts mode.
Daniel Dunbar [Mon, 11 May 2009 22:30:29 +0000 (22:30 +0000)]
Make cleanup-stack.c test stronger, and work in release-asserts mode.

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

15 years agoAdd an ActOnFriendDecl and call it for friend class decls.
Anders Carlsson [Mon, 11 May 2009 22:27:47 +0000 (22:27 +0000)]
Add an ActOnFriendDecl and call it for friend class decls.

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

15 years agoFor friend class decls, always use TK_Reference so we'll try to look up existing...
Anders Carlsson [Mon, 11 May 2009 22:25:03 +0000 (22:25 +0000)]
For friend class decls, always use TK_Reference so we'll try to look up existing class decls first.

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

15 years agoEdgeBuilder: DeclStmts and BinaryOperators are not the enclosing location context...
Ted Kremenek [Mon, 11 May 2009 22:19:32 +0000 (22:19 +0000)]
EdgeBuilder: DeclStmts and BinaryOperators are not the enclosing location context when they are used as initialization code for loops.

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

15 years agoEdgeBuilder::cleanUpLocation() should used the PathDiagnosticLocation constructor...
Ted Kremenek [Mon, 11 May 2009 21:42:34 +0000 (21:42 +0000)]
EdgeBuilder::cleanUpLocation() should used the PathDiagnosticLocation constructor for a single point, not a range.

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

15 years agoccc-analyzer should only analyze C and Objective-C files.
Ted Kremenek [Mon, 11 May 2009 21:08:34 +0000 (21:08 +0000)]
ccc-analyzer should only analyze C and Objective-C files.

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

15 years agoImplement the notions of the "current instantiation" and "unknown
Douglas Gregor [Mon, 11 May 2009 19:58:34 +0000 (19:58 +0000)]
Implement the notions of the "current instantiation" and "unknown
specialization" within a C++ template, and permit name lookup into the
current instantiation. For example, given:

  template<typename T, typename U>
  struct X {
    typedef T type;

    X* x1;  // current instantiation
    X<T, U> *x2; // current instantiation
    X<U, T> *x3; // not current instantiation
    ::X<type, U> *x4; // current instantiation
    X<typename X<type, U>::type, U>: *x5; // current instantiation
  };

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

15 years agoBugReporter (extensive diagnostics): Add EdgeBuilder::cleanUpLocation for canonicaliz...
Ted Kremenek [Mon, 11 May 2009 19:50:47 +0000 (19:50 +0000)]
BugReporter (extensive diagnostics): Add EdgeBuilder::cleanUpLocation for canonicalization locations and use this in both popLocation and rawAddEdge.

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

15 years agoAdd ParentMap:getParentIgnoreParens().
Ted Kremenek [Mon, 11 May 2009 19:49:27 +0000 (19:49 +0000)]
Add ParentMap:getParentIgnoreParens().

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

15 years agoPatch to allow Nonfragile ABI to use 32-bit style legacy
Fariborz Jahanian [Mon, 11 May 2009 19:25:47 +0000 (19:25 +0000)]
Patch to allow Nonfragile ABI to use 32-bit style legacy
message dispage API for all but a few messages. This is
a runtime performance improvement and there is not meant
to be a functional change.

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

15 years agoUpdate checker build.
Ted Kremenek [Mon, 11 May 2009 19:02:11 +0000 (19:02 +0000)]
Update checker build.

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

15 years agoDarwin x86_32: Treat records with unnamed bit-fields as "empty".
Daniel Dunbar [Mon, 11 May 2009 18:58:49 +0000 (18:58 +0000)]
Darwin x86_32: Treat records with unnamed bit-fields as "empty".

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

15 years agoFix regression reported in <rdar://problem/6866843>. The analyzer should extend...
Ted Kremenek [Mon, 11 May 2009 18:30:24 +0000 (18:30 +0000)]
Fix regression reported in <rdar://problem/6866843>.  The analyzer should extend the lifetime of an object stored to a container.

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

15 years agoMore improvements for GNU runtime objc EH, patch by David Chisnall!
Chris Lattner [Mon, 11 May 2009 18:16:28 +0000 (18:16 +0000)]
More improvements for GNU runtime objc EH, patch by David Chisnall!

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

15 years agoMove terminal-width computation over to llvm::sys. Update to LLVM
Douglas Gregor [Mon, 11 May 2009 18:06:49 +0000 (18:06 +0000)]
Move terminal-width computation over to llvm::sys. Update to LLVM
r71448 required. Fixes PR 4148 and PR 4183.

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

15 years agoAdd test case for <rdar://problem/6257780>.
Ted Kremenek [Mon, 11 May 2009 17:45:06 +0000 (17:45 +0000)]
Add test case for <rdar://problem/6257780>.

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

15 years agoAdd a test for canonicalization of template arguments
Douglas Gregor [Mon, 11 May 2009 16:52:38 +0000 (16:52 +0000)]
Add a test for canonicalization of template arguments

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

15 years agoUpdate checker build.
Ted Kremenek [Mon, 11 May 2009 16:31:31 +0000 (16:31 +0000)]
Update checker build.

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

15 years agoFix a bug found by Thomas Clement where 'return [[[NSString alloc] init] autorelease...
Ted Kremenek [Mon, 11 May 2009 15:26:06 +0000 (15:26 +0000)]
Fix a bug found by Thomas Clement where 'return [[[NSString alloc] init] autorelease]' would emit a false 'too many overreleases' error.

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

15 years agoTypedRegion is a too general assumption. Usually we only want to invalidate
Zhongxing Xu [Mon, 11 May 2009 14:28:14 +0000 (14:28 +0000)]
TypedRegion is a too general assumption. Usually we only want to invalidate
the VarRegion as a super region of an ElementRegion.

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

15 years agoWhen retrieving an ElementRegion, if its super region is a StringRegion,
Zhongxing Xu [Mon, 11 May 2009 14:23:36 +0000 (14:23 +0000)]
When retrieving an ElementRegion, if its super region is a StringRegion,
retrieve the string value.

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

15 years agoFix a bug that leads to infinite loop. Set the correct element type to
Zhongxing Xu [Mon, 11 May 2009 12:48:56 +0000 (12:48 +0000)]
Fix a bug that leads to infinite loop. Set the correct element type to
ElementRegion.

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

15 years agoWith the introduction of nullptr, a template argument that refers to a declaration...
Douglas Gregor [Sun, 10 May 2009 23:27:08 +0000 (23:27 +0000)]
With the introduction of nullptr, a template argument that refers to a declaration can now be NULL. Use cast_or_null appropriately

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

15 years agoThe canonical declaration of a NULL declaration is NULL
Douglas Gregor [Sun, 10 May 2009 22:59:12 +0000 (22:59 +0000)]
The canonical declaration of a NULL declaration is NULL

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

15 years agoImplement the semantics of the injected-class-name within a class
Douglas Gregor [Sun, 10 May 2009 22:57:19 +0000 (22:57 +0000)]
Implement the semantics of the injected-class-name within a class
template. The injected-class-name is either a type or a template,
depending on whether a '<' follows it. As a type, the
injected-class-name's template argument list contains its template
parameters in declaration order.

As part of this, add logic for canonicalizing declarations, and be
sure to canonicalize declarations used in template names and template
arguments.

A TagType is dependent if the declaration it references is dependent.

I'm not happy about the rather complicated protocol needed to use
ASTContext::getTemplateSpecializationType.

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

15 years agoUpdate minor points in C++ status table.
Sebastian Redl [Sun, 10 May 2009 20:06:11 +0000 (20:06 +0000)]
Update minor points in C++ status table.

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

15 years agoImplement C++0x nullptr.
Sebastian Redl [Sun, 10 May 2009 18:38:11 +0000 (18:38 +0000)]
Implement C++0x nullptr.

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

15 years agoUpdate checker build.
Ted Kremenek [Sun, 10 May 2009 17:41:29 +0000 (17:41 +0000)]
Update checker build.

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

15 years agoAdd special warning about returning a retained object where a GC'ed object is expected.
Ted Kremenek [Sun, 10 May 2009 16:52:15 +0000 (16:52 +0000)]
Add special warning about returning a retained object where a GC'ed object is expected.

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

15 years agoretain/release checker: Flag a warning for non-owned objects returned
Ted Kremenek [Sun, 10 May 2009 06:25:57 +0000 (06:25 +0000)]
retain/release checker: Flag a warning for non-owned objects returned
where an owned one is expected.  Also add preliminary checking for
returning a positive retain count object in GC mode where an owned GC
object is expected.

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

15 years agoUpdate checker build.
Ted Kremenek [Sun, 10 May 2009 05:54:23 +0000 (05:54 +0000)]
Update checker build.

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

15 years agoanalyzer:
Ted Kremenek [Sun, 10 May 2009 05:11:21 +0000 (05:11 +0000)]
analyzer:
- Improve -autorelease diagnostics.
- Improve VLA diagnostics.
- Use "short description" for bug when outputting to TextDiagnostics

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

15 years agoUpdate checker build.
Ted Kremenek [Sun, 10 May 2009 02:22:16 +0000 (02:22 +0000)]
Update checker build.

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

15 years agoAdd total hack to get scan-build working again. ccc-analyzer calls
Ted Kremenek [Sat, 9 May 2009 19:19:28 +0000 (19:19 +0000)]
Add total hack to get scan-build working again.  ccc-analyzer calls
'clang -###' to get the appropriate arguments to pass to clang-cc.
This isn't a permanent solution.

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

15 years agoforce a target triple so that the right greppable output happens.
Chris Lattner [Sat, 9 May 2009 17:36:58 +0000 (17:36 +0000)]
force a target triple so that the right greppable output happens.

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

15 years agoWhen casting VarRegion, if the var type is aggregate type and the cast-to
Zhongxing Xu [Sat, 9 May 2009 15:34:29 +0000 (15:34 +0000)]
When casting VarRegion, if the var type is aggregate type and the cast-to
pointee type is scalar type, create element region regardless with the sizes
of types.

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

15 years agoRemove the rest TypedViewRegion processing code. There should be no
Zhongxing Xu [Sat, 9 May 2009 15:23:42 +0000 (15:23 +0000)]
Remove the rest TypedViewRegion processing code. There should be no
TypedViewRegion usage in region store.

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

15 years agoWhen evaluating pointer arithmetic, if the base location is a symbolic region,
Zhongxing Xu [Sat, 9 May 2009 15:18:12 +0000 (15:18 +0000)]
When evaluating pointer arithmetic, if the base location is a symbolic region,
convert it to the first element region.
Also do not assume the array region is typed.

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

15 years agoDo not create a TypedViewRegion when the base struct region is a symbolic
Zhongxing Xu [Sat, 9 May 2009 13:36:16 +0000 (13:36 +0000)]
Do not create a TypedViewRegion when the base struct region is a symbolic
region. In the future we may set the cast-to type as the same time. But for
now, we simply leave it as it is.

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

15 years agoadd comments to test case.
Zhongxing Xu [Sat, 9 May 2009 13:27:17 +0000 (13:27 +0000)]
add comments to test case.

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

15 years agoDo not layer a TypedViewRegion when casting symbolic or alloca regions.
Zhongxing Xu [Sat, 9 May 2009 13:20:07 +0000 (13:20 +0000)]
Do not layer a TypedViewRegion when casting symbolic or alloca regions.
Modify getLValueElement accordingly. Now we don't require base region
to be a typed region. Do not create TypedViewRegion when base region is
symbolic or alloca region. We can do so because each element region has
its type information.

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

15 years agoRemove the case for casting to compatible type in
Zhongxing Xu [Sat, 9 May 2009 10:03:08 +0000 (10:03 +0000)]
Remove the case for casting to compatible type in
RegionStoreManager::CastRegion(). This case should be subsumed by others.

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

15 years agoCorrect for renaming PaddedSize -> AllocSize in
Duncan Sands [Sat, 9 May 2009 07:08:47 +0000 (07:08 +0000)]
Correct for renaming PaddedSize -> AllocSize in
LLVM.

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

15 years agoRoll back to checker build 0.195.
Ted Kremenek [Sat, 9 May 2009 07:05:44 +0000 (07:05 +0000)]
Roll back to checker build 0.195.

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

15 years agoRename:
Zhongxing Xu [Sat, 9 May 2009 04:08:27 +0000 (04:08 +0000)]
Rename:
  SymbolRegionRValue => SymbolRegionValue
  SymExpr::RegionRValue => SymExpr::RegionValueKind

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

15 years agoAs discussed with Ted, rename TypedRegion::getObjectType() to
Zhongxing Xu [Sat, 9 May 2009 03:57:34 +0000 (03:57 +0000)]
As discussed with Ted, rename TypedRegion::getObjectType() to
TypedRegion::getValueType().

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

15 years agoAdd back test cases for ns_returns_retained and cf_returns_retained.
Ted Kremenek [Sat, 9 May 2009 03:10:32 +0000 (03:10 +0000)]
Add back test cases for ns_returns_retained and cf_returns_retained.

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

15 years agoAdd back attribute string lookup for 'ns_returns_retained' and
Ted Kremenek [Sat, 9 May 2009 03:08:29 +0000 (03:08 +0000)]
Add back attribute string lookup for 'ns_returns_retained' and
'cf_returns_retained'.

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

15 years agoAdd back analyzer support for ns_returns_retained and cf_returns_retained.
Ted Kremenek [Sat, 9 May 2009 02:58:13 +0000 (02:58 +0000)]
Add back analyzer support for ns_returns_retained and cf_returns_retained.

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

15 years agoAdd back Parse/Sema support for attributes cf_returns_retained and
Ted Kremenek [Sat, 9 May 2009 02:44:38 +0000 (02:44 +0000)]
Add back Parse/Sema support for attributes cf_returns_retained and
ns_returns_retained, but do not include the other ownership attributes
we previously had.

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

15 years agoIt lives! The retain/release checker now tracks objects that are sent
Ted Kremenek [Sat, 9 May 2009 01:50:57 +0000 (01:50 +0000)]
It lives!  The retain/release checker now tracks objects that are sent
'autorelease'.

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

15 years agoFix lurking bug in one of the versions of
Ted Kremenek [Sat, 9 May 2009 01:37:12 +0000 (01:37 +0000)]
Fix lurking bug in one of the versions of
GRStmtNodeBuilder::generateNode() where the HasGeneratedNode flag
wouldn't properly be set.

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

15 years agorename: MemRegion:
Zhongxing Xu [Sat, 9 May 2009 00:50:33 +0000 (00:50 +0000)]
rename: MemRegion:
 RValueType => ObjectType
 LValueType => LocationType

No functionality change.

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

15 years agoMore hacking on autorelease errors. We now can emit basic errors (disabled for
Ted Kremenek [Sat, 9 May 2009 00:44:07 +0000 (00:44 +0000)]
More hacking on autorelease errors. We now can emit basic errors (disabled for
now until ready).

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

15 years agoPut most of the boilerplate logic in place for reporting autorelease errors.
Ted Kremenek [Sat, 9 May 2009 00:10:05 +0000 (00:10 +0000)]
Put most of the boilerplate logic in place for reporting autorelease errors.

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

15 years agoWe want to diagnose sending message to a forward class
Fariborz Jahanian [Fri, 8 May 2009 23:45:49 +0000 (23:45 +0000)]
We want to diagnose sending message to a forward class
and we also want to tell which message is actually
being sent.

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

15 years agoABITest: Improve test driver marginally, to allow running a specific
Daniel Dunbar [Fri, 8 May 2009 23:40:45 +0000 (23:40 +0000)]
ABITest: Improve test driver marginally, to allow running a specific
test index.

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

15 years agoretain/release checker: Add stub for HandleAutoreleaseCounts.
Ted Kremenek [Fri, 8 May 2009 23:32:51 +0000 (23:32 +0000)]
retain/release checker: Add stub for HandleAutoreleaseCounts.

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

15 years agoFix PR4182.
Zhongxing Xu [Fri, 8 May 2009 23:28:07 +0000 (23:28 +0000)]
Fix PR4182.

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

15 years agoretain/release checker: Refactor error-reporting code in EvalDeadSymbols and
Ted Kremenek [Fri, 8 May 2009 23:09:42 +0000 (23:09 +0000)]
retain/release checker: Refactor error-reporting code in EvalDeadSymbols and
EvalEndPath. This sets the stage for handling autorelease counts.

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

15 years agoMake BlockEntrace program points taggable.
Ted Kremenek [Fri, 8 May 2009 23:08:34 +0000 (23:08 +0000)]
Make BlockEntrace program points taggable.

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

15 years agoFix typo in method name.
Ted Kremenek [Fri, 8 May 2009 23:07:51 +0000 (23:07 +0000)]
Fix typo in method name.

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

15 years agoWarn if forward class is used as a receiver.
Fariborz Jahanian [Fri, 8 May 2009 23:02:36 +0000 (23:02 +0000)]
Warn if forward class is used as a receiver.

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

15 years agoABITest: Move more of the common Makefile bits into the common
Daniel Dunbar [Fri, 8 May 2009 22:49:52 +0000 (22:49 +0000)]
ABITest: Move more of the common Makefile bits into the common
Makefile.

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

15 years agoABITest: Fix a bug in generating test values for structures w/ no
Daniel Dunbar [Fri, 8 May 2009 22:48:39 +0000 (22:48 +0000)]
ABITest: Fix a bug in generating test values for structures w/ no
non-padding fields.

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

15 years agox86_64 ABI: Ignore padding bit-fields during classification.
Daniel Dunbar [Fri, 8 May 2009 22:26:44 +0000 (22:26 +0000)]
x86_64 ABI: Ignore padding bit-fields during classification.
 - {return-types,single-args}-{32,64} pass the first 1k ABI tests with
   bit-fields enabled.

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

15 years agoDarwin x86_32: When coercing a "single element" structure, make sure
Daniel Dunbar [Fri, 8 May 2009 21:30:11 +0000 (21:30 +0000)]
Darwin x86_32: When coercing a "single element" structure, make sure
to use a wide enough type. This might be wider than the "single
element"'s type in the presence of padding bit-fields.
 - Darwin x86_32 now passes the first 1k ABI tests with bit-field
   generation enabled.

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

15 years agoFixes a bug in my last patch. Order of types reversed.
Fariborz Jahanian [Fri, 8 May 2009 21:10:00 +0000 (21:10 +0000)]
Fixes a bug in my last patch. Order of types reversed.

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