]> granicus.if.org Git - clang/log
clang
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

15 years agoDarwin x86_32: Ignore padding bit-fields when looking for "single
Daniel Dunbar [Fri, 8 May 2009 21:04:47 +0000 (21:04 +0000)]
Darwin x86_32: Ignore padding bit-fields when looking for "single
element" structures.

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

15 years agoDarwin x86_32: Improve bit-field handling for returning records.
Daniel Dunbar [Fri, 8 May 2009 20:55:49 +0000 (20:55 +0000)]
Darwin x86_32: Improve bit-field handling for returning records.
 - This turns out to be a no-op now that most of the handling for
   everything else is in place.

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

15 years agoDarwin x86_32: Ignore arrays of empty structures inside records.
Daniel Dunbar [Fri, 8 May 2009 20:21:04 +0000 (20:21 +0000)]
Darwin x86_32: Ignore arrays of empty structures inside records.
 - This eliminates 5/1000 failures on return-types-32, on the current
   ABITest config.

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

15 years agoRefactoring of my last patch.
Fariborz Jahanian [Fri, 8 May 2009 20:20:55 +0000 (20:20 +0000)]
Refactoring of my last patch.

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

15 years agoABITest: Move default set of test args into common makefile.
Daniel Dunbar [Fri, 8 May 2009 20:10:52 +0000 (20:10 +0000)]
ABITest: Move default set of test args into common makefile.

Also, tweak default list of bit-fields to try.

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

15 years agoretain checker: Track the number of times a tracked object is sent
Ted Kremenek [Fri, 8 May 2009 20:01:42 +0000 (20:01 +0000)]
retain checker: Track the number of times a tracked object is sent
'autorelease'. This isn't used yet to flag errors.

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

15 years agoMore type checking for properties, accessors and
Fariborz Jahanian [Fri, 8 May 2009 19:36:34 +0000 (19:36 +0000)]
More type checking for properties, accessors and
use of dot-syntax expression. This is to match gcc's.

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

15 years agoProvide dummy va_list typedef for msp430
Anton Korobeynikov [Fri, 8 May 2009 18:24:57 +0000 (18:24 +0000)]
Provide dummy va_list typedef for msp430

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

15 years agofurther improvements to gnu objc EH stuff, patch by David Chisnall!
Chris Lattner [Fri, 8 May 2009 17:36:08 +0000 (17:36 +0000)]
further improvements to gnu objc EH stuff, patch by David Chisnall!

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

15 years ago"This patch fixes message sends to super in categories for the GNU runtime. This...
Chris Lattner [Fri, 8 May 2009 15:39:58 +0000 (15:39 +0000)]
"This patch fixes message sends to super in categories for the GNU runtime.  This used to work, but I broke it when I modified the code to emit the same thing as GCC for message sends to super in classes."

Patch by David Chisnall!

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

15 years agoFix the atomics sema code to convert operands to the argument types
Chris Lattner [Fri, 8 May 2009 15:36:58 +0000 (15:36 +0000)]
Fix the atomics sema code to convert operands to the argument types
of the underlying _N builtin, not the the type of the pointee of the
actual type.  This ensures that atomics involving pointers end up
using the correct integer type when they are resolved, avoiding
aborts in codegen.

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

15 years agoRemove experimental ownership attributes from Clang.
Ted Kremenek [Fri, 8 May 2009 15:19:25 +0000 (15:19 +0000)]
Remove experimental ownership attributes from Clang.

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

15 years agoRegion store: when casting VarRegions, if the cast-to pointee type is
Zhongxing Xu [Fri, 8 May 2009 07:28:25 +0000 (07:28 +0000)]
Region store: when casting VarRegions, if the cast-to pointee type is
incomplete, do not compute its size and return the original region.

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

15 years agoreimplement __sync_* builtins to be variadic and to follow the same
Chris Lattner [Fri, 8 May 2009 06:58:22 +0000 (06:58 +0000)]
reimplement __sync_* builtins to be variadic and to follow the same
semantic rules that gcc and icc use.  This implements the variadic
and concrete versions as builtins and has sema do the
disambiguation.  There are probably a bunch of details to finish up
but this seems like a large monotonic step forward :)

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

