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
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
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
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
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
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
Ted Kremenek
498b6210fc
Added PTHManager, a utility class that will be used by Preprocessor to lazily create PTHLexer objects for pre-tokenized files.
...
llvm-svn: 60436
2008-12-02 19:45:05 +00:00
Fariborz Jahanian
eae373ea32
More type-checking of setter/getter methods. This is still
...
work in prgress.
llvm-svn: 60430
2008-12-02 18:39:49 +00:00
Sebastian Redl
538787f571
Add better comments to ::new parsing. Thanks to Doug for the review.
...
llvm-svn: 60423
2008-12-02 17:10:24 +00:00
Sebastian Redl
6ef75e9ee8
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.
llvm-svn: 60422
2008-12-02 16:47:35 +00:00
Sebastian Redl
db36b9b962
Make the parser handle ::new and ::delete correctly.
...
llvm-svn: 60421
2008-12-02 16:35:44 +00:00
Eli Friedman
39bc53593d
Update cmake build; patch by Csaba Hruska.
...
llvm-svn: 60418
2008-12-02 16:23:30 +00:00
Eli Friedman
e918435f94
Fix for PR3150: obvious copy-paste bug in
...
ScalarExprEmitter::VisitBinLOr.
llvm-svn: 60415
2008-12-02 16:02:46 +00:00
Sebastian Redl
351bb78a10
Handle new by passing the Declaration to the Action, not a processed type.
...
llvm-svn: 60413
2008-12-02 14:43:59 +00:00
Ted Kremenek
817737a002
Add FIXME.
...
llvm-svn: 60390
2008-12-02 01:26:07 +00:00
Eli Friedman
f5d08c9ee4
Disabling this code due to regression on test/CodeGen/bitfield.c. See
...
PR3152.
llvm-svn: 60389
2008-12-02 01:17:45 +00:00
Douglas Gregor
f558618fa4
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
llvm-svn: 60387
2008-12-02 00:41:28 +00:00
Fariborz Jahanian
015a48d1db
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.
llvm-svn: 60386
2008-12-02 00:19:12 +00:00
Douglas Gregor
eb31f39558
Basic support for parsing templates, from Andrew Sutton
...
llvm-svn: 60384
2008-12-01 23:54:00 +00:00
Douglas Gregor
da747baa3c
Improve error recovery when parsing a function definition fails
...
llvm-svn: 60380
2008-12-01 23:03:32 +00:00
Douglas Gregor
b690cbb928
Initialize storage class even if we got an erroneous mutable
...
llvm-svn: 60377
2008-12-01 22:46:22 +00:00
Douglas Gregor
90abb6dead
Objective-C keywords are not always identifiers. Some are also C++ keywords
...
llvm-svn: 60373
2008-12-01 21:46:47 +00:00
Steve Naroff
e1908e393e
-Add several ObjC types to Decl::getDeclKindName(), a useful debug hook.
...
-Start adding support for rewriting @synthesize.
llvm-svn: 60368
2008-12-01 20:33:01 +00:00
Douglas Gregor
95c326d14a
Use EmitInt, not Emit, to emit unsigned values
...
llvm-svn: 60364
2008-12-01 19:45:16 +00:00
Daniel Dunbar
1f3d7849a8
Add LangOptions marker for assembler-with-cpp mode and use to define
...
__ASSEMBLER__ properly. Patch from Roman Divacky (with minor
formatting changes). Thanks!
llvm-svn: 60362
2008-12-01 18:55:22 +00:00
Douglas Gregor
356513d7d0
Parse the exception-specification throw(...), a Microsoft extension
...
llvm-svn: 60359
2008-12-01 18:00:20 +00:00
Douglas Gregor
f7ab50df29
Define NULL to __null in C++, so that it's guaranteed to have the same size as a pointer
...
llvm-svn: 60355
2008-12-01 17:20:57 +00:00
Anders Carlsson
5b3638b6e7
Generate the correct results for the comma expression. Fixes PR3123.
...
llvm-svn: 60334
2008-12-01 06:44:05 +00:00
Anders Carlsson
eade3ad1f1
Revert change that made isNullPointerConstant start emitting warnings. We don't want that :)
...
llvm-svn: 60333
2008-12-01 06:28:23 +00:00
Anders Carlsson
8628645e94
Change more code over to using the new Expr::Evaluate
...
llvm-svn: 60324
2008-12-01 02:46:24 +00:00
Anders Carlsson
38eef1de6c
Change more code over to using the new Expr::Evaluate
...
llvm-svn: 60323
2008-12-01 02:42:14 +00:00
Anders Carlsson
c9687907c5
Use the new Expr::Evaluate
...
llvm-svn: 60321
2008-12-01 02:31:41 +00:00
Anders Carlsson
e7c2ac4b54
Remove dead code.
...
llvm-svn: 60320
2008-12-01 02:25:52 +00:00
Anders Carlsson
1dbffc6e36
Add Sema::isNullPointerConstant which extwarns if necessary. Use it in Sema::CheckConditionalOperands.
...
llvm-svn: 60319
2008-12-01 02:17:22 +00:00
Anders Carlsson
4bb9113da4
Add a new variant of isNullConstantExpr that returns an EvalResult.
...
llvm-svn: 60318
2008-12-01 02:13:57 +00:00
Anders Carlsson
f7fba46331
Use VerifyIntegerConstantExpression for case values.
...
llvm-svn: 60317
2008-12-01 02:13:02 +00:00
Anders Carlsson
564730a857
Emit the correct diagnostic when a comma is in an ICE.
...
llvm-svn: 60316
2008-12-01 02:07:06 +00:00
Anders Carlsson
e54e8a1182
Add Sema::VerifyIntegerConstantExpression
...
llvm-svn: 60305
2008-11-30 19:50:32 +00:00
Anders Carlsson
b33d6c8611
Change the diagnostics that the evaluator reports to be of type NOTE.
...
llvm-svn: 60301
2008-11-30 18:37:00 +00:00
Anders Carlsson
5862001157
Replace the isEvaluated bool with a ShortCircuit int, making it easier to handle recursion
...
llvm-svn: 60300
2008-11-30 18:26:25 +00:00
Anders Carlsson
27b8c5c464
Pass the expression to the Error and Extension methods.
...
llvm-svn: 60299
2008-11-30 18:14:57 +00:00
Anders Carlsson
7b6f0af83f
Add a new variant of Evaluate and reimplement the old Evaluate in terms of the new.
...
llvm-svn: 60298
2008-11-30 16:58:53 +00:00