Chris Lattner
6298b8c021
remove attribution from makefiles.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45412 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:02:25 +00:00
Chris Lattner
0bc735ffcf
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
2007-12-29 19:59:25 +00:00
Christopher Lamb
5c09a02a5d
Fix OCUVector case in struct layout code.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45396 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 05:10:55 +00:00
Christopher Lamb
22c940ee58
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
2007-12-29 05:02:41 +00:00
Christopher Lamb
d3ba3f44ad
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
2007-12-29 04:06:57 +00:00
Christopher Lamb
33fd5c124a
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
2007-12-28 23:43:03 +00:00
Chris Lattner
998568f24d
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
2007-12-28 05:38:24 +00:00
Chris Lattner
fae3f1f656
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
2007-12-28 05:31:15 +00:00
Chris Lattner
925e60d3fa
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
2007-12-28 05:29:59 +00:00
Chris Lattner
c063e43618
move file to proper place in project.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45379 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28 05:27:01 +00:00
Chris Lattner
d18b3299de
Add accessors + iterator interface.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45378 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28 05:25:02 +00:00
Chris Lattner
bfc7930db0
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
2007-12-28 00:38:23 +00:00
Chris Lattner
1e571444b9
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
2007-12-27 21:46:27 +00:00
Chris Lattner
1dc4304d65
alphabetize in project.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45373 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-27 20:59:50 +00:00
Chris Lattner
cda459ec79
use -emit-llvm-bc
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45372 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-27 20:35:58 +00:00
Chris Lattner
6d0747d6be
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
2007-12-27 20:31:56 +00:00
Chris Lattner
516bd467c2
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
2007-12-27 20:29:42 +00:00
Chris Lattner
cb53b361bc
- 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
2007-12-27 19:57:00 +00:00
Anders Carlsson
b5ce097bb7
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
2007-12-26 18:20:19 +00:00
Seo Sanghyeon
9bb947adc5
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
2007-12-26 05:21:37 +00:00
Christopher Lamb
4c92b43383
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
2007-12-24 23:49:33 +00:00
Christopher Lamb
396f9fee46
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
2007-12-24 20:59:36 +00:00
Christopher Lamb
8bd848f1e8
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
2007-12-24 20:56:07 +00:00
Christopher Lamb
2d6c065fa9
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
2007-12-24 03:23:55 +00:00
Seo Sanghyeon
fe947ad362
Implement -emit-llvm-bc option
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45339 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-24 01:52:34 +00:00
Seo Sanghyeon
ad6ebd6efc
String literal in aggregate expression
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45330 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23 03:11:58 +00:00
Chris Lattner
eb44eeeff2
remove use of alloca.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45329 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23 01:40:15 +00:00
Anton Korobeynikov
d0fa1092e8
Unbreak mingw build
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45328 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23 01:19:32 +00:00
Ted Kremenek
1cbb58f1e8
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
2007-12-22 01:43:37 +00:00
Fariborz Jahanian
dc5c01b219
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
2007-12-22 00:17:49 +00:00
Fariborz Jahanian
7b5e1b839e
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
2007-12-21 23:48:59 +00:00
Ted Kremenek
30f790afe1
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
2007-12-21 23:23:12 +00:00
Ted Kremenek
0b506a1142
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
2007-12-21 23:21:58 +00:00
Ted Kremenek
9db9bd9850
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
2007-12-21 22:57:10 +00:00
Ted Kremenek
5facce90d0
SimulVertex now subclasses FoldingSetNode.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45296 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 22:41:58 +00:00
Ted Kremenek
a3b8591209
Added Profile method to SimulVertex.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45295 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 22:40:41 +00:00
Fariborz Jahanian
4c71f1a58e
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
2007-12-21 22:22:33 +00:00
Ted Kremenek
6af1753620
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
2007-12-21 21:48:31 +00:00
Ted Kremenek
cf6e41baf2
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
2007-12-21 21:42:19 +00:00
Ted Kremenek
7bb371da74
Renamed file AnalysisVertex.h to SimulVertex.h
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45291 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 21:17:22 +00:00
Ted Kremenek
b3144968b6
Renamed class AnalysisVertex to SimulVertex
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45290 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 21:16:58 +00:00
Ted Kremenek
afe54333a7
Fixed successor order for CFG basic blocks when handling: x && y. The bug
...
is best explained by illustration:
[ B2 ]
1: x
T: [B2.1] && ...
Predecessors (1): B4
Successors (2): B3 B1
Block "B3" should be the block where we evaluate "y" when "x" evaluates to
true. Previously we had the successor list reversed. Now this behavior matches
with how we handle other conditional branches.
Thanks to Nuno Lopes for reporting this problem.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45288 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 19:49:00 +00:00
Devang Patel
3c40085b37
Convert opaque type when struct definition is seen.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45287 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 19:35:28 +00:00
Devang Patel
dd6ecdb68b
Keep track of llvm struct size while adding fields.
...
Update addPaddingFields() interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45284 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 18:43:53 +00:00
Fariborz Jahanian
b145e7dede
Patch to compare to objective-c static types where one or the other
...
(but not both) may be a protocol qualified static type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45283 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 17:34:43 +00:00
Fariborz Jahanian
88d752103b
Test case for my last patch.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45277 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 00:35:35 +00:00
Fariborz Jahanian
d0c89c4609
More objective-c type analysis. This time involving objective types
...
of conforming protocols (or not).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45276 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 00:33:59 +00:00
Ted Kremenek
eaac0b0d72
Added class "StateVariant", a template class which serves to wrap states that
...
are generated by transfer functions used by the path-sensitive dataflow solver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45273 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 00:04:19 +00:00
Ted Kremenek
2a11a5f13a
Added initial implementation of "AnalysisVertex", a class to represent a
...
location*state vertex in an intra-procedural, path-sensitive dataflow
supergraph.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45272 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 23:24:55 +00:00
Fariborz Jahanian
cfc8738b8a
Another test for objective-c type comparison.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45271 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 22:53:29 +00:00