]> granicus.if.org Git - clang/log
clang
15 years agoFixed a comment.
Fariborz Jahanian [Fri, 5 Dec 2008 22:36:19 +0000 (22:36 +0000)]
Fixed a comment.

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

15 years agoThis test checks for duplicate implementation of the same
Fariborz Jahanian [Fri, 5 Dec 2008 22:32:48 +0000 (22:32 +0000)]
This test checks for duplicate implementation of the same
property. It also checks for duplicate use of the same ivar
in two different iproperty implementations. It also caught
an error for a test case used in CodeGen :).

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

15 years agoFixed a test case. Added a test case showing property setter's
Fariborz Jahanian [Fri, 5 Dec 2008 18:38:31 +0000 (18:38 +0000)]
Fixed a test case. Added a test case showing property setter's
type mismatch (related to my last patch).

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

15 years ago(instance/class) Method type checking between class and its implementation.
Fariborz Jahanian [Fri, 5 Dec 2008 18:18:52 +0000 (18:18 +0000)]
(instance/class) Method type checking between class and its implementation.
(instance/class) Method type checking between category and its implementation.
And a test case for all.

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

15 years agoRepresentation of template type parameters and non-type template
Douglas Gregor [Fri, 5 Dec 2008 18:15:24 +0000 (18:15 +0000)]
Representation of template type parameters and non-type template
parameters, with some semantic analysis:
  - Template parameters are introduced into template parameter scope
  - Complain about template parameter shadowing (except in Microsoft mode)

Note that we leak template parameter declarations like crazy, a
problem we'll remedy once we actually create proper declarations for
templates.

Next up: dependent types and value-dependent/type-dependent
expressions.

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

15 years agoFixed <rdar://problem/6213808> clang ObjC rewriter: @finally is not always executed
Steve Naroff [Fri, 5 Dec 2008 17:03:39 +0000 (17:03 +0000)]
Fixed <rdar://problem/6213808> clang ObjC rewriter: @finally is not always executed

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

15 years agoUse VerifyIntegerConstantExpression instead of isIntegerConstantExpr. Fixes PR2963
Anders Carlsson [Fri, 5 Dec 2008 16:33:57 +0000 (16:33 +0000)]
Use VerifyIntegerConstantExpression instead of isIntegerConstantExpr. Fixes PR2963

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

15 years agoThis wasn't such a good idea after all as it broke some tests.
Anders Carlsson [Fri, 5 Dec 2008 05:24:13 +0000 (05:24 +0000)]
This wasn't such a good idea after all as it broke some tests.

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

15 years agoHandle __builtin___CFStringMakeConstantString in Expr::Evaluate.
Anders Carlsson [Fri, 5 Dec 2008 05:18:05 +0000 (05:18 +0000)]
Handle __builtin___CFStringMakeConstantString in Expr::Evaluate.

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

15 years agoMake Sema::CheckForConstantInitializer use Expr::Evaluate. This fixes PR3130.
Anders Carlsson [Fri, 5 Dec 2008 05:09:56 +0000 (05:09 +0000)]
Make Sema::CheckForConstantInitializer use Expr::Evaluate. This fixes PR3130.

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

15 years agoChange the implementation of symbol_iterator to not use a union and rely on any detai...
Ted Kremenek [Fri, 5 Dec 2008 02:56:39 +0000 (02:56 +0000)]
Change the implementation of symbol_iterator to not use a union and rely on any details of SymbolRef's implementation.

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

15 years agoAdd SymbolRef::print() and have SymbolicRegion::print() use this method instead of...
Ted Kremenek [Fri, 5 Dec 2008 02:45:20 +0000 (02:45 +0000)]
Add SymbolRef::print() and have SymbolicRegion::print() use this method instead of calling SymbolRef::getNumber().

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

