Chris Lattner
0e77ba0bf7
Add create methods for ObjCIvarDecl and ObjCInterfaceDecl
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48408 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 01:15:50 +00:00
Chris Lattner
58cce3b0dc
Make the parameter count of ObjCMethodDecl unsigned, you
...
can't have negative arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48407 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 01:07:14 +00:00
Chris Lattner
b06fa3b869
remove some dead arguments to ObjCMethodDecl.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48406 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 00:58:16 +00:00
Chris Lattner
6c4ae5de0c
Give ObjCMethodDecl a Create method.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48405 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 00:49:28 +00:00
Chris Lattner
1e03a561f4
Split objc decl implementation out into DeclObjC.cpp
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48404 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 00:19:01 +00:00
Chris Lattner
8e25d86818
switch the rest of the C decl classes to do their
...
allocation through ASTContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48403 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 00:16:02 +00:00
Chris Lattner
bda0b626e7
Make a major restructuring of the clang tree: introduce a top-level
...
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 23:59:48 +00:00
Chris Lattner
fbdeba1c53
Make a ctor protected
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48401 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 23:04:32 +00:00
Ted Kremenek
4454006bce
Fixed 80 col. violations.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48400 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 22:11:54 +00:00
Ted Kremenek
8b65de4a66
Disable creation of "ContentsOf" symbols. It was fundamentally broken on many
...
levels; eventually we will need a plug-in model (similar to GRTransferFuncs) to
represent symbolic memory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48399 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 22:07:05 +00:00
Chris Lattner
c63e660882
move the ASTContext argument to be first in the argument list of
...
all Create methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48398 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 21:32:50 +00:00
Chris Lattner
a98e58ddb4
Switch over functiondecl. This makes it obvious that the ASTContext
...
argument to Create should be first, not last.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48397 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 21:24:04 +00:00
Chris Lattner
9e151e1547
switch the VarDecl allocation model to go through ASTContext.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48396 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 21:10:16 +00:00
Gabor Greif
8fb64e8d7d
implement a bit of feedback: print dots
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48394 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 08:11:35 +00:00
Ted Kremenek
d9d1cbfe72
Added initialization to ErrorDiag to silence gcc's warning of the variable
...
potentially being used uninitialized (which it cannot be).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48393 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 07:58:36 +00:00
Ted Kremenek
2677ea871a
Small bug fix in CFG construction: the active block for LabelStmts comes
...
from "Block", not the CFGBlock* returned from visiting its subexpression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48392 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 07:45:02 +00:00
Gabor Greif
021e970d77
First draft of a parallelized test methodology. Improvements soon.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48391 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 07:26:41 +00:00
Chris Lattner
6c2b6eb8d8
start switching decls over to using an allocator controlled by ASTContext.
...
Right now only some ctors are switched over. I need to switch them all
over so I can change the dtor over.
This lets us experiment with region allocation and other things in the
future.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48390 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 06:12:44 +00:00
Chris Lattner
d3b9065ec7
various minor cleanups.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48389 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 05:43:15 +00:00
Ted Kremenek
3b4a8ef9e5
Handle StmtExprs whose last contained statement is not an expression.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48388 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 03:27:30 +00:00
Ted Kremenek
897781ac17
Compute alignment in bytes, not bits.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48387 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 03:13:55 +00:00
Ted Kremenek
87e8034faf
Implement transfer function logic for alignof operator (types).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48386 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 03:13:20 +00:00
Ted Kremenek
5139c78fe2
Added transfer function support in GRExprEngine for __extension__.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48385 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 03:05:30 +00:00
Steve Naroff
3652c2d8df
Link against the correct ObjC string class (__CFConstantStringClassReference) and fix length computation (removing a FIXME).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48384 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 01:36:04 +00:00
Steve Naroff
d82a9ab454
Remove ObjC rewriter dependency on GCC's __builtin___CFStringMakeConstantString.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48383 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 00:55:56 +00:00
Ted Kremenek
76fdbde6a8
"panic" has 5 letters, not 4. Bug pointed out by Nuno Lopes!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48377 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 23:25:49 +00:00
Ted Kremenek
636e6ba3b6
Hack to hardwire in some panic functions that are not marked noreturn.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48374 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 21:58:42 +00:00
Ted Kremenek
1b9df4c307
Emit warnings for undefined control-flow.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48368 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 18:14:50 +00:00
Nate Begeman
c8e89a8ce5
Correctly error on arrays with automatic storage full of objects with
...
non-default address space, and fix comment.
Add a test for this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48366 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 18:07:10 +00:00
Ted Kremenek
63bbe5312c
Path-sensitive analyses no longer take a FunctionDecl, but any Decl representing
...
a block of "code".
Patched various ASTConsumers (such as ASTDumper) to have more support for
processing ObjCMethodDecl. CFGVisitor now builds CFGs for ObjCMethodDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48363 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 17:31:00 +00:00
Chris Lattner
6d39760673
add initial support for generating an llvm.globalctors list. Patch by David Chisnall
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48362 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 17:18:18 +00:00
Chris Lattner
1121519f27
Only compute targetinfo once and don't leak it. Patch by Sam Bishop!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48358 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 06:12:05 +00:00
Chris Lattner
eb50ed88c2
Make the preprocessor own its PPCallbacks, fixing a memory leak.
...
Patch by Sam Bishop!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48357 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 06:07:05 +00:00
Nate Begeman
5af27e0291
ISO/IEC TR 18037
...
An address space name cannot be used to qualify an object that has automatic
storage duration. Still not catching ASQual'd allocas of array type, just
scalars at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48350 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 00:22:18 +00:00
Nate Begeman
2b59a2cbfd
Fix comment
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48347 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 23:56:36 +00:00
Ted Kremenek
7cb15939e0
The LiveVariables analysis no longer requires a FunctionDecl&; this allows it
...
to be run on other declarations of blocks of code (e.g., Objective-C methods.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48339 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 16:55:07 +00:00
Chris Lattner
043a0b50a2
handle __extension__ properly at block scope.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48332 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 06:32:11 +00:00
Chris Lattner
691a38b740
instead of passing in null end location info, pass in the same as start.
...
This still isn't right, but is slightly nicer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48331 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 06:29:54 +00:00
Chris Lattner
81c018d948
improve DeclStmt to be able to store SourceRange info correctly.
...
Set the start of DeclStmt range. Right now the end is meaningless
though.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48330 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 06:29:04 +00:00
Anders Carlsson
3de54ffeb0
Add note about asm constraints.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48324 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 03:45:48 +00:00
Ted Kremenek
4102af916d
Added bandaid support in CFG construction for ObjCForEachStmt and ObjCAtTryStmt:
...
we gracefully back out and return NULL for the CFG, allowing clients to skip
analyzing functions with these CFGs. We will add support later.
Modified base ASTConsumer "CFGVisitor" to detect when a CFG is not constructed
and to emit a warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48322 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 03:04:22 +00:00
Steve Naroff
5518e7caf3
Two fixes to RewriteTest::RewriteObjCIvarRefExpr():
...
- For explicit ivar refers, make sure the cast is propagated to the AST.
- Don't free the base (since it is still in use).
This fixes the recent regression to test/Rewriter/objc-ivar-receiver-1.m.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48309 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12 23:15:19 +00:00
Ted Kremenek
361fa8ecd1
Changed CallRetValSymbol to SymbolConjured to allow "conjured" symbols to be created for any expression, not just CallExprs.
...
Added experimental support for conjuring symbols during assingments where the RHS is "unknown". This allows more value tracking for path-sensitivity.
Fixed bug in "assumption" logic when processing symbolic constraints; we would improperly mark constraints we didn't support as infeasible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48306 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12 21:45:47 +00:00
Steve Naroff
819173c41e
Minor aesthetic improvement (after I reviewed my last commit).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48304 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12 21:22:52 +00:00
Steve Naroff
39bbd9f591
Avoid using the "unnamed struct field" extension (enabled with -fms-extensions). This feature/extension silently does the wrong thing in g++. As far as I can tell, g++ simply throws the field away entirely (note that it works fine with gcc). Since I am now always casting the object (for other reasons), accessing protected/public fields simply requires the cast refer to the defining class. This solution is simpler all around (thanks to Chris for suggesting it).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48302 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12 21:09:20 +00:00
Ted Kremenek
199e1a071d
Added generation of symbolic values for the return values of functions that have
...
no summaries (useful for false-path pruning).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48301 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12 21:06:49 +00:00
Ted Kremenek
f923a9117a
In GRSimpleVals, added the generation of symbolic values for the return values
...
of function calls. This is useful in pruning paths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48299 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12 21:04:07 +00:00
Chris Lattner
e0e0c94fa2
Update to reflect changes in parameter attribute api.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48290 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12 17:46:07 +00:00
Steve Naroff
dbb6543dd1
Use the "used" attribute. Without it, g++ removes all the meta-data:-( This doesn't happen when compiling straight C code.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48287 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12 17:18:30 +00:00
Ted Kremenek
7ec07fd91f
Improved ExplodedGraph::Trim to only show nodes reachable from a reverse BFS
...
from the sources, and to try and generate only a single path from sources
to roots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48286 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12 17:18:20 +00:00