]> granicus.if.org Git - clang/log
clang
16 years agoMinor tweak to serialization of ObjcForCollectionStmt: the three owned pointers
Ted Kremenek [Mon, 7 Jan 2008 18:35:04 +0000 (18:35 +0000)]
Minor tweak to serialization of ObjcForCollectionStmt: the three owned pointers
are now emitted in a batch, which reduces the metadata overhead in the
serialized bitcode.

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

16 years agoLimit type of foreach's element and collection to be a pointer to
Fariborz Jahanian [Mon, 7 Jan 2008 18:14:04 +0000 (18:14 +0000)]
Limit type of foreach's element and collection to be a pointer to
objc object type.

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

16 years agoIssue diagnostics if more than one declaration in objectove-c's foreach-stmt header.
Fariborz Jahanian [Mon, 7 Jan 2008 17:52:35 +0000 (17:52 +0000)]
Issue diagnostics if more than one declaration in objectove-c's foreach-stmt header.

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

16 years agominor cleanup.
Chris Lattner [Mon, 7 Jan 2008 17:51:46 +0000 (17:51 +0000)]
minor cleanup.

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

16 years agoFix typo
Nate Begeman [Mon, 7 Jan 2008 04:01:26 +0000 (04:01 +0000)]
Fix typo

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

16 years agorearrange some code.
Chris Lattner [Sun, 6 Jan 2008 22:50:31 +0000 (22:50 +0000)]
rearrange some code.

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

16 years agosome simplifications/cleanups to ?: sema.
Chris Lattner [Sun, 6 Jan 2008 22:42:25 +0000 (22:42 +0000)]
some simplifications/cleanups to ?: sema.

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

16 years agoEmit warnings like "dereferencing void pointer" instead of trying to
Chris Lattner [Sun, 6 Jan 2008 22:21:46 +0000 (22:21 +0000)]
Emit warnings like "dereferencing void pointer" instead of trying to
pretty print the type name for void.

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

16 years agotwiks based on Chris's comment. No need to iterate thru a list of declarations
Fariborz Jahanian [Sat, 5 Jan 2008 01:40:08 +0000 (01:40 +0000)]
twiks based on Chris's comment. No need to iterate thru a list of declarations
in a foreach-statement which is illegal (but not yet caught) .

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

16 years agoMoved serialization code for ObjcForCollectionStmt to be in alphabetical order
Ted Kremenek [Sat, 5 Jan 2008 00:57:49 +0000 (00:57 +0000)]
Moved serialization code for ObjcForCollectionStmt to be in alphabetical order
with the rest of the Objective-C serialization code.

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

16 years agoMinor refactoring of foreach's semantics code per Chris's suggetion.
Fariborz Jahanian [Fri, 4 Jan 2008 23:59:09 +0000 (23:59 +0000)]
Minor refactoring of foreach's semantics code per Chris's suggetion.

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

16 years agounnest vector handling again.
Chris Lattner [Fri, 4 Jan 2008 23:32:24 +0000 (23:32 +0000)]
unnest vector handling again.

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

16 years agoAdded a comment, minor refactoring of foreach parsing code per Chris's suggestion.
Fariborz Jahanian [Fri, 4 Jan 2008 23:23:46 +0000 (23:23 +0000)]
Added a comment, minor refactoring of foreach parsing code per Chris's suggestion.

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

16 years agowe already test for exact type matches early, so we don't have to do
Chris Lattner [Fri, 4 Jan 2008 23:20:56 +0000 (23:20 +0000)]
we already test for exact type matches early, so we don't have to do
it explicitly for vectors.  This allows us to unnest some code.

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

16 years agosimplify some of this code by removing the else/if chain and by
Chris Lattner [Fri, 4 Jan 2008 23:18:45 +0000 (23:18 +0000)]
simplify some of this code by removing the else/if chain and by
stripping down to canonical types early.

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

16 years agoMinor changes as suggested by Chris L.
Fariborz Jahanian [Fri, 4 Jan 2008 23:04:08 +0000 (23:04 +0000)]
Minor changes as suggested by Chris L.

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

16 years agomove objc expr sema to its own file.
Chris Lattner [Fri, 4 Jan 2008 22:32:30 +0000 (22:32 +0000)]
move objc expr sema to its own file.

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

