]> granicus.if.org Git - clang/log
clang
16 years agosome cleanups on top of David's patch. There are still two
Chris Lattner [Sun, 30 Mar 2008 23:25:33 +0000 (23:25 +0000)]
some cleanups on top of David's patch.  There are still two
remaining open issues I've communicated to him:

1) self can be assigned to, and his patch didn't handle it correctly.
2) CollectObjCIvarTypes is N^2 (because each subclass reprocesses
   all parent class ivars) and flattens classes.  If A derives from B,
   and both have an int, I'd expect to get { {i32}, i32}, not { i32, i32}.

David, please review.

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

16 years agoAdd initial support for objc codegen for methods, ivars, and the
Chris Lattner [Sun, 30 Mar 2008 23:03:07 +0000 (23:03 +0000)]
Add initial support for objc codegen for methods, ivars, and the
etoile runtime, patch by David Chisnall!

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

16 years agoOnly have the rewriter produce a file when there are no errors.
Steve Naroff [Fri, 28 Mar 2008 22:26:09 +0000 (22:26 +0000)]
Only have the rewriter produce a file when there are no errors.

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

16 years agoMake sure Sema::ActOnClassMessage() correctly diagnoses "super".
Steve Naroff [Fri, 28 Mar 2008 21:37:05 +0000 (21:37 +0000)]
Make sure Sema::ActOnClassMessage() correctly diagnoses "super".

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

16 years agoAdded skeleton checking for NSString's method initWithFormat: (do not pass nil)....
Ted Kremenek [Fri, 28 Mar 2008 16:09:38 +0000 (16:09 +0000)]
Added skeleton checking for NSString's method initWithFormat: (do not pass nil).  This won't be useful in most cases right now
because the analyzer isn't tracking expected types for an object, and [NSString alloc] just runs "id".

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

16 years agoAdd some of Ted's recent work to the VC++ project file.
Steve Naroff [Thu, 27 Mar 2008 22:59:54 +0000 (22:59 +0000)]
Add some of Ted's recent work to the VC++ project file.
Fix a couple bozo bugs in the rewriter.

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

16 years agoCollect all the preamble code and don't insert it until the end.
Steve Naroff [Thu, 27 Mar 2008 22:29:16 +0000 (22:29 +0000)]
Collect all the preamble code and don't insert it until the end.

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

16 years agoExpanded NSString checking to check for nil for a few more methods.
Ted Kremenek [Thu, 27 Mar 2008 22:05:32 +0000 (22:05 +0000)]
Expanded NSString checking to check for nil for a few more methods.

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

16 years agoAdd line SourceLocation to NSString checks.
Ted Kremenek [Thu, 27 Mar 2008 21:23:57 +0000 (21:23 +0000)]
Add line SourceLocation to NSString checks.
Added test case to test warning about passing 'nil' to NSString's compare: method.

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

16 years agoHooked up initial NSString interface checking to GRSimpleVals.
Ted Kremenek [Thu, 27 Mar 2008 21:15:17 +0000 (21:15 +0000)]
Hooked up initial NSString interface checking to GRSimpleVals.

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

16 years agoProgramPoint is just a smart pointer; no reason to return a constant reference.
Ted Kremenek [Thu, 27 Mar 2008 18:11:59 +0000 (18:11 +0000)]
ProgramPoint is just a smart pointer; no reason to return a constant reference.

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

16 years agoMinor CSS tweaking (smaller h1 tags).
Ted Kremenek [Thu, 27 Mar 2008 17:28:58 +0000 (17:28 +0000)]
Minor CSS tweaking (smaller h1 tags).
Bug fix in EscapeText (for std::string) where spaces were not properly emitted.

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

16 years agoFor HTMLDiagnostics, when emitting the name of the directory, substitute the current...
Ted Kremenek [Thu, 27 Mar 2008 17:25:28 +0000 (17:25 +0000)]
For HTMLDiagnostics, when emitting the name of the directory, substitute the current working directory for "."

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

