Sam Bishop
27654983dc
Plug a memory leak in the "this macro expands into a single trivially-
...
expanded token" case.
llvm-svn: 48637
2008-03-21 07:13:02 +00:00
Sam Bishop
558447416d
Use the -E option when invoking clang. Only the preprocessor is
...
required to perform this test.
llvm-svn: 48636
2008-03-21 07:02:04 +00:00
Gabor Greif
56c563ad3f
Add ability to run clang tests under valgrind. Patch by Sam Bishop.
...
llvm-svn: 48621
2008-03-20 22:50:54 +00:00
Ted Kremenek
b7151c7ca8
LiveVariables analysis now uses intersect for the merge of block-level expression liveness information.
...
The rationale is that a block-level expression cannot be live in a parent block unless it is live in all of the successor blocks.
llvm-svn: 48618
2008-03-20 21:46:49 +00:00
Gabor Greif
fc39f15802
Use make's -C option to enter directories.
...
Also, do not try to remove build/ dir when
cleaning, this does not exist any more.
llvm-svn: 48599
2008-03-20 14:43:48 +00:00
Gabor Greif
f5eb286707
reduce chattyness of makefiles
...
llvm-svn: 48597
2008-03-20 14:28:22 +00:00
Gabor Greif
4fa19e4047
scan testdirs only once, patch by Mike Stump, thanks!
...
llvm-svn: 48589
2008-03-20 08:09:10 +00:00
Ted Kremenek
bc24962566
Added HTML highlighting for ranges.
...
llvm-svn: 48572
2008-03-19 23:55:53 +00:00
Steve Naroff
157c403cb8
Fix typo.
...
llvm-svn: 48571
2008-03-19 23:46:26 +00:00
Steve Naroff
c5f8120ad0
Fix http://llvm.org/bugs/show_bug.cgi?id=2161 .
...
llvm-svn: 48568
2008-03-19 23:07:49 +00:00
Ted Kremenek
161d16e083
Change colors of HTML message bubble.
...
llvm-svn: 48563
2008-03-19 22:44:21 +00:00
Ted Kremenek
7ee6a1474f
More CSS enhancements to HTML code printing.
...
llvm-svn: 48557
2008-03-19 22:06:25 +00:00
Ted Kremenek
1651b7cd2d
Misc. cleanups to HTML printing: make code rendered using tables; add
...
better div positioning for messages.
llvm-svn: 48555
2008-03-19 21:59:05 +00:00
Ted Kremenek
6189849d29
Minor speed tweak per Chris's suggestion: use &S[0] instead of S.c_str().
...
llvm-svn: 48544
2008-03-19 16:32:34 +00:00
Ted Kremenek
a46655c5a3
Integrated some of Chris's comments; check for an empty string in InsertStrXXX()
...
before descending into the bowels of the Rewriter.
llvm-svn: 48541
2008-03-19 08:00:50 +00:00
Ted Kremenek
216624ce58
Initial experimentation with adding boxed "annotations" to HTMLized source.
...
llvm-svn: 48540
2008-03-19 07:53:42 +00:00
Ted Kremenek
c6a8352820
Convert tabs to spaces.
...
llvm-svn: 48539
2008-03-19 07:31:52 +00:00
Ted Kremenek
966da4acc3
Moved generation of html header/footer with builtin CSS to the rewriter library.
...
llvm-svn: 48537
2008-03-19 06:14:37 +00:00
Chris Lattner
554221e9fb
simplify code by using the variadic StructType::get method.
...
llvm-svn: 48535
2008-03-19 05:24:56 +00:00
Chris Lattner
3e593cdb98
simplify the clang codegen by using the new Builder.CreateStructGEP method.
...
llvm-svn: 48534
2008-03-19 05:19:41 +00:00
Ted Kremenek
3f8392626b
More cleanups to the HTML rewriter (with line formatting), with better
...
pretty-printing of line numbers.
llvm-svn: 48533
2008-03-19 05:07:26 +00:00
Ted Kremenek
d900897bb0
Added InsertStrXXX/InsertCStrXXX methods to the Rewriter to provide a simpler
...
interface to the rewriter when clients have NULL terminated strings or std::string.
llvm-svn: 48532
2008-03-19 05:06:49 +00:00
Ted Kremenek
54d62b6d64
Change "style" to "class" in HTML output.
...
llvm-svn: 48525
2008-03-19 01:44:27 +00:00
Ted Kremenek
5ddff02861
More cleanups to HTML rewriter API: remove the InsertTag method; was too complicated
...
and clients can achieve a cleaner design just by inserting tags directly. Reserve
the "html" namespace for meta-level operations (e.g., escaping text, etc.)
llvm-svn: 48524
2008-03-19 01:30:02 +00:00
Ted Kremenek
8800ae68a0
More HTML rewriter cleanups. Preliminary CSS support in code pretty-printing.
...
llvm-svn: 48518
2008-03-18 23:55:46 +00:00
Ted Kremenek
5792cebb08
Some cleanups to the HTMLRewrite API. Added support for printing out line
...
numbers (more work to be done on aesthetics).
llvm-svn: 48512
2008-03-18 23:08:51 +00:00
Ted Kremenek
b0c409a235
Added HTML pretty-printer.
...
llvm-svn: 48507
2008-03-18 22:21:07 +00:00
Ted Kremenek
1b580f98aa
Modified "InsertTag" (HTML rewriter) to have an optional "OutermostTag" flag to
...
indicate whether or not the new tag should be the outermost tag at the specified
location (in the case that other tags have been inserted at the same spot).
llvm-svn: 48506
2008-03-18 21:26:34 +00:00
Ted Kremenek
7dcc82220e
Added the beginning of a set of rewriter functions for pretty-printing source
...
code as HTML. Added a new driver option "--emit-html" to dump the source
of the main input file as HTML.
llvm-svn: 48505
2008-03-18 21:19:49 +00:00
Ted Kremenek
45467ef372
Added variant of "InsertText" in the Rewriter to support inserting text both
...
*before* and after a specific location.
llvm-svn: 48504
2008-03-18 21:17:59 +00:00
Ted Kremenek
af5b820af3
Bug fix in RewriteBuffer::getMappedOffset: potentially multiple deltas
...
need to be skipped over when AfterInserts == true, as multiple deltas
may share the same FileLoc.
llvm-svn: 48503
2008-03-18 21:00:57 +00:00
Ted Kremenek
fa7ceba528
Fix comment.
...
llvm-svn: 48501
2008-03-18 20:13:06 +00:00
Steve Naroff
40af380782
Update project files.
...
llvm-svn: 48500
2008-03-18 20:05:40 +00:00
Steve Naroff
ab63b6bd41
Test.
...
llvm-svn: 48499
2008-03-18 20:05:01 +00:00
Ted Kremenek
d161e1f917
Added method "getSourceMgr" to class Rewriter.
...
llvm-svn: 48496
2008-03-18 19:43:13 +00:00
Gabor Greif
831c7c52c7
add 'clean' targets, make sure that 'make test' works after 'make clean'
...
llvm-svn: 48488
2008-03-18 07:03:00 +00:00
Gabor Greif
8bdc7b057d
let the %t magic happen, thanks Chris!
...
llvm-svn: 48487
2008-03-18 06:42:43 +00:00
Gabor Greif
2d2b401c0e
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.
llvm-svn: 48486
2008-03-18 06:14:16 +00:00
Chris Lattner
0725a3e055
move #include to the file that needs it.
...
llvm-svn: 48485
2008-03-18 05:59:11 +00:00
Nate Begeman
c24a1e3223
Fix a typo
...
llvm-svn: 48482
2008-03-18 03:38:14 +00:00
Steve Naroff
327f0f4c3a
Fix <rdar://problem/5716940> rewriter generates invalid C code when no selector found.
...
llvm-svn: 48479
2008-03-18 02:02:04 +00:00
Steve Naroff
034bcb5bfa
Wrap up __NSConstantStringImpl (the replacement for __builtin___CFStringMakeConstantString).
...
llvm-svn: 48477
2008-03-18 01:47:18 +00:00
Ted Kremenek
a9b30c0651
Fix assertion.
...
llvm-svn: 48470
2008-03-17 22:18:22 +00:00
Ted Kremenek
9eae403cde
Fix integer overflow bug when processing switch statements.
...
llvm-svn: 48469
2008-03-17 22:17:56 +00:00
Ted Kremenek
58021a617b
Properly hook up inline asm transfer function logic to the main GRExprEngine logic.
...
llvm-svn: 48468
2008-03-17 21:31:48 +00:00
Ted Kremenek
a9bd82634b
Updated VS project files to reference all libraries in the "lib" subdirectory.
...
llvm-svn: 48467
2008-03-17 21:21:04 +00:00
Ted Kremenek
7c7a331f74
Added initial transfer function support for inline asm.
...
llvm-svn: 48466
2008-03-17 21:11:24 +00:00
Ted Kremenek
8628318085
Added "inputs" and "outputs" iterator (expression) for AsmStmt.
...
llvm-svn: 48465
2008-03-17 21:05:33 +00:00
Gabor Greif
1ac5215798
finishing touches: teminate the dots with a newline
...
llvm-svn: 48462
2008-03-17 18:36:14 +00:00
Nate Begeman
0c185c45a9
Check in a couple fixes for vector extensions.
...
llvm-svn: 48461
2008-03-17 17:22:18 +00:00
Ted Kremenek
fff4fc7e6d
Bug fix in CFG construction: VisitCompoundStmt should return the last created block.
...
llvm-svn: 48460
2008-03-17 17:19:44 +00:00
Gabor Greif
5434053f6d
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?
llvm-svn: 48458
2008-03-17 16:29:58 +00:00
Gabor Greif
430efdb95b
Simplify further by creating *.testresults files
...
inside of the Output/ directory.
The testclean target could be removed now.
llvm-svn: 48457
2008-03-17 15:58:58 +00:00
Gabor Greif
4892b3fd5b
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 >.
llvm-svn: 48456
2008-03-17 15:37:09 +00:00
Gabor Greif
2fc473069d
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 >
llvm-svn: 48455
2008-03-17 15:07:59 +00:00
Gabor Greif
d8d1b60237
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.
llvm-svn: 48454
2008-03-17 13:45:47 +00:00
Gabor Greif
8eea5b51b5
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.
llvm-svn: 48453
2008-03-17 12:35:00 +00:00
Chris Lattner
2c532e1002
eliminate the last signed element count.
...
llvm-svn: 48436
2008-03-17 01:26:42 +00:00
Chris Lattner
5bb4ee20cd
clean up iteration over propertydecls.
...
llvm-svn: 48435
2008-03-17 01:24:41 +00:00
Chris Lattner
ed0e16404c
clean up property memory allocation to move it into the ast classes
...
like the rest of the classes.
llvm-svn: 48434
2008-03-17 01:19:02 +00:00
Chris Lattner
41eec3d097
make property addition work list all other "add" methods. Do
...
the allocation in the class, not in sema.
llvm-svn: 48433
2008-03-16 21:23:50 +00:00
Chris Lattner
219b3e9c6c
add the last two Create methods for decls, woo!
...
llvm-svn: 48432
2008-03-16 21:17:37 +00:00
Chris Lattner
8d1c04f53a
Convert more counts to be zero based instead of -1 based, make them unsigned.
...
llvm-svn: 48429
2008-03-16 21:08:55 +00:00
Chris Lattner
36ac1cae1f
add two more Create methods.
...
llvm-svn: 48428
2008-03-16 20:53:07 +00:00
Chris Lattner
d77aff8232
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.
llvm-svn: 48427
2008-03-16 20:47:45 +00:00
Chris Lattner
1dd77af9ce
Add create methods for ObjCCategoryDecl, ObjCForwardProtocolDecl, ObjCClassDecl.
...
llvm-svn: 48426
2008-03-16 20:34:23 +00:00
Chris Lattner
793ca20e2d
make some more 'counts' unsigned.
...
llvm-svn: 48425
2008-03-16 20:27:39 +00:00
Chris Lattner
09a2085249
make NumClassMethods unsigned in categories
...
llvm-svn: 48424
2008-03-16 20:22:07 +00:00
Chris Lattner
acc04a9261
minor cleanups, make getNumInstanceMethods always return unsigned.
...
llvm-svn: 48423
2008-03-16 20:19:15 +00:00
Chris Lattner
5074f8f3ef
fix a crasher where an invalid program that multiply defined
...
a protocol could smash more references in than are allocated.
llvm-svn: 48411
2008-03-16 01:25:17 +00:00
Chris Lattner
f87ca0a7d1
Give ObjCProtocolDecl a Create method.
...
llvm-svn: 48410
2008-03-16 01:23:04 +00:00
Chris Lattner
2a52083efc
hoist a bunch of casting.
...
llvm-svn: 48409
2008-03-16 01:16:52 +00:00
Chris Lattner
96c501ef7e
Add create methods for ObjCIvarDecl and ObjCInterfaceDecl
...
llvm-svn: 48408
2008-03-16 01:15:50 +00:00
Chris Lattner
011b0f5c5a
Make the parameter count of ObjCMethodDecl unsigned, you
...
can't have negative arguments.
llvm-svn: 48407
2008-03-16 01:07:14 +00:00
Chris Lattner
c557947488
remove some dead arguments to ObjCMethodDecl.
...
llvm-svn: 48406
2008-03-16 00:58:16 +00:00
Chris Lattner
8d8829e225
Give ObjCMethodDecl a Create method.
...
llvm-svn: 48405
2008-03-16 00:49:28 +00:00
Chris Lattner
893751970a
Split objc decl implementation out into DeclObjC.cpp
...
llvm-svn: 48404
2008-03-16 00:19:01 +00:00
Chris Lattner
ee1284a6e2
switch the rest of the C decl classes to do their
...
allocation through ASTContext.
llvm-svn: 48403
2008-03-16 00:16:02 +00:00
Chris Lattner
7a51313d8a
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.
llvm-svn: 48402
2008-03-15 23:59:48 +00:00
Chris Lattner
d3f989ccd3
Make a ctor protected
...
llvm-svn: 48401
2008-03-15 23:04:32 +00:00
Ted Kremenek
056fb6be98
Fixed 80 col. violations.
...
llvm-svn: 48400
2008-03-15 22:11:54 +00:00
Ted Kremenek
f5227057b1
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.
llvm-svn: 48399
2008-03-15 22:07:05 +00:00
Chris Lattner
96c460d142
move the ASTContext argument to be first in the argument list of
...
all Create methods.
llvm-svn: 48398
2008-03-15 21:32:50 +00:00
Chris Lattner
5072bae709
Switch over functiondecl. This makes it obvious that the ASTContext
...
argument to Create should be first, not last.
llvm-svn: 48397
2008-03-15 21:24:04 +00:00
Chris Lattner
4b08ca8f2e
switch the VarDecl allocation model to go through ASTContext.
...
llvm-svn: 48396
2008-03-15 21:10:16 +00:00
Gabor Greif
2c7f144ab7
implement a bit of feedback: print dots
...
llvm-svn: 48394
2008-03-15 08:11:35 +00:00
Ted Kremenek
0d579b1c1e
Added initialization to ErrorDiag to silence gcc's warning of the variable
...
potentially being used uninitialized (which it cannot be).
llvm-svn: 48393
2008-03-15 07:58:36 +00:00
Ted Kremenek
cab47bdb37
Small bug fix in CFG construction: the active block for LabelStmts comes
...
from "Block", not the CFGBlock* returned from visiting its subexpression.
llvm-svn: 48392
2008-03-15 07:45:02 +00:00
Gabor Greif
322f055e05
First draft of a parallelized test methodology. Improvements soon.
...
llvm-svn: 48391
2008-03-15 07:26:41 +00:00
Chris Lattner
a7b3287760
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.
llvm-svn: 48390
2008-03-15 06:12:44 +00:00
Chris Lattner
88f70d69c6
various minor cleanups.
...
llvm-svn: 48389
2008-03-15 05:43:15 +00:00
Ted Kremenek
02e24b6976
Handle StmtExprs whose last contained statement is not an expression.
...
llvm-svn: 48388
2008-03-15 03:27:30 +00:00
Ted Kremenek
88ba750f74
Compute alignment in bytes, not bits.
...
llvm-svn: 48387
2008-03-15 03:13:55 +00:00
Ted Kremenek
ae5b78615c
Implement transfer function logic for alignof operator (types).
...
llvm-svn: 48386
2008-03-15 03:13:20 +00:00
Ted Kremenek
5c98d1d641
Added transfer function support in GRExprEngine for __extension__.
...
llvm-svn: 48385
2008-03-15 03:05:30 +00:00
Steve Naroff
dad80ba9b1
Link against the correct ObjC string class (__CFConstantStringClassReference) and fix length computation (removing a FIXME).
...
llvm-svn: 48384
2008-03-15 01:36:04 +00:00
Steve Naroff
ce8e886731
Remove ObjC rewriter dependency on GCC's __builtin___CFStringMakeConstantString.
...
llvm-svn: 48383
2008-03-15 00:55:56 +00:00
Ted Kremenek
9e0461cd6e
"panic" has 5 letters, not 4. Bug pointed out by Nuno Lopes!
...
llvm-svn: 48377
2008-03-14 23:25:49 +00:00
Ted Kremenek
9318f68ad4
Hack to hardwire in some panic functions that are not marked noreturn.
...
llvm-svn: 48374
2008-03-14 21:58:42 +00:00
Ted Kremenek
9abb59f9cc
Emit warnings for undefined control-flow.
...
llvm-svn: 48368
2008-03-14 18:14:50 +00:00