15 years agoReplace the heuristic isSmallerThan with ASTContext::getTypeSize().
Zhongxing Xu [Fri, 8 May 2009 02:12:59 +0000 (02:12 +0000)]
Replace the heuristic isSmallerThan with ASTContext::getTypeSize().

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

15 years agoReplace getTypeWidth() with ASTContext::getTypeSize().
Zhongxing Xu [Fri, 8 May 2009 02:00:55 +0000 (02:00 +0000)]
Replace getTypeWidth() with ASTContext::getTypeSize().

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

15 years agoRevert r71079.
Zhongxing Xu [Fri, 8 May 2009 01:33:18 +0000 (01:33 +0000)]
Revert r71079.

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

15 years agoAdd various other bits I use to run ABITest.
Daniel Dunbar [Fri, 8 May 2009 00:49:21 +0000 (00:49 +0000)]
Add various other bits I use to run ABITest.

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

15 years agoFix <rdar://problem/6845148>. Signed integers compared against pointers should
Ted Kremenek [Fri, 8 May 2009 00:32:39 +0000 (00:32 +0000)]
Fix <rdar://problem/6845148>. Signed integers compared against pointers should
implicitly be changed to unsigned values in GRSimpleVals.cpp. This can happen
when the comparison involves logic in specialized transfer functions (e.g.,
OSAtomicCompareAndSwap).

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

15 years agoinitial support for ObjC exceptions with the GNU runtime:
Chris Lattner [Fri, 8 May 2009 00:11:50 +0000 (00:11 +0000)]
initial support for ObjC exceptions with the GNU runtime:

"This patch is a first pass at adding support for exceptions for the GNU runtime.  There are a few limitations at present:

- @synchronized() is not yet supported at all.  gcc currently emits calls to runtime library functions that don't exist for this directive.

- Only id @catch statements are currently working.  This is enough for NS_DURING and friends, but I need to spend more time reading the output from gcc -S to work out how it finds the class pointer to make arbitrary class type catch statements work.

- I've tested it with a few common cases[1] and the clang test suite (which doesn't test exceptions for the GNU runtime, but shows I haven't broken anything else), but there are probably a lot of cases I've missed."

Patch by David Chisnall!

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

15 years agoFix crash with constant initialization of bit-fields in unions.
Eli Friedman [Thu, 7 May 2009 23:42:42 +0000 (23:42 +0000)]
Fix crash with constant initialization of bit-fields in unions.

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

15 years agoMinor code cleanup in retain/release checker in preparation for some
Ted Kremenek [Thu, 7 May 2009 23:40:42 +0000 (23:40 +0000)]
Minor code cleanup in retain/release checker in preparation for some
other changes.  Instead of repeatedly checking for GC mode when
getting the return effect, just do this computation once.

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

15 years agoAdd to the house of cards that is ABITestGen.
Daniel Dunbar [Thu, 7 May 2009 23:19:55 +0000 (23:19 +0000)]
Add to the house of cards that is ABITestGen.
 - Support generating structures with bit-fields.

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

15 years agoAdd a warning for a missing copy attribute on a property that is a
Mike Stump [Thu, 7 May 2009 23:06:50 +0000 (23:06 +0000)]
Add a warning for a missing copy attribute on a property that is a
block pointer.  Radar 6441502

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

15 years agoRemove -fobjc-tight-layout, seems to work!
Daniel Dunbar [Thu, 7 May 2009 21:58:26 +0000 (21:58 +0000)]
Remove -fobjc-tight-layout, seems to work!

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

15 years agoAllow qualifiers on blocks. Radar 6441502
Mike Stump [Thu, 7 May 2009 21:56:17 +0000 (21:56 +0000)]
Allow qualifiers on blocks.  Radar 6441502

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

15 years agoMore attribute renaming:
Ted Kremenek [Thu, 7 May 2009 21:49:45 +0000 (21:49 +0000)]
More attribute renaming:
- Rename 'ns_returns_owned' -> 'ns_returns_retained'.
- Rename 'cf_returns_owned' -> 'cf_returns_retained'.

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

