Ted Kremenek
3cb81db1b2
Use trait-based profiling of SymbolRefs, avoiding calling getNumber() (which will soon be removed).
...
llvm-svn: 60577
2008-12-05 02:39:38 +00:00
Ted Kremenek
e2c86c30d0
Remove (unused) RegionExtent and subclasses. Extents are now represented easily using SVals.
...
llvm-svn: 60576
2008-12-05 02:36:00 +00:00
Ted Kremenek
d8242f19f7
Rename SymbolID to SymbolRef. This is a precursor to some overhauling of the representation of symbolic values.
...
llvm-svn: 60575
2008-12-05 02:27:51 +00:00
Zhongxing Xu
fbcf1e2623
Rename: FindContext -> FindDeclVisibleInContext.
...
llvm-svn: 60574
2008-12-05 01:57:57 +00:00
Fariborz Jahanian
521b3a363e
Patch for diagnosing type mismatch between
...
methods in class and its implementation.
This is work in progress.
llvm-svn: 60573
2008-12-05 01:35:25 +00:00
Ted Kremenek
8e942123cb
Remove SymbolDataContentsOf (unused).
...
llvm-svn: 60572
2008-12-05 01:31:31 +00:00
Ted Kremenek
d368de794a
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.
...
llvm-svn: 60570
2008-12-05 00:47:52 +00:00
Chris Lattner
5b4927048f
-std=c99 defaults blocks to off even on darwin, but -fblocks overrides
...
even it.
llvm-svn: 60568
2008-12-05 00:10:44 +00:00
Steve Naroff
22216db0ec
Finish up support for <rdar://problem/6213955> clang ObjC rewriter: rewriter doesn't appear to support @property and @synthesize.
...
llvm-svn: 60565
2008-12-04 23:50:32 +00:00
Chris Lattner
79413956d4
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.
llvm-svn: 60564
2008-12-04 23:50:19 +00:00
Chris Lattner
2ca529ce61
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.
llvm-svn: 60563
2008-12-04 23:20:07 +00:00
Fariborz Jahanian
5271058c75
Output better diagnostics for continuation class
...
property attribute mis-specification.
llvm-svn: 60562
2008-12-04 22:56:16 +00:00
Chris Lattner
c7c6dd4d97
replace useNeXTRuntimeAsDefault with a generic hook that allows targets
...
to specify their default language options.
llvm-svn: 60561
2008-12-04 22:54:33 +00:00
Ted Kremenek
1aed3ddffa
Remove unneeded assertion.
...
llvm-svn: 60559
2008-12-04 22:47:11 +00:00
Ted Kremenek
bf28bceb10
Remove unneeded assertion. We already know that FE->getName() is an absolute path.
...
llvm-svn: 60558
2008-12-04 22:36:44 +00:00
Sebastian Redl
33a3101d43
Code cleanup in new handling.
...
llvm-svn: 60557
2008-12-04 22:20:51 +00:00
Ted Kremenek
baedbf47f6
Use 'free' to release PerIDCache since it was allocated using calloc().
...
llvm-svn: 60556
2008-12-04 22:09:37 +00:00
Ted Kremenek
561370c23e
Add 'expected-warning' to make test case pass.
...
llvm-svn: 60548
2008-12-04 19:44:23 +00:00
Ted Kremenek
d58e74182e
Add another static analyzer test case involving attribute(nonnull).
...
llvm-svn: 60547
2008-12-04 19:39:12 +00:00
Ted Kremenek
7d71db77d2
Fix bug in attribute(nonnull) processing where not all of the parameter indices in nonnull(...) were actually processed.
...
llvm-svn: 60546
2008-12-04 19:38:33 +00:00
Steve Naroff
f8d556881e
Fix build breakage from my previous commit.
...
Will discuss with Chris...
llvm-svn: 60545
2008-12-04 19:10:03 +00:00
Ted Kremenek
3f0e5c88d9
Add another test case for attribute(nonnull) checking.
...
llvm-svn: 60544
2008-12-04 18:35:53 +00:00
Sebastian Redl
f84512a360
Fix some diagnostics and enhance test cases. Now tests member new and ambiguous overloads.
...
llvm-svn: 60542
2008-12-04 17:24:46 +00:00
Steve Naroff
4588d0f060
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 ".").
llvm-svn: 60540
2008-12-04 16:24:46 +00:00
Daniel Dunbar
2c4efe68ea
Mention an optimization opportunity pointed out by Chris.
...
llvm-svn: 60535
2008-12-04 09:05:45 +00:00
Ted Kremenek
677779ab36
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.
...
llvm-svn: 60523
2008-12-04 02:08:27 +00:00
Ted Kremenek
4a3f1efd25
Revise bogus comment I just committed.
...
llvm-svn: 60522
2008-12-04 02:07:20 +00:00
Ted Kremenek
4cef8c2d58
Add comment to test case for documentation.
...
llvm-svn: 60521
2008-12-04 02:06:27 +00:00
Ted Kremenek
8e8cc81aec
Update comment.
...
llvm-svn: 60520
2008-12-04 02:06:04 +00:00
Zhongxing Xu
96c0fa8b42
Add comments.
...
llvm-svn: 60516
2008-12-04 01:12:41 +00:00
Sebastian Redl
45c2f9d320
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.
...
llvm-svn: 60515
2008-12-04 00:10:55 +00:00
Sebastian Redl
ba3fdfcbff
Fix some type punning errors in SizeOfAlignOf and Typeid AST nodes. This should satisfy compilers and language lawyers alike.
...
llvm-svn: 60511
2008-12-03 23:17:54 +00:00
Ted Kremenek
5a6ef49e70
Added GDM query functions "contains" for the data types that support the "Contains" method.
...
llvm-svn: 60505
2008-12-03 20:49:14 +00:00
Ted Kremenek
217dc8de69
Added partial specialization of GRStatePartialTrait<T> with T = ImmutableSet<...>.
...
llvm-svn: 60504
2008-12-03 20:48:33 +00:00
Sebastian Redl
faf6808e7a
Overload resolution for the operator new function. Member version is still untested.
...
llvm-svn: 60503
2008-12-03 20:26:15 +00:00
Ted Kremenek
cd7cc1ec0b
Properly "include" abs_path.
...
llvm-svn: 60502
2008-12-03 19:50:37 +00:00
Ted Kremenek
6cd08e42e4
Use abs_path to resolve symbolic links and '..' in report table.
...
llvm-svn: 60493
2008-12-03 19:19:23 +00:00
Ted Kremenek
eda6c23984
Don't have special treatment from pruning the common suffices of files in /Developer, /usr, etc.
...
llvm-svn: 60491
2008-12-03 19:16:58 +00:00
Ted Kremenek
fff9f4aaaf
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.
llvm-svn: 60490
2008-12-03 19:06:30 +00:00
Ted Kremenek
f935cfe277
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>.
llvm-svn: 60489
2008-12-03 18:56:12 +00:00
Sebastian Redl
9c33e96813
Fix typo in index operator overloading.
...
llvm-svn: 60483
2008-12-03 16:32:40 +00:00
Anders Carlsson
6a113d9ddb
If a global var decl has an initializer, make sure to always set its linkage to external.
...
llvm-svn: 60462
2008-12-03 05:51:23 +00:00
Ted Kremenek
73a4d28758
PTH:
...
Use an array instead of a DenseMap to cache persistent IDs -> IdentifierInfo*. This leads to a 4% speedup at -fsyntax-only using PTH.
llvm-svn: 60452
2008-12-03 01:16:39 +00:00
Steve Naroff
f326f4056e
More support for rewriting property getter/setters.
...
llvm-svn: 60450
2008-12-03 00:56:33 +00:00
Ted Kremenek
e1fc020e65
Update Xcode project.
...
llvm-svn: 60448
2008-12-03 00:38:43 +00:00
Ted Kremenek
33eeabda61
- 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.
llvm-svn: 60447
2008-12-03 00:38:03 +00:00
Sebastian Redl
d6d55eeef5
Correct pretty printing of array new expressions.
...
llvm-svn: 60444
2008-12-02 22:08:59 +00:00
Ted Kremenek
d328da1b65
Update Xcode project.
...
llvm-svn: 60441
2008-12-02 20:16:22 +00:00
Ted Kremenek
da4d9dfbca
Add "-token-cache" option for using pretokenized cache files.
...
llvm-svn: 60440
2008-12-02 19:57:31 +00:00
Ted Kremenek
af058b5696
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.
llvm-svn: 60437
2008-12-02 19:46:31 +00:00