16 years agoFix PR1897, patch by Wilhansen Li
Chris Lattner [Fri, 4 Jan 2008 19:12:28 +0000 (19:12 +0000)]
Fix PR1897, patch by Wilhansen Li

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

16 years agoadd comments for the various AssignConvertType's, and split int->pointer from pointer...
Chris Lattner [Fri, 4 Jan 2008 18:22:42 +0000 (18:22 +0000)]
add comments for the various AssignConvertType's, and split int->pointer from pointer->int.

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

16 years agoMerge all the 'assignment' diagnostic code into one routine, decloning
Chris Lattner [Fri, 4 Jan 2008 18:04:52 +0000 (18:04 +0000)]
Merge all the 'assignment' diagnostic code into one routine, decloning
it from several places.  This merges the diagnostics, making them more
uniform and fewer in number. This also simplifies and cleans up the code.

Some highlights:
1. This removes a bunch of very-similar diagnostics.
2. This renames AssignmentCheckResult -> AssignConvertType
3. This merges PointerFromInt + IntFromPointer which were always treated the same.
4. This updates a bunch of test cases that have minor changes to the produced diagnostics.

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

16 years agofix a build problem where NULL isn't implicitly defined by the headers this file...
Chris Lattner [Fri, 4 Jan 2008 16:27:03 +0000 (16:27 +0000)]
fix a build problem where NULL isn't implicitly defined by the headers this file includes.

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

16 years agoPatch to add semantics check for ObjC2's foreacn statement.
Fariborz Jahanian [Fri, 4 Jan 2008 00:27:46 +0000 (00:27 +0000)]
Patch to add semantics check for ObjC2's foreacn statement.

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

16 years agogeneralize some of the conversion warnings.
Chris Lattner [Thu, 3 Jan 2008 23:38:43 +0000 (23:38 +0000)]
generalize some of the conversion warnings.

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

16 years agoupdate for changes in diagnostic strings.
Chris Lattner [Thu, 3 Jan 2008 23:36:08 +0000 (23:36 +0000)]
update for changes in diagnostic strings.

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

16 years agoregroup assignment-related diagnostics, fix a mistake in one.
Chris Lattner [Thu, 3 Jan 2008 23:13:36 +0000 (23:13 +0000)]
regroup assignment-related diagnostics, fix a mistake in one.

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

16 years agogive better diagnostics for converting between function pointer and void*.
Chris Lattner [Thu, 3 Jan 2008 22:56:36 +0000 (22:56 +0000)]
give better diagnostics for converting between function pointer and void*.

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

16 years agorenamed class "GRCP" (Graph Reachabilty Constant Propagation) to
Ted Kremenek [Thu, 3 Jan 2008 22:46:25 +0000 (22:46 +0000)]
renamed class "GRCP" (Graph Reachabilty Constant Propagation) to
"GREngine" (Graph Reachability Engine).  The idea is to provide a separation
of concerns between the constant prop. details and the core analysis engine.

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

16 years agoImplemented End-Of-Path processing.
Ted Kremenek [Thu, 3 Jan 2008 22:29:38 +0000 (22:29 +0000)]
Implemented End-Of-Path processing.

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

16 years agoInitial checking of GRConstantPropagation.cpp, which implements a constant
Ted Kremenek [Thu, 3 Jan 2008 22:12:28 +0000 (22:12 +0000)]
Initial checking of GRConstantPropagation.cpp, which implements a constant
propagation analysis via graph reachability. This analysis (which is incomplete)
will be the basis for later developments on the core engine for path-sensitive
analysis analysis.

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

16 years agoFixed misuse of pointer within SimulVertex::addPredecessor()
Ted Kremenek [Thu, 3 Jan 2008 22:09:27 +0000 (22:09 +0000)]
Fixed misuse of pointer within SimulVertex::addPredecessor()

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

16 years agoSimulGraph::getVertex() now also returns a bool indicating if the returned
Ted Kremenek [Thu, 3 Jan 2008 22:08:52 +0000 (22:08 +0000)]
SimulGraph::getVertex() now also returns a bool indicating if the returned
vertex was freshly created.

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

16 years agoConstified methods front() and back() in CFGBlock.
Ted Kremenek [Thu, 3 Jan 2008 22:07:58 +0000 (22:07 +0000)]
Constified methods front() and back() in CFGBlock.

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

