]> granicus.if.org Git - clang/log
clang
16 years agoUpdate project files.
Steve Naroff [Tue, 18 Mar 2008 20:05:40 +0000 (20:05 +0000)]
Update project files.

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

16 years agoTest.
Steve Naroff [Tue, 18 Mar 2008 20:05:01 +0000 (20:05 +0000)]
Test.

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

16 years agoAdded method "getSourceMgr" to class Rewriter.
Ted Kremenek [Tue, 18 Mar 2008 19:43:13 +0000 (19:43 +0000)]
Added method "getSourceMgr" to class Rewriter.

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

16 years agoadd 'clean' targets, make sure that 'make test' works after 'make clean'
Gabor Greif [Tue, 18 Mar 2008 07:03:00 +0000 (07:03 +0000)]
add 'clean' targets, make sure that 'make test' works after 'make clean'

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

16 years agolet the %t magic happen, thanks Chris!
Gabor Greif [Tue, 18 Mar 2008 06:42:43 +0000 (06:42 +0000)]
let the %t magic happen, thanks Chris!

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

16 years agoSwitch over to the parallelized makefile, but keep old serial
Gabor Greif [Tue, 18 Mar 2008 06:14:16 +0000 (06:14 +0000)]
Switch over to the parallelized makefile, but keep old serial
makefile around (just change Makefile.parallel to Makefile to
get back old functionality).

To run parallel tests, specify

    make -jN test # where N = num of CPUs * 2

to get detailed output, run

    make -jN test VERBOSE=1

to only get error descriptions *after the tests have run*, type

    make report

this gives you the extra information which was omitted in non-VERBOSE
mode.

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

16 years agomove #include to the file that needs it.
Chris Lattner [Tue, 18 Mar 2008 05:59:11 +0000 (05:59 +0000)]
move #include to the file that needs it.

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

16 years agoFix a typo
Nate Begeman [Tue, 18 Mar 2008 03:38:14 +0000 (03:38 +0000)]
Fix a typo

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

16 years agoFix <rdar://problem/5716940> rewriter generates invalid C code when no selector found.
Steve Naroff [Tue, 18 Mar 2008 02:02:04 +0000 (02:02 +0000)]
Fix <rdar://problem/5716940> rewriter generates invalid C code when no selector found.

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