15 years agoa forward class declaration matching a typedef name of a class
Fariborz Jahanian [Thu, 7 May 2009 21:49:26 +0000 (21:49 +0000)]
a forward class declaration matching a typedef name of a class
refers to the underlying class.
This is radar 6859726. Steve, please read the radar for my rational.

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

15 years agoadd isFriendSpecified.
Anders Carlsson [Thu, 7 May 2009 19:41:51 +0000 (19:41 +0000)]
add isFriendSpecified.

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

15 years agoFix <rdar://problem/6848739>. When using -analyze, -Werror has no effect.
Ted Kremenek [Thu, 7 May 2009 19:02:53 +0000 (19:02 +0000)]
Fix <rdar://problem/6848739>.  When using -analyze, -Werror has no effect.

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

15 years agoTighten up relationals with blocks and ints. Radar 6441502
Mike Stump [Thu, 7 May 2009 18:43:07 +0000 (18:43 +0000)]
Tighten up relationals with blocks and ints.  Radar 6441502

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

15 years agoanalyzer: Add ProgramPoint 'PostLValue' just to distinguish (for
Ted Kremenek [Thu, 7 May 2009 18:27:16 +0000 (18:27 +0000)]
analyzer: Add ProgramPoint 'PostLValue' just to distinguish (for
analysis introspection) when we computed an lvalue.  This shouldn't
effect the current analysis results in any way.

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

15 years agoBig update to the C++ status table to reflect "recent"
Douglas Gregor [Thu, 7 May 2009 17:50:16 +0000 (17:50 +0000)]
Big update to the C++ status table to reflect "recent"
development. Still much more to write!

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

15 years agoFix a FIXME in new expression checking.
Sebastian Redl [Thu, 7 May 2009 16:14:23 +0000 (16:14 +0000)]
Fix a FIXME in new expression checking.

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

15 years agoDocument the dependent type equivalence test case's purpose.
Douglas Gregor [Thu, 7 May 2009 15:40:54 +0000 (15:40 +0000)]
Document the dependent type equivalence test case's purpose.

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

15 years agoTest a few more variants of dependent type names
Douglas Gregor [Thu, 7 May 2009 15:31:47 +0000 (15:31 +0000)]
Test a few more variants of dependent type names

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

15 years agoCompute the canonical template name when building a template
Douglas Gregor [Thu, 7 May 2009 06:49:52 +0000 (06:49 +0000)]
Compute the canonical template name when building a template
specialization type for a dependent template name.

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

15 years agoStart canonicalizing template names. This is not yet complete, but it
Douglas Gregor [Thu, 7 May 2009 06:41:52 +0000 (06:41 +0000)]
Start canonicalizing template names. This is not yet complete, but it
improves type identity with dependent types.

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

15 years agoAdd support for LLLi -> int128 in builtins.def
Chris Lattner [Thu, 7 May 2009 04:47:06 +0000 (04:47 +0000)]
Add support for LLLi -> int128 in builtins.def

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

15 years agoMake this test portable to non-x86 hosts, patch by Mark Cianciosa!
Chris Lattner [Thu, 7 May 2009 04:21:16 +0000 (04:21 +0000)]
Make this test portable to non-x86 hosts, patch by Mark Cianciosa!

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

15 years agoImprove semantic checking for blocks. Radar 6441502
Mike Stump [Thu, 7 May 2009 03:14:14 +0000 (03:14 +0000)]
Improve semantic checking for blocks.  Radar 6441502

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

15 years agoAdd preliminary support for enhancing null-pointer dereference diagnostics.
Ted Kremenek [Thu, 7 May 2009 00:45:33 +0000 (00:45 +0000)]
Add preliminary support for enhancing null-pointer dereference diagnostics.

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

15 years agoBug fix: Not all ConstraintManagers always return a null state when setting
Ted Kremenek [Thu, 7 May 2009 00:45:08 +0000 (00:45 +0000)]
Bug fix: Not all ConstraintManagers always return a null state when setting
isFeasible to false. This is something we may wish to do further validation on.

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

15 years agoBack out r70506 (exception spec in AST) again. We won't have exception specs until...
Sebastian Redl [Wed, 6 May 2009 23:27:55 +0000 (23:27 +0000)]
Back out r70506 (exception spec in AST) again. We won't have exception specs until we've had a lot more discussion.

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