16 years agoDe-constified the pointers returned by the Dst() and Src() methods of
Ted Kremenek [Thu, 3 Jan 2008 22:07:01 +0000 (22:07 +0000)]
De-constified the pointers returned by the Dst() and Src() methods of
the various ProgramEdge classes.

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

16 years agoCouple more uninitialized before use warning elimination.
Fariborz Jahanian [Thu, 3 Jan 2008 20:04:58 +0000 (20:04 +0000)]
Couple more uninitialized before use warning elimination.

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

16 years agoRemove cause of misc. "variable might be used uninitialized in this function" warnings.
Fariborz Jahanian [Thu, 3 Jan 2008 20:01:35 +0000 (20:01 +0000)]
Remove cause of misc. "variable might be used uninitialized in this function" warnings.

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

16 years agoFixed a bug reported by Chris, involving assiging 0 to a qualified object type.
Fariborz Jahanian [Thu, 3 Jan 2008 18:46:52 +0000 (18:46 +0000)]
Fixed a bug reported by Chris, involving assiging 0 to a qualified object type.

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

16 years agosimplify the lexer a bit, pulling stuff out of the default case.
Chris Lattner [Thu, 3 Jan 2008 17:58:54 +0000 (17:58 +0000)]
simplify the lexer a bit, pulling stuff out of the default case.

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

16 years agoPatch to parse/build AST ObjC2's foreach statement.
Fariborz Jahanian [Thu, 3 Jan 2008 17:55:25 +0000 (17:55 +0000)]
Patch to parse/build AST ObjC2's foreach statement.

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

16 years agofix long lines.
Chris Lattner [Thu, 3 Jan 2008 07:05:49 +0000 (07:05 +0000)]
fix long lines.

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

16 years agoFix a crash reported by Seo Sanghyeon.
Chris Lattner [Thu, 3 Jan 2008 06:36:51 +0000 (06:36 +0000)]
Fix a crash reported by Seo Sanghyeon.

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

16 years agoNew declarations/defs for Objc2's foreach-statement. This is work in progress.
Fariborz Jahanian [Wed, 2 Jan 2008 22:54:34 +0000 (22:54 +0000)]
New declarations/defs for Objc2's foreach-statement. This is work in progress.

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

16 years agoWhen promoting array to pointer for argument, don't lose type qualifiers.
Chris Lattner [Wed, 2 Jan 2008 22:50:48 +0000 (22:50 +0000)]
When promoting array to pointer for argument, don't lose type qualifiers.

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

16 years agoSimulVertex: Inverted argument order when calling the Profile method of StateTy.
Ted Kremenek [Wed, 2 Jan 2008 22:20:20 +0000 (22:20 +0000)]
SimulVertex: Inverted argument order when calling the Profile method of StateTy.

SimulGraph: Inverted argument order when calling the Profile method of VertexTy
  (plus minor cleanups)

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

16 years agoFix PR1895: a crash on an ugly gcc extension.
Chris Lattner [Wed, 2 Jan 2008 21:54:09 +0000 (21:54 +0000)]
Fix PR1895: a crash on an ugly gcc extension.

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

16 years agoCompute the proper sourcerange for an CompoundLiteralExpr.
Chris Lattner [Wed, 2 Jan 2008 21:46:24 +0000 (21:46 +0000)]
Compute the proper sourcerange for an CompoundLiteralExpr.

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

16 years agoConverted state reference within SimulVertex from StateTy* to StateTy.
Ted Kremenek [Wed, 2 Jan 2008 21:31:13 +0000 (21:31 +0000)]
Converted state reference within SimulVertex from StateTy* to StateTy.
This is more flexible.

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

16 years agoRefactor the decl printer, patch by Mike Stump!
Chris Lattner [Wed, 2 Jan 2008 21:04:16 +0000 (21:04 +0000)]
Refactor the decl printer, patch by Mike Stump!

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

16 years agoIssue diagnostic when objective-c's @interface is preceeded by a type specifier.
Fariborz Jahanian [Wed, 2 Jan 2008 19:17:38 +0000 (19:17 +0000)]
Issue diagnostic when objective-c's @interface is preceeded by a type specifier.

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

16 years agoAdded/fixed some comments.
Ted Kremenek [Wed, 2 Jan 2008 18:31:49 +0000 (18:31 +0000)]
Added/fixed some comments.

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

16 years agoPrevent crash on incorrect objc messaging expression.
Fariborz Jahanian [Wed, 2 Jan 2008 18:09:46 +0000 (18:09 +0000)]
Prevent crash on incorrect objc messaging expression.

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