16 years agoWrap up __NSConstantStringImpl (the replacement for __builtin___CFStringMakeConstantS...
Steve Naroff [Tue, 18 Mar 2008 01:47:18 +0000 (01:47 +0000)]
Wrap up __NSConstantStringImpl (the replacement for __builtin___CFStringMakeConstantString).

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

16 years agoFix assertion.
Ted Kremenek [Mon, 17 Mar 2008 22:18:22 +0000 (22:18 +0000)]
Fix assertion.

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

16 years agoFix integer overflow bug when processing switch statements.
Ted Kremenek [Mon, 17 Mar 2008 22:17:56 +0000 (22:17 +0000)]
Fix integer overflow bug when processing switch statements.

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

16 years agoProperly hook up inline asm transfer function logic to the main GRExprEngine logic.
Ted Kremenek [Mon, 17 Mar 2008 21:31:48 +0000 (21:31 +0000)]
Properly hook up inline asm transfer function logic to the main GRExprEngine logic.

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

16 years agoUpdated VS project files to reference all libraries in the "lib" subdirectory.
Ted Kremenek [Mon, 17 Mar 2008 21:21:04 +0000 (21:21 +0000)]
Updated VS project files to reference all libraries in the "lib" subdirectory.

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

16 years agoAdded initial transfer function support for inline asm.
Ted Kremenek [Mon, 17 Mar 2008 21:11:24 +0000 (21:11 +0000)]
Added initial transfer function support for inline asm.

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

16 years agoAdded "inputs" and "outputs" iterator (expression) for AsmStmt.
Ted Kremenek [Mon, 17 Mar 2008 21:05:33 +0000 (21:05 +0000)]
Added "inputs" and "outputs" iterator (expression) for AsmStmt.

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

16 years agofinishing touches: teminate the dots with a newline
Gabor Greif [Mon, 17 Mar 2008 18:36:14 +0000 (18:36 +0000)]
finishing touches: teminate the dots with a newline

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

16 years agoCheck in a couple fixes for vector extensions.
Nate Begeman [Mon, 17 Mar 2008 17:22:18 +0000 (17:22 +0000)]
Check in a couple fixes for vector extensions.

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

16 years agoBug fix in CFG construction: VisitCompoundStmt should return the last created block.
Ted Kremenek [Mon, 17 Mar 2008 17:19:44 +0000 (17:19 +0000)]
Bug fix in CFG construction: VisitCompoundStmt should return the last created block.

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

16 years agoImplemented verbose mode.
Gabor Greif [Mon, 17 Mar 2008 16:29:58 +0000 (16:29 +0000)]
Implemented verbose mode.
  make test VERBOSE=1
should now produce the same output like
the Makefile normally does.
Without VERBOSE only the names of failed tests
are printed.

I am pretty comfortable with this version, and
I think it is time to switch over to Makefile.parallel
to be the default.

What do you think? Did I forget some piece of feedback?

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

16 years agoSimplify further by creating *.testresults files
Gabor Greif [Mon, 17 Mar 2008 15:58:58 +0000 (15:58 +0000)]
Simplify further by creating *.testresults files
inside of the Output/ directory.
The testclean target could be removed now.

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

16 years agoGet rid of the creation of secondary makefile "Makefile.tests".
Gabor Greif [Mon, 17 Mar 2008 15:37:09 +0000 (15:37 +0000)]
Get rid of the creation of secondary makefile "Makefile.tests".

This implements second part of
<http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080310/004727.html>.

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

16 years agoMore review feedback implemented:
Gabor Greif [Mon, 17 Mar 2008 15:07:59 +0000 (15:07 +0000)]
More review feedback implemented:

Get rid of "awk" dependence by using same "make"
functionality:

<http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080310/004727.html>

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

16 years agoActually expand the %t1 patterns (in RUN: lines) to a unique
Gabor Greif [Mon, 17 Mar 2008 13:45:47 +0000 (13:45 +0000)]
Actually expand the %t1 patterns (in RUN: lines) to a unique
filename.
This fixes (e.g.) CodeGen/struct-x86-darwin.c which
raced at writing to "%t1" with other tests when parallel
testing was specified with a high "-j XX" value.

Also gets rid of the file tools/clang/test/%t1
when doing an "svn st" after testing.

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

16 years agoSecond round of review feedback.
Gabor Greif [Mon, 17 Mar 2008 12:35:00 +0000 (12:35 +0000)]
Second round of review feedback.

* print out message when tests start
* testrunner sets status now
* on failed test run print out test name

I tested these changes with the non-parallel makefile
and it did not break.

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

16 years agoeliminate the last signed element count.
Chris Lattner [Mon, 17 Mar 2008 01:26:42 +0000 (01:26 +0000)]
eliminate the last signed element count.

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

16 years agoclean up iteration over propertydecls.
Chris Lattner [Mon, 17 Mar 2008 01:24:41 +0000 (01:24 +0000)]
clean up iteration over propertydecls.

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

16 years agoclean up property memory allocation to move it into the ast classes
Chris Lattner [Mon, 17 Mar 2008 01:19:02 +0000 (01:19 +0000)]
clean up property memory allocation to move it into the ast classes
like the rest of the classes.

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

16 years agomake property addition work list all other "add" methods. Do
Chris Lattner [Sun, 16 Mar 2008 21:23:50 +0000 (21:23 +0000)]
make property addition work list all other "add" methods.  Do
the allocation in the class, not in sema.

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

16 years agoadd the last two Create methods for decls, woo!
Chris Lattner [Sun, 16 Mar 2008 21:17:37 +0000 (21:17 +0000)]
add the last two Create methods for decls, woo!

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

16 years agoConvert more counts to be zero based instead of -1 based, make them unsigned.
Chris Lattner [Sun, 16 Mar 2008 21:08:55 +0000 (21:08 +0000)]
Convert more counts to be zero based instead of -1 based, make them unsigned.

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

16 years agoadd two more Create methods.
Chris Lattner [Sun, 16 Mar 2008 20:53:07 +0000 (20:53 +0000)]
add two more Create methods.

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

16 years agosimplify the way ObjCCategoryDecl's get their referenced protocols list
Chris Lattner [Sun, 16 Mar 2008 20:47:45 +0000 (20:47 +0000)]
simplify the way ObjCCategoryDecl's get their referenced protocols list
specified.  Previously, the ctor would allocate memory for the list and then
it would get filled in later.  Move the allocation+filling in to be more
consistent with other stuff, e.g. the addMethods method.

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

16 years agoAdd create methods for ObjCCategoryDecl, ObjCForwardProtocolDecl, ObjCClassDecl.
Chris Lattner [Sun, 16 Mar 2008 20:34:23 +0000 (20:34 +0000)]
Add create methods for ObjCCategoryDecl, ObjCForwardProtocolDecl, ObjCClassDecl.

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

16 years agomake some more 'counts' unsigned.
Chris Lattner [Sun, 16 Mar 2008 20:27:39 +0000 (20:27 +0000)]
make some more 'counts' unsigned.

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

16 years agomake NumClassMethods unsigned in categories
Chris Lattner [Sun, 16 Mar 2008 20:22:07 +0000 (20:22 +0000)]
make NumClassMethods unsigned in categories

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

16 years agominor cleanups, make getNumInstanceMethods always return unsigned.
Chris Lattner [Sun, 16 Mar 2008 20:19:15 +0000 (20:19 +0000)]
minor cleanups, make getNumInstanceMethods always return unsigned.

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

16 years agofix a crasher where an invalid program that multiply defined
Chris Lattner [Sun, 16 Mar 2008 01:25:17 +0000 (01:25 +0000)]
fix a crasher where an invalid program that multiply defined
a protocol could smash more references in than are allocated.

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

16 years agoGive ObjCProtocolDecl a Create method.
Chris Lattner [Sun, 16 Mar 2008 01:23:04 +0000 (01:23 +0000)]
Give ObjCProtocolDecl a Create method.

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

16 years agohoist a bunch of casting.
Chris Lattner [Sun, 16 Mar 2008 01:16:52 +0000 (01:16 +0000)]
hoist a bunch of casting.

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

16 years agoAdd create methods for ObjCIvarDecl and ObjCInterfaceDecl
Chris Lattner [Sun, 16 Mar 2008 01:15:50 +0000 (01:15 +0000)]
Add create methods for ObjCIvarDecl and ObjCInterfaceDecl

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

16 years agoMake the parameter count of ObjCMethodDecl unsigned, you
Chris Lattner [Sun, 16 Mar 2008 01:07:14 +0000 (01:07 +0000)]
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

16 years agoremove some dead arguments to ObjCMethodDecl.
Chris Lattner [Sun, 16 Mar 2008 00:58:16 +0000 (00:58 +0000)]
remove some dead arguments to ObjCMethodDecl.

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

16 years agoGive ObjCMethodDecl a Create method.
Chris Lattner [Sun, 16 Mar 2008 00:49:28 +0000 (00:49 +0000)]
Give ObjCMethodDecl a Create method.

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

16 years agoSplit objc decl implementation out into DeclObjC.cpp
Chris Lattner [Sun, 16 Mar 2008 00:19:01 +0000 (00:19 +0000)]
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

16 years agoswitch the rest of the C decl classes to do their
Chris Lattner [Sun, 16 Mar 2008 00:16:02 +0000 (00:16 +0000)]
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

16 years agoMake a major restructuring of the clang tree: introduce a top-level
Chris Lattner [Sat, 15 Mar 2008 23:59:48 +0000 (23:59 +0000)]
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

16 years agoMake a ctor protected
Chris Lattner [Sat, 15 Mar 2008 23:04:32 +0000 (23:04 +0000)]
Make a ctor protected

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

16 years agoFixed 80 col. violations.
Ted Kremenek [Sat, 15 Mar 2008 22:11:54 +0000 (22:11 +0000)]
Fixed 80 col. violations.

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

16 years agoDisable creation of "ContentsOf" symbols. It was fundamentally broken on many
Ted Kremenek [Sat, 15 Mar 2008 22:07:05 +0000 (22:07 +0000)]
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

16 years agomove the ASTContext argument to be first in the argument list of
Chris Lattner [Sat, 15 Mar 2008 21:32:50 +0000 (21:32 +0000)]
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

16 years agoSwitch over functiondecl. This makes it obvious that the ASTContext
Chris Lattner [Sat, 15 Mar 2008 21:24:04 +0000 (21:24 +0000)]
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

16 years agoswitch the VarDecl allocation model to go through ASTContext.
Chris Lattner [Sat, 15 Mar 2008 21:10:16 +0000 (21:10 +0000)]
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

16 years agoimplement a bit of feedback: print dots
Gabor Greif [Sat, 15 Mar 2008 08:11:35 +0000 (08:11 +0000)]
implement a bit of feedback: print dots

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

16 years agoAdded initialization to ErrorDiag to silence gcc's warning of the variable
Ted Kremenek [Sat, 15 Mar 2008 07:58:36 +0000 (07:58 +0000)]
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

16 years agoSmall bug fix in CFG construction: the active block for LabelStmts comes
Ted Kremenek [Sat, 15 Mar 2008 07:45:02 +0000 (07:45 +0000)]
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

16 years agoFirst draft of a parallelized test methodology. Improvements soon.
Gabor Greif [Sat, 15 Mar 2008 07:26:41 +0000 (07:26 +0000)]
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

16 years agostart switching decls over to using an allocator controlled by ASTContext.
Chris Lattner [Sat, 15 Mar 2008 06:12:44 +0000 (06:12 +0000)]
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

16 years agovarious minor cleanups.
Chris Lattner [Sat, 15 Mar 2008 05:43:15 +0000 (05:43 +0000)]
various minor cleanups.

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

16 years agoHandle StmtExprs whose last contained statement is not an expression.
Ted Kremenek [Sat, 15 Mar 2008 03:27:30 +0000 (03:27 +0000)]
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

16 years agoCompute alignment in bytes, not bits.
Ted Kremenek [Sat, 15 Mar 2008 03:13:55 +0000 (03:13 +0000)]
Compute alignment in bytes, not bits.

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

16 years agoImplement transfer function logic for alignof operator (types).
Ted Kremenek [Sat, 15 Mar 2008 03:13:20 +0000 (03:13 +0000)]
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

16 years agoAdded transfer function support in GRExprEngine for __extension__.
Ted Kremenek [Sat, 15 Mar 2008 03:05:30 +0000 (03:05 +0000)]
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

16 years agoLink against the correct ObjC string class (__CFConstantStringClassReference) and...
Steve Naroff [Sat, 15 Mar 2008 01:36:04 +0000 (01:36 +0000)]
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

16 years agoRemove ObjC rewriter dependency on GCC's __builtin___CFStringMakeConstantString.
Steve Naroff [Sat, 15 Mar 2008 00:55:56 +0000 (00:55 +0000)]
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

16 years ago"panic" has 5 letters, not 4. Bug pointed out by Nuno Lopes!
Ted Kremenek [Fri, 14 Mar 2008 23:25:49 +0000 (23:25 +0000)]
"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

16 years agoHack to hardwire in some panic functions that are not marked noreturn.
Ted Kremenek [Fri, 14 Mar 2008 21:58:42 +0000 (21:58 +0000)]
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

16 years agoEmit warnings for undefined control-flow.
Ted Kremenek [Fri, 14 Mar 2008 18:14:50 +0000 (18:14 +0000)]
Emit warnings for undefined control-flow.

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

16 years agoCorrectly error on arrays with automatic storage full of objects with
Nate Begeman [Fri, 14 Mar 2008 18:07:10 +0000 (18:07 +0000)]
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

16 years agoPath-sensitive analyses no longer take a FunctionDecl, but any Decl representing
Ted Kremenek [Fri, 14 Mar 2008 17:31:00 +0000 (17:31 +0000)]
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

16 years agoadd initial support for generating an llvm.globalctors list. Patch by David Chisnall
Chris Lattner [Fri, 14 Mar 2008 17:18:18 +0000 (17:18 +0000)]
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

16 years agoOnly compute targetinfo once and don't leak it. Patch by Sam Bishop!
Chris Lattner [Fri, 14 Mar 2008 06:12:05 +0000 (06:12 +0000)]
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

16 years agoMake the preprocessor own its PPCallbacks, fixing a memory leak.
Chris Lattner [Fri, 14 Mar 2008 06:07:05 +0000 (06:07 +0000)]
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

16 years agoISO/IEC TR 18037
Nate Begeman [Fri, 14 Mar 2008 00:22:18 +0000 (00:22 +0000)]
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

16 years agoFix comment
Nate Begeman [Thu, 13 Mar 2008 23:56:36 +0000 (23:56 +0000)]
Fix comment

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

16 years agoThe LiveVariables analysis no longer requires a FunctionDecl&; this allows it
Ted Kremenek [Thu, 13 Mar 2008 16:55:07 +0000 (16:55 +0000)]
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

16 years agohandle __extension__ properly at block scope.
Chris Lattner [Thu, 13 Mar 2008 06:32:11 +0000 (06:32 +0000)]
handle __extension__ properly at block scope.

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

16 years agoinstead of passing in null end location info, pass in the same as start.
Chris Lattner [Thu, 13 Mar 2008 06:29:54 +0000 (06:29 +0000)]
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

16 years agoimprove DeclStmt to be able to store SourceRange info correctly.
Chris Lattner [Thu, 13 Mar 2008 06:29:04 +0000 (06:29 +0000)]
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

16 years agoAdd note about asm constraints.
Anders Carlsson [Thu, 13 Mar 2008 03:45:48 +0000 (03:45 +0000)]
Add note about asm constraints.

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

16 years agoAdded bandaid support in CFG construction for ObjCForEachStmt and ObjCAtTryStmt:
Ted Kremenek [Thu, 13 Mar 2008 03:04:22 +0000 (03:04 +0000)]
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

16 years agoTwo fixes to RewriteTest::RewriteObjCIvarRefExpr():
Steve Naroff [Wed, 12 Mar 2008 23:15:19 +0000 (23:15 +0000)]
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

16 years agoChanged CallRetValSymbol to SymbolConjured to allow "conjured" symbols to be created...
Ted Kremenek [Wed, 12 Mar 2008 21:45:47 +0000 (21:45 +0000)]
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

16 years agoMinor aesthetic improvement (after I reviewed my last commit).
Steve Naroff [Wed, 12 Mar 2008 21:22:52 +0000 (21:22 +0000)]
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

16 years agoAvoid using the "unnamed struct field" extension (enabled with -fms-extensions)....
Steve Naroff [Wed, 12 Mar 2008 21:09:20 +0000 (21:09 +0000)]
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

16 years agoAdded generation of symbolic values for the return values of functions that have
Ted Kremenek [Wed, 12 Mar 2008 21:06:49 +0000 (21:06 +0000)]
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

16 years agoIn GRSimpleVals, added the generation of symbolic values for the return values
Ted Kremenek [Wed, 12 Mar 2008 21:04:07 +0000 (21:04 +0000)]
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

16 years agoUpdate to reflect changes in parameter attribute api.
Chris Lattner [Wed, 12 Mar 2008 17:46:07 +0000 (17:46 +0000)]
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

16 years agoUse the "used" attribute. Without it, g++ removes all the meta-data:-( This doesn...
Steve Naroff [Wed, 12 Mar 2008 17:18:30 +0000 (17:18 +0000)]
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

16 years agoImproved ExplodedGraph::Trim to only show nodes reachable from a reverse BFS
Ted Kremenek [Wed, 12 Mar 2008 17:18:20 +0000 (17:18 +0000)]
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

16 years ago-Add missing visitor for ObjCIvarRefExpr.
Steve Naroff [Wed, 12 Mar 2008 13:19:12 +0000 (13:19 +0000)]
-Add missing visitor for ObjCIvarRefExpr.
-Wrap objc runtime calls with "extern "C"" (for now).

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

16 years agoSince the rewriter now outputs C++, it no longer makes sense to pipe the output to...
Steve Naroff [Wed, 12 Mar 2008 02:07:40 +0000 (02:07 +0000)]
Since the rewriter now outputs C++, it no longer makes sense to pipe the output to clang.
This should "fix" all but one of the test failure.

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

16 years agoFixed regression in SymbolManager introduced in r48272.
Ted Kremenek [Wed, 12 Mar 2008 02:00:37 +0000 (02:00 +0000)]
Fixed regression in SymbolManager introduced in r48272.

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

16 years agoPrototype (pre-alpha) implementation of CFRef checker.
Ted Kremenek [Wed, 12 Mar 2008 01:21:45 +0000 (01:21 +0000)]
Prototype (pre-alpha) implementation of CFRef checker.

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

16 years agoRemove more dependencies on C "flexible array member" idiom (when generating meta...
Steve Naroff [Wed, 12 Mar 2008 01:06:30 +0000 (01:06 +0000)]
Remove more dependencies on C "flexible array member" idiom (when generating meta-data).

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

16 years agoMake ivar rewrite C++ friendly (since C++ forces a unified namespace for typedefs...
Steve Naroff [Wed, 12 Mar 2008 00:25:36 +0000 (00:25 +0000)]
Make ivar rewrite C++ friendly (since C++ forces a unified namespace for typedefs/structures). The previous version of the rewriter generated both a type def and structure def for each class (which doesn't fly in C++).

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

16 years agoAdded pretty-printing support for checker-specific state for the CFRefCount checker.
Ted Kremenek [Tue, 11 Mar 2008 19:44:10 +0000 (19:44 +0000)]
Added pretty-printing support for checker-specific state for the CFRefCount checker.

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

16 years agoExpanded graph-visualization to include optional pretty-printing of checker-specific...
Ted Kremenek [Tue, 11 Mar 2008 19:02:40 +0000 (19:02 +0000)]
Expanded graph-visualization to include optional pretty-printing of checker-specific state.

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

16 years agoExpanded ValueState pretty-printing to use an optional "CheckerStatePrinter"
Ted Kremenek [Tue, 11 Mar 2008 18:57:24 +0000 (18:57 +0000)]
Expanded ValueState pretty-printing to use an optional "CheckerStatePrinter"
object to pretty-print the component of a state that is specific to a checker.

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

16 years agoExpanded graph visualization interface to include specifying a range of
Ted Kremenek [Tue, 11 Mar 2008 18:25:33 +0000 (18:25 +0000)]
Expanded graph visualization interface to include specifying a range of
nodes to use a trim sources.

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