15 years agoUse trait-based profiling of SymbolRefs, avoiding calling getNumber() (which will...
Ted Kremenek [Fri, 5 Dec 2008 02:39:38 +0000 (02:39 +0000)]
Use trait-based profiling of SymbolRefs, avoiding calling getNumber() (which will soon be removed).

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

15 years agoRemove (unused) RegionExtent and subclasses. Extents are now represented easily...
Ted Kremenek [Fri, 5 Dec 2008 02:36:00 +0000 (02:36 +0000)]
Remove (unused) RegionExtent and subclasses.  Extents are now represented easily using SVals.

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

15 years agoRename SymbolID to SymbolRef. This is a precursor to some overhauling of the represe...
Ted Kremenek [Fri, 5 Dec 2008 02:27:51 +0000 (02:27 +0000)]
Rename SymbolID to SymbolRef.  This is a precursor to some overhauling of the representation of symbolic values.

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

15 years agoRename: FindContext -> FindDeclVisibleInContext.
Zhongxing Xu [Fri, 5 Dec 2008 01:57:57 +0000 (01:57 +0000)]
Rename: FindContext -> FindDeclVisibleInContext.

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

15 years agoPatch for diagnosing type mismatch between
Fariborz Jahanian [Fri, 5 Dec 2008 01:35:25 +0000 (01:35 +0000)]
Patch for diagnosing type mismatch between
methods in class and its implementation.
This is work in progress.

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

15 years agoRemove SymbolDataContentsOf (unused).
Ted Kremenek [Fri, 5 Dec 2008 01:31:31 +0000 (01:31 +0000)]
Remove SymbolDataContentsOf (unused).

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

15 years agoStoreManager::Retrieve and StoreManager::RemoveDeadBindings now take a GRState* argum...
Ted Kremenek [Fri, 5 Dec 2008 00:47:52 +0000 (00:47 +0000)]
StoreManager::Retrieve and StoreManager::RemoveDeadBindings now take a GRState* argument instead of a Store.  This allows them to use the GDM for storing other data.

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

15 years ago-std=c99 defaults blocks to off even on darwin, but -fblocks overrides
Chris Lattner [Fri, 5 Dec 2008 00:10:44 +0000 (00:10 +0000)]
-std=c99 defaults blocks to off even on darwin, but -fblocks overrides
even it.

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

15 years agoFinish up support for <rdar://problem/6213955> clang ObjC rewriter: rewriter doesn...
Steve Naroff [Thu, 4 Dec 2008 23:50:32 +0000 (23:50 +0000)]
Finish up support for <rdar://problem/6213955> clang ObjC rewriter: rewriter doesn't appear to support @property and @synthesize.

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

15 years agochange getCurFunctionDecl to skip through Block contexts to find
Chris Lattner [Thu, 4 Dec 2008 23:50:19 +0000 (23:50 +0000)]
change getCurFunctionDecl to skip through Block contexts to find
the containing block.  Introduce a new getCurFunctionOrMethodDecl
method to check to see if we're in a function or objc method.
Minor cleanups to other related places.  This fixes rdar://6405429.

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

15 years agoinstead of forcing blocks on by default, make them default to off, but let
Chris Lattner [Thu, 4 Dec 2008 23:20:07 +0000 (23:20 +0000)]
instead of forcing blocks on by default, make them default to off, but let
specific targets default them to on.  Default blocks to on on 10.6 and later.
Add a -fblocks option that allows the user to override the target's default.
Use -fblocks in the various testcases that use blocks.

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

15 years agoOutput better diagnostics for continuation class
Fariborz Jahanian [Thu, 4 Dec 2008 22:56:16 +0000 (22:56 +0000)]
Output better diagnostics for continuation class
property attribute mis-specification.

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

15 years agoreplace useNeXTRuntimeAsDefault with a generic hook that allows targets
Chris Lattner [Thu, 4 Dec 2008 22:54:33 +0000 (22:54 +0000)]
replace useNeXTRuntimeAsDefault with a generic hook that allows targets
to specify their default language options.

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

15 years agoRemove unneeded assertion.
Ted Kremenek [Thu, 4 Dec 2008 22:47:11 +0000 (22:47 +0000)]
Remove unneeded assertion.

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

15 years agoRemove unneeded assertion. We already know that FE->getName() is an absolute path.
Ted Kremenek [Thu, 4 Dec 2008 22:36:44 +0000 (22:36 +0000)]
Remove unneeded assertion.  We already know that FE->getName() is an absolute path.

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

15 years agoCode cleanup in new handling.
Sebastian Redl [Thu, 4 Dec 2008 22:20:51 +0000 (22:20 +0000)]
Code cleanup in new handling.

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

15 years agoUse 'free' to release PerIDCache since it was allocated using calloc().
Ted Kremenek [Thu, 4 Dec 2008 22:09:37 +0000 (22:09 +0000)]
Use 'free' to release PerIDCache since it was allocated using calloc().

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

15 years agoAdd 'expected-warning' to make test case pass.
Ted Kremenek [Thu, 4 Dec 2008 19:44:23 +0000 (19:44 +0000)]
Add 'expected-warning' to make test case pass.

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

15 years agoAdd another static analyzer test case involving attribute(nonnull).
Ted Kremenek [Thu, 4 Dec 2008 19:39:12 +0000 (19:39 +0000)]
Add another static analyzer test case involving attribute(nonnull).

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

15 years agoFix bug in attribute(nonnull) processing where not all of the parameter indices in...
Ted Kremenek [Thu, 4 Dec 2008 19:38:33 +0000 (19:38 +0000)]
Fix bug in attribute(nonnull) processing where not all of the parameter indices in nonnull(...) were actually processed.

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

15 years agoFix build breakage from my previous commit.
Steve Naroff [Thu, 4 Dec 2008 19:10:03 +0000 (19:10 +0000)]
Fix build breakage from my previous commit.

Will discuss with Chris...

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

15 years agoAdd another test case for attribute(nonnull) checking.
Ted Kremenek [Thu, 4 Dec 2008 18:35:53 +0000 (18:35 +0000)]
Add another test case for attribute(nonnull) checking.

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

15 years agoFix some diagnostics and enhance test cases. Now tests member new and ambiguous overl...
Sebastian Redl [Thu, 4 Dec 2008 17:24:46 +0000 (17:24 +0000)]
Fix some diagnostics and enhance test cases. Now tests member new and ambiguous overloads.

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

15 years agoSeveral things...
Steve Naroff [Thu, 4 Dec 2008 16:24:46 +0000 (16:24 +0000)]
Several things...

- Implement RewritePropertySetter(). While the routine is simple, there were some tricky changes to RewriteFunctionBodyOrGlobalInitializer(), the main rewriter loop. It also required some additional instance data to distinguish setters from getters, as well as some changes to RewritePropertyGetter().

- Implement FIXME: for pretty printing ObjCPropertyRefExpr's.

- Changed ObjCPropertyRefExpr::getSourceRange() to point to the end of the property name (not the beginning). Also made a minor name change from "Loc"->"IdLoc" (to make it clear the Loc does not point to the ".").

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

15 years agoMention an optimization opportunity pointed out by Chris.
Daniel Dunbar [Thu, 4 Dec 2008 09:05:45 +0000 (09:05 +0000)]
Mention an optimization opportunity pointed out by Chris.

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

15 years agoRevamp RegionStoreManager::RemoveDeadBindings. This method now does a complete mark...
Ted Kremenek [Thu, 4 Dec 2008 02:08:27 +0000 (02:08 +0000)]
Revamp RegionStoreManager::RemoveDeadBindings.  This method now does a complete mark-and-sweep of the store, removing dead regions and recording the set of live and dead symbols appropriately.

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

15 years agoRevise bogus comment I just committed.
Ted Kremenek [Thu, 4 Dec 2008 02:07:20 +0000 (02:07 +0000)]
Revise bogus comment I just committed.

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

15 years agoAdd comment to test case for documentation.
Ted Kremenek [Thu, 4 Dec 2008 02:06:27 +0000 (02:06 +0000)]
Add comment to test case for documentation.

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

15 years agoUpdate comment.
Ted Kremenek [Thu, 4 Dec 2008 02:06:04 +0000 (02:06 +0000)]
Update comment.

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

15 years agoAdd comments.
Zhongxing Xu [Thu, 4 Dec 2008 01:12:41 +0000 (01:12 +0000)]
Add comments.

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

15 years agoCorrect CodeGen assumption that LongTy == Int32Ty in a few places. This makes several...
Sebastian Redl [Thu, 4 Dec 2008 00:10:55 +0000 (00:10 +0000)]
Correct CodeGen assumption that LongTy == Int32Ty in a few places. This makes several CodeGenObjC tests pass on 64-bit by fixing assertions. This doesn't mean that the result is actually what the GNU runtime expects, though.

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

15 years agoFix some type punning errors in SizeOfAlignOf and Typeid AST nodes. This should satis...
Sebastian Redl [Wed, 3 Dec 2008 23:17:54 +0000 (23:17 +0000)]
Fix some type punning errors in SizeOfAlignOf and Typeid AST nodes. This should satisfy compilers and language lawyers alike.

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

15 years agoAdded GDM query functions "contains" for the data types that support the "Contains...
Ted Kremenek [Wed, 3 Dec 2008 20:49:14 +0000 (20:49 +0000)]
Added GDM query functions "contains" for the data types that support the "Contains" method.

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

15 years agoAdded partial specialization of GRStatePartialTrait<T> with T = ImmutableSet<...>.
Ted Kremenek [Wed, 3 Dec 2008 20:48:33 +0000 (20:48 +0000)]
Added partial specialization of GRStatePartialTrait<T> with T = ImmutableSet<...>.

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

15 years agoOverload resolution for the operator new function. Member version is still untested.
Sebastian Redl [Wed, 3 Dec 2008 20:26:15 +0000 (20:26 +0000)]
Overload resolution for the operator new function. Member version is still untested.

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

15 years agoProperly "include" abs_path.
Ted Kremenek [Wed, 3 Dec 2008 19:50:37 +0000 (19:50 +0000)]
Properly "include" abs_path.

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

15 years agoUse abs_path to resolve symbolic links and '..' in report table.
Ted Kremenek [Wed, 3 Dec 2008 19:19:23 +0000 (19:19 +0000)]
Use abs_path to resolve symbolic links and '..' in report table.

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

15 years agoDon't have special treatment from pruning the common suffices of files in /Developer...
Ted Kremenek [Wed, 3 Dec 2008 19:16:58 +0000 (19:16 +0000)]
Don't have special treatment from pruning the common suffices of files in /Developer, /usr, etc.

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

15 years agoBasicConstraintManager:
Ted Kremenek [Wed, 3 Dec 2008 19:06:30 +0000 (19:06 +0000)]
BasicConstraintManager:
- Fix nonsensical logic in AssumeSymGE. When comparing 'sym >= constant' and the
  constant is the maximum integer value, add the constraint that 'sym ==
  constant' when the path is deemed feasible.  All other cases are feasible.
- Improve AssumeSymGT. When comparing 'sym > constant' and constant is the
  maximum integer value we know the path is infeasible.
- Add test case for this enhancement to AssumeSymGT.

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

15 years agoBasicConstraintManager:
Ted Kremenek [Wed, 3 Dec 2008 18:56:12 +0000 (18:56 +0000)]
BasicConstraintManager:
- Fix nonsensical logic in AssumeSymLE. When comparing 'sym <= constant' and the
  constant is the minimum integer value, add the constraint that 'sym ==
  constant' when the path is deemed feasible.  All other cases are feasible.
- Improve AssumeSymLT to address <rdar://problem/6407949>.  When comparing
  'sym < constant' and constant is the minimum integer value we know the
  path is infeasible.
- Add test case for <rdar://problem/6407949>.

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

15 years agoFix typo in index operator overloading.
Sebastian Redl [Wed, 3 Dec 2008 16:32:40 +0000 (16:32 +0000)]
Fix typo in index operator overloading.

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

15 years agoIf a global var decl has an initializer, make sure to always set its linkage to external.
Anders Carlsson [Wed, 3 Dec 2008 05:51:23 +0000 (05:51 +0000)]
If a global var decl has an initializer, make sure to always set its linkage to external.

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

15 years agoPTH:
Ted Kremenek [Wed, 3 Dec 2008 01:16:39 +0000 (01:16 +0000)]
PTH:
Use an array instead of a DenseMap to cache persistent IDs -> IdentifierInfo*.  This leads to a 4% speedup at -fsyntax-only using PTH.

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

15 years agoMore support for rewriting property getter/setters.
Steve Naroff [Wed, 3 Dec 2008 00:56:33 +0000 (00:56 +0000)]
More support for rewriting property getter/setters.

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

15 years agoUpdate Xcode project.
Ted Kremenek [Wed, 3 Dec 2008 00:38:43 +0000 (00:38 +0000)]
Update Xcode project.

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

15 years ago- Remove PTHManager.cpp. Move all of its functions to PTHLexer.cpp since some of...
Ted Kremenek [Wed, 3 Dec 2008 00:38:03 +0000 (00:38 +0000)]
- Remove PTHManager.cpp.  Move all of its functions to PTHLexer.cpp since some of the internal methods are used by PTHLexer (their implementations are intertwined.)  This enables some important inlining opportunities at -O3.

- Don't construct an std::vector<Token> prior to feeding PTH tokens to the Preprocessor.  Stream them off the PTH file directly.

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

15 years agoCorrect pretty printing of array new expressions.
Sebastian Redl [Tue, 2 Dec 2008 22:08:59 +0000 (22:08 +0000)]
Correct pretty printing of array new expressions.

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

15 years agoUpdate Xcode project.
Ted Kremenek [Tue, 2 Dec 2008 20:16:22 +0000 (20:16 +0000)]
Update Xcode project.

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

15 years agoAdd "-token-cache" option for using pretokenized cache files.
Ted Kremenek [Tue, 2 Dec 2008 19:57:31 +0000 (19:57 +0000)]
Add "-token-cache" option for using pretokenized cache files.

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

15 years agoPreprocessor:
Ted Kremenek [Tue, 2 Dec 2008 19:46:31 +0000 (19:46 +0000)]
Preprocessor:
- Added method "setPTHManager" that will be called by the driver to install
  a PTHManager for the Preprocessor.
- Fixed some comments.
- Added EnterSourceFileWithPTH to mirror EnterSourceFileWithLexer.

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

15 years agoAdded PTHManager, a utility class that will be used by Preprocessor to lazily create...
Ted Kremenek [Tue, 2 Dec 2008 19:45:05 +0000 (19:45 +0000)]
Added PTHManager, a utility class that will be used by Preprocessor to lazily create PTHLexer objects for pre-tokenized files.

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

15 years agoPTH emission:
Ted Kremenek [Tue, 2 Dec 2008 19:44:08 +0000 (19:44 +0000)]
PTH emission:
- Output 32 bit integers using bit-shifting + write of individual bytes.
  This is motivated because we aren't guaranteed to load 32-bit ints of the mmaped PTH file at 4-byte offsets.
- Don't emit flags for IdentifierInfos.  These are lazily populated by the Preprocessor/Parser.
- Only write out tokens for files with absolute paths.  This is potentially temporary, but simplifies things for now.

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

15 years agoMore type-checking of setter/getter methods. This is still
Fariborz Jahanian [Tue, 2 Dec 2008 18:39:49 +0000 (18:39 +0000)]
More type-checking of setter/getter methods. This is still
work in prgress.

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

15 years agollvm-ld doesnt support '-g', so aovid passing that opt to it
Nuno Lopes [Tue, 2 Dec 2008 18:19:03 +0000 (18:19 +0000)]
llvm-ld doesnt support '-g', so aovid passing that opt to it

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

15 years agoAdd a couple FIXME's.
Steve Naroff [Tue, 2 Dec 2008 17:54:50 +0000 (17:54 +0000)]
Add a couple FIXME's.

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

15 years agoMake sure synthesized properties get inserted into the classes/categories meta data.
Steve Naroff [Tue, 2 Dec 2008 17:36:43 +0000 (17:36 +0000)]
Make sure synthesized properties get inserted into the classes/categories meta data.

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

15 years agoParsing new and delete is now complete.
Sebastian Redl [Tue, 2 Dec 2008 17:22:40 +0000 (17:22 +0000)]
Parsing new and delete is now complete.

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

15 years agoAdd better comments to ::new parsing. Thanks to Doug for the review.
Sebastian Redl [Tue, 2 Dec 2008 17:10:24 +0000 (17:10 +0000)]
Add better comments to ::new parsing. Thanks to Doug for the review.

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

15 years agoMake RegionStoreManager::InitializeArray safe against array sizes that don't have...
Sebastian Redl [Tue, 2 Dec 2008 16:47:35 +0000 (16:47 +0000)]
Make RegionStoreManager::InitializeArray safe against array sizes that don't have pointer width.
This may be the case on 64-bit systems. Whether that fact is a bug is a different question, but it's easy to cure the symptom.

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

15 years agoMake the parser handle ::new and ::delete correctly.
Sebastian Redl [Tue, 2 Dec 2008 16:35:44 +0000 (16:35 +0000)]
Make the parser handle ::new and ::delete correctly.

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

15 years agoint-arith-convert.c makes assumptions about integer sizes, so force a specific archit...
Sebastian Redl [Tue, 2 Dec 2008 16:34:01 +0000 (16:34 +0000)]
int-arith-convert.c makes assumptions about integer sizes, so force a specific architecture

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

15 years agoUpdate cmake build; patch by Csaba Hruska.
Eli Friedman [Tue, 2 Dec 2008 16:23:30 +0000 (16:23 +0000)]
Update cmake build; patch by Csaba Hruska.

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

15 years agoSimplify previous commit.
Steve Naroff [Tue, 2 Dec 2008 16:05:55 +0000 (16:05 +0000)]
Simplify previous commit.

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

15 years agoFix for PR3150: obvious copy-paste bug in
Eli Friedman [Tue, 2 Dec 2008 16:02:46 +0000 (16:02 +0000)]
Fix for PR3150: obvious copy-paste bug in
ScalarExprEmitter::VisitBinLOr.

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

15 years agoMore work to rewrite synthesize properties (<rdar://problem/6213955>)
Steve Naroff [Tue, 2 Dec 2008 15:48:25 +0000 (15:48 +0000)]
More work to rewrite synthesize properties (<rdar://problem/6213955>)

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

15 years agoHandle new by passing the Declaration to the Action, not a processed type.
Sebastian Redl [Tue, 2 Dec 2008 14:43:59 +0000 (14:43 +0000)]
Handle new by passing the Declaration to the Action, not a processed type.

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

15 years agoAdd FIXME.
Ted Kremenek [Tue, 2 Dec 2008 01:26:07 +0000 (01:26 +0000)]
Add FIXME.

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

15 years agoDisabling this code due to regression on test/CodeGen/bitfield.c. See
Eli Friedman [Tue, 2 Dec 2008 01:17:45 +0000 (01:17 +0000)]
Disabling this code due to regression on test/CodeGen/bitfield.c.  See
PR3152.

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

15 years agoA little more scaffolding for parsing templates:
Douglas Gregor [Tue, 2 Dec 2008 00:41:28 +0000 (00:41 +0000)]
A little more scaffolding for parsing templates:
  - Template parameter scope to hold the template parameters
  - Template parameter context for parsing declarators
  - Actions for template type parameters and non-type template
    parameters

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

15 years agoThis patch corrects problem in searching for a setter/getter method for
Fariborz Jahanian [Tue, 2 Dec 2008 00:19:12 +0000 (00:19 +0000)]
This patch corrects problem in searching for a setter/getter method for
a property. Previous scheme of seaching in interface's list of methods
would not work because this list is not yet constructed. This is in preparation
for doing semantic check on viability of setter/getter method declarations.

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

15 years agoBasic support for parsing templates, from Andrew Sutton
Douglas Gregor [Mon, 1 Dec 2008 23:54:00 +0000 (23:54 +0000)]
Basic support for parsing templates, from Andrew Sutton

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

15 years agoImprove error recovery when parsing a function definition fails
Douglas Gregor [Mon, 1 Dec 2008 23:03:32 +0000 (23:03 +0000)]
Improve error recovery when parsing a function definition fails

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

15 years agoInitialize storage class even if we got an erroneous mutable
Douglas Gregor [Mon, 1 Dec 2008 22:46:22 +0000 (22:46 +0000)]
Initialize storage class even if we got an erroneous mutable

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

15 years agoObjective-C keywords are not always identifiers. Some are also C++ keywords
Douglas Gregor [Mon, 1 Dec 2008 21:46:47 +0000 (21:46 +0000)]
Objective-C keywords are not always identifiers. Some are also C++ keywords

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

15 years agoFix RUN line
Douglas Gregor [Mon, 1 Dec 2008 21:17:52 +0000 (21:17 +0000)]
Fix RUN line

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

15 years ago-Add several ObjC types to Decl::getDeclKindName(), a useful debug hook.
Steve Naroff [Mon, 1 Dec 2008 20:33:01 +0000 (20:33 +0000)]
-Add several ObjC types to Decl::getDeclKindName(), a useful debug hook.
-Start adding support for rewriting @synthesize.

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

15 years agoTest blocks in C++ mode
Douglas Gregor [Mon, 1 Dec 2008 19:48:06 +0000 (19:48 +0000)]
Test blocks in C++ mode

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

15 years agoUse EmitInt, not Emit, to emit unsigned values
Douglas Gregor [Mon, 1 Dec 2008 19:45:16 +0000 (19:45 +0000)]
Use EmitInt, not Emit, to emit unsigned values

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

15 years agoAdd test case for __ASSEMBLER__ definition.
Daniel Dunbar [Mon, 1 Dec 2008 19:23:47 +0000 (19:23 +0000)]
Add test case for __ASSEMBLER__ definition.

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

15 years agoAdd LangOptions marker for assembler-with-cpp mode and use to define
Daniel Dunbar [Mon, 1 Dec 2008 18:55:22 +0000 (18:55 +0000)]
Add LangOptions marker for assembler-with-cpp mode and use to define
__ASSEMBLER__ properly. Patch from Roman Divacky (with minor
formatting changes). Thanks!

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

15 years agoEnable blocks in C++
Douglas Gregor [Mon, 1 Dec 2008 18:34:47 +0000 (18:34 +0000)]
Enable blocks in C++

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

15 years agoMake sure __null test runs in both 32- and 64-bit. Thanks Anders
Douglas Gregor [Mon, 1 Dec 2008 18:05:11 +0000 (18:05 +0000)]
Make sure __null test runs in both 32- and 64-bit. Thanks Anders

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

15 years agoParse the exception-specification throw(...), a Microsoft extension
Douglas Gregor [Mon, 1 Dec 2008 18:00:20 +0000 (18:00 +0000)]
Parse the exception-specification throw(...), a Microsoft extension

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

15 years agoAdd the test for __null
Douglas Gregor [Mon, 1 Dec 2008 17:31:21 +0000 (17:31 +0000)]
Add the test for __null

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

15 years agoDefine NULL to __null in C++, so that it's guaranteed to have the same size as a...
Douglas Gregor [Mon, 1 Dec 2008 17:20:57 +0000 (17:20 +0000)]
Define NULL to __null in C++, so that it's guaranteed to have the same size as a pointer

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

15 years agoGenerate the correct results for the comma expression. Fixes PR3123.
Anders Carlsson [Mon, 1 Dec 2008 06:44:05 +0000 (06:44 +0000)]
Generate the correct results for the comma expression. Fixes PR3123.

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

15 years agoRevert change that made isNullPointerConstant start emitting warnings. We don't want...
Anders Carlsson [Mon, 1 Dec 2008 06:28:23 +0000 (06:28 +0000)]
Revert change that made isNullPointerConstant start emitting warnings. We don't want that :)

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

15 years agoFix test. (0 && (a(),1)) is a valid I-C-E according to C99.
Anders Carlsson [Mon, 1 Dec 2008 06:27:38 +0000 (06:27 +0000)]
Fix test. (0 && (a(),1)) is a valid I-C-E according to C99.

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