16 years agoSprinkled 'typename' and fixed a few typos and type declaration errors to
Ted Kremenek [Wed, 2 Jan 2008 17:45:00 +0000 (17:45 +0000)]
Sprinkled 'typename' and fixed a few typos and type declaration errors to
make these headers compile.

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

16 years agoAdded fixme.
Ted Kremenek [Wed, 2 Jan 2008 17:05:47 +0000 (17:05 +0000)]
Added fixme.

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

16 years agoAllocate vertices using a BumpPtrAllocator.
Ted Kremenek [Wed, 2 Jan 2008 17:00:32 +0000 (17:00 +0000)]
Allocate vertices using a BumpPtrAllocator.

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

16 years agoAllow implicit casts during arithmetic for OCUVector operations
Nate Begeman [Sun, 30 Dec 2007 02:59:45 +0000 (02:59 +0000)]
Allow implicit casts during arithmetic for OCUVector operations
Add codegen support and test for said casts.

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

16 years agoAllow splat casts for OCU vector assignments & add some comments.
Nate Begeman [Sun, 30 Dec 2007 01:45:55 +0000 (01:45 +0000)]
Allow splat casts for OCU vector assignments & add some comments.

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

16 years agoRename stats to print-stats to avoid conflicting with llvm's
Nate Begeman [Sun, 30 Dec 2007 01:38:50 +0000 (01:38 +0000)]
Rename stats to print-stats to avoid conflicting with llvm's
stats statistic when clang is built as a dylib.

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

16 years agoAllow codegen of vector fdiv
Nate Begeman [Sun, 30 Dec 2007 01:28:16 +0000 (01:28 +0000)]
Allow codegen of vector fdiv

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

16 years agoimplement codegen support for most unary operators when
Chris Lattner [Sat, 29 Dec 2007 23:43:37 +0000 (23:43 +0000)]
implement codegen support for most unary operators when
initializing a global.  This handles important cases like:
float foo3 = -0.01f;

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

16 years agoremove attributions from .def files.
Chris Lattner [Sat, 29 Dec 2007 20:03:32 +0000 (20:03 +0000)]
remove attributions from .def files.

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

16 years agoremove attribution from makefiles.
Chris Lattner [Sat, 29 Dec 2007 20:02:25 +0000 (20:02 +0000)]
remove attribution from makefiles.

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

16 years agoDon't attribute in file headers anymore. See llvmdev for the
Chris Lattner [Sat, 29 Dec 2007 19:59:25 +0000 (19:59 +0000)]
Don't attribute in file headers anymore.  See llvmdev for the
discussion of this change.

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

16 years agoFix OCUVector case in struct layout code.
Christopher Lamb [Sat, 29 Dec 2007 05:10:55 +0000 (05:10 +0000)]
Fix OCUVector case in struct layout code.

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

16 years agoEnable CodeGen for member expressions based on call expressions returning aggregate...
Christopher Lamb [Sat, 29 Dec 2007 05:02:41 +0000 (05:02 +0000)]
Enable CodeGen for member expressions based on call expressions returning aggregate types. This enables expressions like 'foo().member.submember'.

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

16 years agoMake MemberExpr code safe w.r.t. address spaces.
Christopher Lamb [Sat, 29 Dec 2007 04:06:57 +0000 (04:06 +0000)]
Make MemberExpr code safe w.r.t. address spaces.

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

16 years agoFix an error in the base/idx accessors for ArraySubscriptExpr's that crops up with...
Christopher Lamb [Fri, 28 Dec 2007 23:43:03 +0000 (23:43 +0000)]
Fix an error in the base/idx accessors for ArraySubscriptExpr's that crops up with vector element access.

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

16 years agovarious cleanups. Use IgnoreParenCasts instead of inlined versions.
Chris Lattner [Fri, 28 Dec 2007 05:38:24 +0000 (05:38 +0000)]
various cleanups.  Use IgnoreParenCasts instead of inlined versions.

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

16 years agounindent cases in a switch stmt, no functionality change.
Chris Lattner [Fri, 28 Dec 2007 05:31:15 +0000 (05:31 +0000)]
unindent cases in a switch stmt, no functionality change.

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