16 years agoUpdate Xcode project: add BasicObjCFoundationChecks.h
Ted Kremenek [Thu, 27 Mar 2008 17:17:51 +0000 (17:17 +0000)]
Update Xcode project: add BasicObjCFoundationChecks.h

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

16 years agoAdd creation of BasicObjCFoundationChecks when running GRSimpleVals from the driver.
Ted Kremenek [Thu, 27 Mar 2008 17:17:22 +0000 (17:17 +0000)]
Add creation of BasicObjCFoundationChecks when running GRSimpleVals from the driver.

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

16 years agoAdd default ctor implementation.
Ted Kremenek [Thu, 27 Mar 2008 17:16:06 +0000 (17:16 +0000)]
Add default ctor implementation.

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

16 years agoAdd html::EscapeText for std::string; use this function to escape text in message...
Ted Kremenek [Thu, 27 Mar 2008 17:15:29 +0000 (17:15 +0000)]
Add html::EscapeText for std::string; use this function to escape text in message bubbles.

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

16 years agoDon't emit any timings for GRSimple if the CFG is not going to be built.
Ted Kremenek [Thu, 27 Mar 2008 17:14:42 +0000 (17:14 +0000)]
Don't emit any timings for GRSimple if the CFG is not going to be built.

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

16 years agoOutput directory as well as file name.
Ted Kremenek [Thu, 27 Mar 2008 07:39:04 +0000 (07:39 +0000)]
Output directory as well as file name.

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

16 years agoAdded <h3> tag in HTML file output that contains the name of the source file.
Ted Kremenek [Thu, 27 Mar 2008 07:35:49 +0000 (07:35 +0000)]
Added <h3> tag in HTML file output that contains the name of the source file.

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

16 years agoAdded AnnotatedPath.h, GRAuditor.h, GRSimpleAPICheck.h and BasicObjCFoundationChecks...
Ted Kremenek [Thu, 27 Mar 2008 07:26:42 +0000 (07:26 +0000)]
Added AnnotatedPath.h, GRAuditor.h, GRSimpleAPICheck.h and BasicObjCFoundationChecks.cpp to Xcode project.

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

16 years agoAdded "GRAuditor" and "GRSimpleAPICheck" interface to allow simple stateless checkers...
Ted Kremenek [Thu, 27 Mar 2008 07:25:52 +0000 (07:25 +0000)]
Added "GRAuditor" and "GRSimpleAPICheck" interface to allow simple stateless checkers to be injected into the analyzer.
Added "AnnotatedPath" class to record an annotated path that will be useful for inspecting paths.
Added some boilerplate code for simple checks of Apple's Foundation API.

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

16 years agoUpdated Xcode project with HTMLDiagnostics.[h,cpp]
Ted Kremenek [Thu, 27 Mar 2008 06:18:34 +0000 (06:18 +0000)]
Updated Xcode project with HTMLDiagnostics.[h,cpp]

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

16 years agoAdded "HTMLDiagnostic", a generic DiagnosticClient (that also implements PathDiagnostic)
Ted Kremenek [Thu, 27 Mar 2008 06:17:42 +0000 (06:17 +0000)]
Added "HTMLDiagnostic", a generic DiagnosticClient (that also implements PathDiagnostic)
so that all diagnostics can be piped to HTML files instead of as text diagnostics using --html-diags.

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

16 years agoPathDiagnosticPiece no longer contains a vector of strings; just one string.
Ted Kremenek [Thu, 27 Mar 2008 06:16:40 +0000 (06:16 +0000)]
PathDiagnosticPiece no longer contains a vector of strings; just one string.
PathDiagnostic no longer contains a diagnostic ID or diagnostic level.

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

16 years agoFixed copy-paste error.
Ted Kremenek [Thu, 27 Mar 2008 05:52:45 +0000 (05:52 +0000)]
Fixed copy-paste error.

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

16 years agoAdded PathDiagnostic.[h,cpp] to Xcode project.
Ted Kremenek [Thu, 27 Mar 2008 03:50:10 +0000 (03:50 +0000)]
Added PathDiagnostic.[h,cpp] to Xcode project.

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

16 years agoAdded classes "PathDiagnosticPiece", "PathDiagnostic", and "PathDiagnosticClient...
Ted Kremenek [Thu, 27 Mar 2008 03:49:32 +0000 (03:49 +0000)]
Added classes "PathDiagnosticPiece", "PathDiagnostic", and "PathDiagnosticClient", which encapsulate diagnostic reporting for paths.

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

16 years agoIn ObjCMessageExpr: getSelector() const should just return "Selector", not "const...
Ted Kremenek [Thu, 27 Mar 2008 03:47:43 +0000 (03:47 +0000)]
In ObjCMessageExpr: getSelector() const should just return "Selector", not "const Selector&" because Selector is just a smart pointer.

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

16 years agoFix rewriter tests to work with new output file logic. This changes forces the output...
Steve Naroff [Wed, 26 Mar 2008 22:28:40 +0000 (22:28 +0000)]
Fix rewriter tests to work with new output file logic. This changes forces the output to standard out (rather than generate a .cpp file, which is the new default for the rewriter).

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

16 years agoBug fix: use GetRVal instead of GetLVal (were getting the value of a DeclRefExpr...
Ted Kremenek [Wed, 26 Mar 2008 22:21:58 +0000 (22:21 +0000)]
Bug fix: use GetRVal instead of GetLVal (were getting the value of a DeclRefExpr, not it's address).

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

16 years agoAdded test case for static analysis to warn about passing uninitialized values as...
Ted Kremenek [Wed, 26 Mar 2008 22:00:11 +0000 (22:00 +0000)]
Added test case for static analysis to warn about passing uninitialized values as arguments (not the receiver) in message expressions.

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

16 years agoAdded test case for static analyzer to detect uses of uninitialized pointers as recei...
Ted Kremenek [Wed, 26 Mar 2008 21:51:44 +0000 (21:51 +0000)]
Added test case for static analyzer to detect uses of uninitialized pointers as receivers in Objective-C message expressions.
Added test case directory "Analysis-Apple" which is only run on Apple (darwin) machines.

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

16 years agoBug fix in transfer function for ObjCMessageExpr: Visit the receiver expression as...
Ted Kremenek [Wed, 26 Mar 2008 21:36:08 +0000 (21:36 +0000)]
Bug fix in transfer function for ObjCMessageExpr: Visit the receiver expression as an ordinary expression, not using VisitLVal.

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

16 years agoAlloc redeclaration of typedefs within ExternCSystemHeaderDir's AND SystemHeaderDir's.
Steve Naroff [Wed, 26 Mar 2008 21:27:00 +0000 (21:27 +0000)]
Alloc redeclaration of typedefs within ExternCSystemHeaderDir's AND SystemHeaderDir's.

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

16 years agoallow the format attribute to be specified in function pointer prototypes
Nuno Lopes [Tue, 25 Mar 2008 23:01:48 +0000 (23:01 +0000)]
allow the format attribute to be specified in function pointer prototypes
# this is my first commit here, so please be gentle :)

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

16 years agoAdded hacked version of ccc script used to invoke the static analyzer. This
Ted Kremenek [Tue, 25 Mar 2008 22:35:32 +0000 (22:35 +0000)]
Added hacked version of ccc script used to invoke the static analyzer.  This
will gradually get pruned down, as it doesn't need to be as functional as
'ccc'.

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

16 years agoExtend QualType::getAddressSpace to do the right thing for array types, and in
Nate Begeman [Tue, 25 Mar 2008 18:36:32 +0000 (18:36 +0000)]
Extend QualType::getAddressSpace to do the right thing for array types, and in
the future, RecordTypes.

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

16 years agoAdd missing files
Nate Begeman [Tue, 25 Mar 2008 18:31:12 +0000 (18:31 +0000)]
Add missing files

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

16 years agoGRSimple analysis now outputs additional diagnostic warnings about
Ted Kremenek [Tue, 25 Mar 2008 16:40:05 +0000 (16:40 +0000)]
GRSimple analysis now outputs additional diagnostic warnings about
passing an uninitialized value to a message expresion.

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

16 years agoTweak to transfer function for ObjCMessageExpr: handle both instance methods
Ted Kremenek [Tue, 25 Mar 2008 16:07:41 +0000 (16:07 +0000)]
Tweak to transfer function for ObjCMessageExpr: handle both instance methods
and message expressions with a specified receiver.

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

16 years agoAdded logic to check for uninitialized values as the receivers for message expressions
Ted Kremenek [Tue, 25 Mar 2008 02:10:28 +0000 (02:10 +0000)]
Added logic to check for uninitialized values as the receivers for message expressions
and uninitialized values passed-by-value as arguments to message expressions.

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

16 years agoAdded initial transfer function support for ObjCMessageExpr.
Ted Kremenek [Tue, 25 Mar 2008 00:34:37 +0000 (00:34 +0000)]
Added initial transfer function support for ObjCMessageExpr.

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

16 years agoAdded "arg_iterators" to ObjCMessageExpr (for iterating over the arguments of a messa...
Ted Kremenek [Tue, 25 Mar 2008 00:16:48 +0000 (00:16 +0000)]
Added "arg_iterators" to ObjCMessageExpr (for iterating over the arguments of a message expression)

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

16 years agoMinor CSS tweaking: use webkit style CSS properties for shadows/rounded edges
Ted Kremenek [Mon, 24 Mar 2008 23:38:32 +0000 (23:38 +0000)]
Minor CSS tweaking: use webkit style CSS properties for shadows/rounded edges
for message bubbles.

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

16 years agoAdd a couple files to VC++ project and cleanup an "#if 0".
Steve Naroff [Mon, 24 Mar 2008 22:03:25 +0000 (22:03 +0000)]
Add a couple files to VC++ project and cleanup an "#if 0".

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

16 years agodebian amd64 testing
Andrew Lenharth [Mon, 24 Mar 2008 21:39:05 +0000 (21:39 +0000)]
debian amd64 testing

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

16 years agodebian ia32 testing
Andrew Lenharth [Mon, 24 Mar 2008 21:25:48 +0000 (21:25 +0000)]
debian ia32 testing

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

16 years agoAvoid overflowing buffer, patch by Algeris Kirtzidis!
Chris Lattner [Mon, 24 Mar 2008 21:14:55 +0000 (21:14 +0000)]
Avoid overflowing buffer, patch by Algeris Kirtzidis!

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

16 years agoThe newest version of valgrind, 3.3.0, no longer appends PIDs to log filenames
Sam Bishop [Sun, 23 Mar 2008 03:42:18 +0000 (03:42 +0000)]
The newest version of valgrind, 3.3.0, no longer appends PIDs to log filenames
by default.  Adding a %p works with this new version and is backwards
compatible, though it looks a little funny.

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

16 years agoChanged merge operation for uninitialized values analysis to "intersect" (previous...
Ted Kremenek [Sat, 22 Mar 2008 20:11:00 +0000 (20:11 +0000)]
Changed merge operation for uninitialized values analysis to "intersect" (previous union).

The effect is that if a variable is uninitialized along a branch (but initialized along another), at merge points it is considered uninitialized.  Previously we had the opposite behavior.  The new behavior is more conservative, and more in line with gcc's behavior.

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

16 years agoTeach the rewriter how to respect the -o option.
Chris Lattner [Sat, 22 Mar 2008 00:08:40 +0000 (00:08 +0000)]
Teach the rewriter how to respect the -o option.

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

16 years agofix this test.
Chris Lattner [Sat, 22 Mar 2008 00:07:50 +0000 (00:07 +0000)]
fix this test.

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

16 years agoRename "Nodify" to "MakeNode"
Ted Kremenek [Fri, 21 Mar 2008 21:30:14 +0000 (21:30 +0000)]
Rename "Nodify" to "MakeNode"

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

16 years agoOnly invoke the preprocessor; it's the only thing being tested. Also, check
Sam Bishop [Fri, 21 Mar 2008 08:05:55 +0000 (08:05 +0000)]
Only invoke the preprocessor; it's the only thing being tested.  Also, check
the output to make sure that the macros and comments are being treated as such.

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

16 years agoPlug a memory leak in the "this macro expands into a single trivially-
Sam Bishop [Fri, 21 Mar 2008 07:13:02 +0000 (07:13 +0000)]
Plug a memory leak in the "this macro expands into a single trivially-
expanded token" case.

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

16 years agoUse the -E option when invoking clang. Only the preprocessor is
Sam Bishop [Fri, 21 Mar 2008 07:02:04 +0000 (07:02 +0000)]
Use the -E option when invoking clang.  Only the preprocessor is
required to perform this test.

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

16 years agoAdd ability to run clang tests under valgrind. Patch by Sam Bishop.
Gabor Greif [Thu, 20 Mar 2008 22:50:54 +0000 (22:50 +0000)]
Add ability to run clang tests under valgrind. Patch by Sam Bishop.

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

16 years agoLiveVariables analysis now uses intersect for the merge of block-level expression...
Ted Kremenek [Thu, 20 Mar 2008 21:46:49 +0000 (21:46 +0000)]
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.

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

16 years agoUse make's -C option to enter directories.
Gabor Greif [Thu, 20 Mar 2008 14:43:48 +0000 (14:43 +0000)]
Use make's -C option to enter directories.

Also, do not try to remove build/ dir when
cleaning, this does not exist any more.

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

16 years agoreduce chattyness of makefiles
Gabor Greif [Thu, 20 Mar 2008 14:28:22 +0000 (14:28 +0000)]
reduce chattyness of makefiles

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

16 years agoscan testdirs only once, patch by Mike Stump, thanks!
Gabor Greif [Thu, 20 Mar 2008 08:09:10 +0000 (08:09 +0000)]
scan testdirs only once, patch by Mike Stump, thanks!

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

16 years agoAdded HTML highlighting for ranges.
Ted Kremenek [Wed, 19 Mar 2008 23:55:53 +0000 (23:55 +0000)]
Added HTML highlighting for ranges.

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

16 years agoFix typo.
Steve Naroff [Wed, 19 Mar 2008 23:46:26 +0000 (23:46 +0000)]
Fix typo.

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

16 years agoFix http://llvm.org/bugs/show_bug.cgi?id=2161.
Steve Naroff [Wed, 19 Mar 2008 23:07:49 +0000 (23:07 +0000)]
Fix http://llvm.org/bugs/show_bug.cgi?id=2161.

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

16 years agoChange colors of HTML message bubble.
Ted Kremenek [Wed, 19 Mar 2008 22:44:21 +0000 (22:44 +0000)]
Change colors of HTML message bubble.

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

16 years agoMore CSS enhancements to HTML code printing.
Ted Kremenek [Wed, 19 Mar 2008 22:06:25 +0000 (22:06 +0000)]
More CSS enhancements to HTML code printing.

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

16 years agoMisc. cleanups to HTML printing: make code rendered using tables; add
Ted Kremenek [Wed, 19 Mar 2008 21:59:05 +0000 (21:59 +0000)]
Misc. cleanups to HTML printing: make code rendered using tables; add
better div positioning for messages.

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

16 years agoMinor speed tweak per Chris's suggestion: use &S[0] instead of S.c_str().
Ted Kremenek [Wed, 19 Mar 2008 16:32:34 +0000 (16:32 +0000)]
Minor speed tweak per Chris's suggestion: use &S[0] instead of S.c_str().

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

16 years agoIntegrated some of Chris's comments; check for an empty string in InsertStrXXX()
Ted Kremenek [Wed, 19 Mar 2008 08:00:50 +0000 (08:00 +0000)]
Integrated some of Chris's comments; check for an empty string in InsertStrXXX()
before descending into the bowels of the Rewriter.

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

16 years agoInitial experimentation with adding boxed "annotations" to HTMLized source.
Ted Kremenek [Wed, 19 Mar 2008 07:53:42 +0000 (07:53 +0000)]
Initial experimentation with adding boxed "annotations" to HTMLized source.

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

16 years agoConvert tabs to spaces.
Ted Kremenek [Wed, 19 Mar 2008 07:31:52 +0000 (07:31 +0000)]
Convert tabs to spaces.

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

16 years agoMoved generation of html header/footer with builtin CSS to the rewriter library.
Ted Kremenek [Wed, 19 Mar 2008 06:14:37 +0000 (06:14 +0000)]
Moved generation of html header/footer with builtin CSS to the rewriter library.

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

16 years agosimplify code by using the variadic StructType::get method.
Chris Lattner [Wed, 19 Mar 2008 05:24:56 +0000 (05:24 +0000)]
simplify code by using the variadic StructType::get method.

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

16 years agosimplify the clang codegen by using the new Builder.CreateStructGEP method.
Chris Lattner [Wed, 19 Mar 2008 05:19:41 +0000 (05:19 +0000)]
simplify the clang codegen by using the new Builder.CreateStructGEP method.

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

16 years agoMore cleanups to the HTML rewriter (with line formatting), with better
Ted Kremenek [Wed, 19 Mar 2008 05:07:26 +0000 (05:07 +0000)]
More cleanups to the HTML rewriter (with line formatting), with better
pretty-printing of line numbers.

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

16 years agoAdded InsertStrXXX/InsertCStrXXX methods to the Rewriter to provide a simpler
Ted Kremenek [Wed, 19 Mar 2008 05:06:49 +0000 (05:06 +0000)]
Added InsertStrXXX/InsertCStrXXX methods to the Rewriter to provide a simpler
interface to the rewriter when clients have NULL terminated strings or std::string.

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

16 years agoChange "style" to "class" in HTML output.
Ted Kremenek [Wed, 19 Mar 2008 01:44:27 +0000 (01:44 +0000)]
Change "style" to "class" in HTML output.

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

16 years agoMore cleanups to HTML rewriter API: remove the InsertTag method; was too complicated
Ted Kremenek [Wed, 19 Mar 2008 01:30:02 +0000 (01:30 +0000)]
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.)

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

16 years agoMore HTML rewriter cleanups. Preliminary CSS support in code pretty-printing.
Ted Kremenek [Tue, 18 Mar 2008 23:55:46 +0000 (23:55 +0000)]
More HTML rewriter cleanups.  Preliminary CSS support in code pretty-printing.

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

16 years agoSome cleanups to the HTMLRewrite API. Added support for printing out line
Ted Kremenek [Tue, 18 Mar 2008 23:08:51 +0000 (23:08 +0000)]
Some cleanups to the HTMLRewrite API. Added support for printing out line
numbers (more work to be done on aesthetics).

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

16 years agoAdded HTML pretty-printer.
Ted Kremenek [Tue, 18 Mar 2008 22:21:07 +0000 (22:21 +0000)]
Added HTML pretty-printer.

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

16 years agoModified "InsertTag" (HTML rewriter) to have an optional "OutermostTag" flag to
Ted Kremenek [Tue, 18 Mar 2008 21:26:34 +0000 (21:26 +0000)]
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).

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

16 years agoAdded the beginning of a set of rewriter functions for pretty-printing source
Ted Kremenek [Tue, 18 Mar 2008 21:19:49 +0000 (21:19 +0000)]
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.

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

16 years agoAdded variant of "InsertText" in the Rewriter to support inserting text both
Ted Kremenek [Tue, 18 Mar 2008 21:17:59 +0000 (21:17 +0000)]
Added variant of "InsertText" in the Rewriter to support inserting text both
*before* and after a specific location.

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

16 years agoBug fix in RewriteBuffer::getMappedOffset: potentially multiple deltas
Ted Kremenek [Tue, 18 Mar 2008 21:00:57 +0000 (21:00 +0000)]
Bug fix in RewriteBuffer::getMappedOffset: potentially multiple deltas
need to be skipped over when AfterInserts == true, as multiple deltas
may share the same FileLoc.

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

16 years agoFix comment.
Ted Kremenek [Tue, 18 Mar 2008 20:13:06 +0000 (20:13 +0000)]
Fix comment.

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

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