16 years agoChange Sema::ActOnCallExpr to construct the CallExpr early and put it into
Chris Lattner [Fri, 28 Dec 2007 05:29:59 +0000 (05:29 +0000)]
Change Sema::ActOnCallExpr to construct the CallExpr early and put it into
and OwningPtr instead of constructing only after all of sema is done.  This
has a couple of effects:
1. it fixes memory leaks from all the error cases in sema
2. it simplifies the code significantly.

The cost of this is that the error case now new's and delete's an expr where
it did not before, but we don't care about the perf of the error case.

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

16 years agomove file to proper place in project.
Chris Lattner [Fri, 28 Dec 2007 05:27:01 +0000 (05:27 +0000)]
move file to proper place in project.

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

16 years agoAdd accessors + iterator interface.
Chris Lattner [Fri, 28 Dec 2007 05:25:02 +0000 (05:25 +0000)]
Add accessors + iterator interface.

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

16 years agoFrom Lucas Newman:
Chris Lattner [Fri, 28 Dec 2007 00:38:23 +0000 (00:38 +0000)]
From Lucas Newman:
"Here's a tiny patch that lets the clang Xcode project build in any
location, so llvm doesn't have to be checked out in your home folder."

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

16 years agoadd a file I forgot to svn add.
Chris Lattner [Thu, 27 Dec 2007 21:46:27 +0000 (21:46 +0000)]
add a file I forgot to svn add.

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

16 years agoalphabetize in project.
Chris Lattner [Thu, 27 Dec 2007 20:59:50 +0000 (20:59 +0000)]
alphabetize in project.

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

16 years agouse -emit-llvm-bc
Chris Lattner [Thu, 27 Dec 2007 20:35:58 +0000 (20:35 +0000)]
use -emit-llvm-bc

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

16 years agono need to verify this, no errors/warnings are expected.
Chris Lattner [Thu, 27 Dec 2007 20:31:56 +0000 (20:31 +0000)]
no need to verify this, no errors/warnings are expected.

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

16 years agoFix a crash on a top-level objc string, patch by Nico Weber
Chris Lattner [Thu, 27 Dec 2007 20:29:42 +0000 (20:29 +0000)]
Fix a crash on a top-level objc string, patch by Nico Weber

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

16 years ago - Use Tok.isObjCAtKeyword instead of Tok.getIdentifierInfo()->getObjCKeywordID().
Chris Lattner [Thu, 27 Dec 2007 19:57:00 +0000 (19:57 +0000)]
 - Use Tok.isObjCAtKeyword instead of Tok.getIdentifierInfo()->getObjCKeywordID().
   The later fails if the token is not an identifier.
 - Replace tabs with spaces.
 - Various other cleanups.

Patch by Nico Weber!

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

16 years agoNo need to do work that the folding builder does for us.
Anders Carlsson [Wed, 26 Dec 2007 18:20:19 +0000 (18:20 +0000)]
No need to do work that the folding builder does for us.

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

16 years agoRemove broken assert from CodeGen. Better check is done in Sema.
Seo Sanghyeon [Wed, 26 Dec 2007 05:21:37 +0000 (05:21 +0000)]
Remove broken assert from CodeGen. Better check is done in Sema.

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

16 years agoMake output files binary mode for -emit-llvm-bc
Christopher Lamb [Mon, 24 Dec 2007 23:49:33 +0000 (23:49 +0000)]
Make output files binary mode for -emit-llvm-bc

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

16 years agoAlmost the best possible handling of stdin/stdout for llvm-emit-bc!
Christopher Lamb [Mon, 24 Dec 2007 20:59:36 +0000 (20:59 +0000)]
Almost the best possible handling of stdin/stdout for llvm-emit-bc!

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

16 years agoBetter handing of stdin/stdout for -emit-llvm-bc
Christopher Lamb [Mon, 24 Dec 2007 20:56:07 +0000 (20:56 +0000)]
Better handing of stdin/stdout for -emit-llvm-bc

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

16 years agoAllow bitcode output to be redirected to stdout.
Christopher Lamb [Mon, 24 Dec 2007 03:23:55 +0000 (03:23 +0000)]
Allow bitcode output to be redirected to stdout.

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

16 years agoImplement -emit-llvm-bc option
Seo Sanghyeon [Mon, 24 Dec 2007 01:52:34 +0000 (01:52 +0000)]
Implement -emit-llvm-bc option

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

16 years agoString literal in aggregate expression
Seo Sanghyeon [Sun, 23 Dec 2007 03:11:58 +0000 (03:11 +0000)]
String literal in aggregate expression

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

16 years agoremove use of alloca.
Chris Lattner [Sun, 23 Dec 2007 01:40:15 +0000 (01:40 +0000)]
remove use of alloca.

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

16 years agoUnbreak mingw build
Anton Korobeynikov [Sun, 23 Dec 2007 01:19:32 +0000 (01:19 +0000)]
Unbreak mingw build

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

16 years agoAdded (incomplete) implementation of SimulEngine, a worklist-based dataflow
Ted Kremenek [Sat, 22 Dec 2007 01:43:37 +0000 (01:43 +0000)]
Added (incomplete) implementation of SimulEngine, a worklist-based dataflow
solver for path-sensitive, intra-procedural analysis.

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

16 years agoAnother test case, testing a variety of objective-c type comparisons.
Fariborz Jahanian [Sat, 22 Dec 2007 00:17:49 +0000 (00:17 +0000)]
Another test case, testing a variety of objective-c type comparisons.

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

16 years agoAnother test for objective-c's type comparison.
Fariborz Jahanian [Fri, 21 Dec 2007 23:48:59 +0000 (23:48 +0000)]
Another test for objective-c's type comparison.

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

16 years agoConverted Loc back to being of type ProgramEdge. Ultimately I believe we want
Ted Kremenek [Fri, 21 Dec 2007 23:23:12 +0000 (23:23 +0000)]
Converted Loc back to being of type ProgramEdge. Ultimately I believe we want
the ability to refer to the vertex set for all the vertices associated with an
edge. This will allow some nice queries over the graph, and (hopefully) will
reduce the memory footprint of SimulVertex.

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

16 years agoAdded preliminary implementation of SimulGraph, which represents the
Ted Kremenek [Fri, 21 Dec 2007 23:21:58 +0000 (23:21 +0000)]
Added preliminary implementation of SimulGraph, which represents the
intra-procedural supergraph of a path-sensitive dataflow analysis.

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

16 years agoChanged "Location" from "ProgramEdge" to "ProgramEdge&" (slightly more svelt
Ted Kremenek [Fri, 21 Dec 2007 22:57:10 +0000 (22:57 +0000)]
Changed "Location" from "ProgramEdge" to "ProgramEdge&" (slightly more svelt
memory representation).

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

16 years agoSimulVertex now subclasses FoldingSetNode.
Ted Kremenek [Fri, 21 Dec 2007 22:41:58 +0000 (22:41 +0000)]
SimulVertex now subclasses FoldingSetNode.

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

16 years agoAdded Profile method to SimulVertex.
Ted Kremenek [Fri, 21 Dec 2007 22:40:41 +0000 (22:40 +0000)]
Added Profile method to SimulVertex.

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

16 years agoThis patch implements some of the more obscure type-checking involving
Fariborz Jahanian [Fri, 21 Dec 2007 22:22:33 +0000 (22:22 +0000)]
This patch implements some of the more obscure type-checking involving
'id' quallified with protocols and static types which have categories and
inheritance which implement these protocols.

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

16 years agoUpdated Xcode project to be in sync with recent changes in file locations
Ted Kremenek [Fri, 21 Dec 2007 21:48:31 +0000 (21:48 +0000)]
Updated Xcode project to be in sync with recent changes in file locations
introduced in r45292 (http://llvm.org/viewvc/llvm-project?rev=45292&view=rev)

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

16 years agoDirectory restructing of Analysis files.
Ted Kremenek [Fri, 21 Dec 2007 21:42:19 +0000 (21:42 +0000)]
Directory restructing of Analysis files.

Created include/clang/Analysis/Analyses directory.
  - Moved LiveVariables.h and UninitializedValues.h into this dir.

Moved ExprDeclBitVector.h into Analysis/Support.

Updated all clients who use these headers to reflect the new paths.

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

16 years agoRenamed file AnalysisVertex.h to SimulVertex.h
Ted Kremenek [Fri, 21 Dec 2007 21:17:22 +0000 (21:17 +0000)]
Renamed file AnalysisVertex.h to SimulVertex.h

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

16 years agoRenamed class AnalysisVertex to SimulVertex
Ted Kremenek [Fri, 21 Dec 2007 21:16:58 +0000 (21:16 +0000)]
Renamed class AnalysisVertex to SimulVertex

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