]> granicus.if.org Git - clang/log
clang
16 years agorefactor interface to GenerateClassStructure to avoid converting a
Chris Lattner [Thu, 26 Jun 2008 04:47:04 +0000 (04:47 +0000)]
refactor interface to GenerateClassStructure to avoid converting a
string to LLVM IR and then regenerating the string from IR.

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

16 years agoremove the old getSelector implementation, which removes some
Chris Lattner [Thu, 26 Jun 2008 04:44:19 +0000 (04:44 +0000)]
remove the old getSelector implementation, which removes some
calls to getStringValue

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

16 years agoavoid a lot of unneeded selector processing work by passing around
Chris Lattner [Thu, 26 Jun 2008 04:42:20 +0000 (04:42 +0000)]
avoid a lot of unneeded selector processing work by passing around
selectors instead of Value*'s.

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

16 years agouse cheaper/simpler getselector call for @selector exprs.
Chris Lattner [Thu, 26 Jun 2008 04:38:58 +0000 (04:38 +0000)]
use cheaper/simpler getselector call for @selector exprs.

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

16 years agostart avoid doing lots of unneeded work handling selectors
Chris Lattner [Thu, 26 Jun 2008 04:37:12 +0000 (04:37 +0000)]
start avoid doing lots of unneeded work handling selectors

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

16 years agoimprove indentation, avoid thrashing on maps and recalculating strings as much.
Chris Lattner [Thu, 26 Jun 2008 04:24:57 +0000 (04:24 +0000)]
improve indentation, avoid thrashing on maps and recalculating strings as much.

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

16 years agogive CreateObjCRuntime a full CGM so it can get whatever state it needs,
Chris Lattner [Thu, 26 Jun 2008 04:19:03 +0000 (04:19 +0000)]
give CreateObjCRuntime a full CGM so it can get whatever state it needs,
instead of passing in just a couple random things it currently
happens to use.

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

16 years agoFix 80 col violations, assert on assumptions.
Chris Lattner [Thu, 26 Jun 2008 04:10:42 +0000 (04:10 +0000)]
Fix 80 col violations, assert on assumptions.

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

16 years agofix this testcase after Mon Ping's intrinsic rename.
Chris Lattner [Thu, 26 Jun 2008 04:06:27 +0000 (04:06 +0000)]
fix this testcase after Mon Ping's intrinsic rename.

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

16 years agoa temporary minimal hack to get clang building after the getStringValue changes in...
Chris Lattner [Thu, 26 Jun 2008 04:05:20 +0000 (04:05 +0000)]
a temporary minimal hack to get clang building after the getStringValue changes in llvm mainline.

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

16 years agoUpdated latest checker build to checker-45.
Ted Kremenek [Thu, 26 Jun 2008 00:04:08 +0000 (00:04 +0000)]
Updated latest checker build to checker-45.

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

16 years agoCF ref checker:
Ted Kremenek [Wed, 25 Jun 2008 21:21:56 +0000 (21:21 +0000)]
CF ref checker:

Tracked objects now have their type information tracked with them.

Enhanced summaries for ObjC methods to include the type information of the receiver.

Used the enhanced summaries to support the idiom that NSWindow owns itself (it sends a release message to itself upon close).

Added some comments.

Did some cleanups with the checker logic using operator overloading (reduced redundant code which I was concerned about being the source of bugs).

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

16 years agoAdd Profile method to QualType.
Ted Kremenek [Wed, 25 Jun 2008 17:24:26 +0000 (17:24 +0000)]
Add Profile method to QualType.

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

16 years agoUpdate VS project files.
Ted Kremenek [Wed, 25 Jun 2008 17:14:52 +0000 (17:14 +0000)]
Update VS project files.

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

16 years agoUpdate Xcode project.
Ted Kremenek [Wed, 25 Jun 2008 15:15:35 +0000 (15:15 +0000)]
Update Xcode project.

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

16 years agoThe assert at Sema::ObjCActOnStartOfMethodDef should check CurMethodDecl instead...
Argyrios Kyrtzidis [Wed, 25 Jun 2008 14:24:09 +0000 (14:24 +0000)]
The assert at Sema::ObjCActOnStartOfMethodDef should check CurMethodDecl instead of CurFunctionDecl.

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

16 years agoSet CXXClassVar to identifier namespace IDNS_Ordinary.
Argyrios Kyrtzidis [Wed, 25 Jun 2008 14:04:17 +0000 (14:04 +0000)]
Set CXXClassVar to identifier namespace IDNS_Ordinary.

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

16 years agoUpdated atomic intrinsic name from llvm r52706. Fixed dropped bit in shufps.
Mon P Wang [Wed, 25 Jun 2008 08:21:36 +0000 (08:21 +0000)]
Updated atomic intrinsic name from llvm r52706.  Fixed dropped bit in shufps.

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

16 years ago'Educate' IdentifierResolver about the declaration context of CXXFieldDecls.
Argyrios Kyrtzidis [Tue, 24 Jun 2008 23:08:34 +0000 (23:08 +0000)]
'Educate' IdentifierResolver about the declaration context of CXXFieldDecls.

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

16 years agoSet CXXMethod to identifier namespace IDNS_Ordinary.
Argyrios Kyrtzidis [Tue, 24 Jun 2008 22:56:42 +0000 (22:56 +0000)]
Set CXXMethod to identifier namespace IDNS_Ordinary.

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

16 years agoThe only caller of this knows that the current token is l_brace, so this can be an...
Argyrios Kyrtzidis [Tue, 24 Jun 2008 22:31:41 +0000 (22:31 +0000)]
The only caller of this knows that the current token is l_brace, so this can be an assert; suggestion by Chris.

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

16 years agoAdd parsing support for C++ classes.
Argyrios Kyrtzidis [Tue, 24 Jun 2008 22:12:16 +0000 (22:12 +0000)]
Add parsing support for C++ classes.

Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place.
Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass.

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

16 years ago"Support for Objective-C message sends which return structures. Also includes a...
Chris Lattner [Tue, 24 Jun 2008 17:04:18 +0000 (17:04 +0000)]
"Support for Objective-C message sends which return structures.  Also includes a small fix for constant string handling that should have been in the last patch (sorry!) and a hook for generating selectors (rest of this implementation to follow in the next patch)."

Patch by David Chisnall!

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

16 years ago"This is a small fix for a bug where static object instances were being incorrectly...
Chris Lattner [Tue, 24 Jun 2008 17:01:28 +0000 (17:01 +0000)]
"This is a small fix for a bug where static object instances were being incorrectly generated.  The bug was caused by my inability to read the GNU libobjc source and is only apparent when JITing code (static compilation does not expose the bug due to the data layout of other globals)."

Patch by David Chisnall!

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

16 years agoUpdate serialization for ObjCMessageExpr to handle additional bit-swizziling of recei...
Ted Kremenek [Tue, 24 Jun 2008 17:00:08 +0000 (17:00 +0000)]
Update serialization for ObjCMessageExpr to handle additional bit-swizziling of receiver information.

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

16 years agoObjCMessageExpr objects that represent messages to class methods now can contain...
Ted Kremenek [Tue, 24 Jun 2008 15:50:53 +0000 (15:50 +0000)]
ObjCMessageExpr objects that represent messages to class methods now can contain the ObjCInterfaceDecl* of the target class if it was available when the ObjCMessageExpr object was constructed.  The original interfaces of the class has been preserved (requiring no functionality changes from clients), but now a "getClasSInfo" method returns both the ObjCInterfaceDecl* and IdentifierInfo* of the target class.

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

16 years agoMove the namespace action declarations at the "C++ declarations" section.
Argyrios Kyrtzidis [Tue, 24 Jun 2008 11:23:36 +0000 (11:23 +0000)]
Move the namespace action declarations at the "C++ declarations" section.

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

16 years agoTest commit: changed the forward declaration of FieldDeclarator from class to struct...
Cedric Venet [Tue, 24 Jun 2008 09:09:38 +0000 (09:09 +0000)]
Test commit: changed the forward declaration of FieldDeclarator from class to struct to be coherent with its definition (DeclSpec.h)

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

16 years agoFix comments: "class method" should be "instance method" and vis versa
Ted Kremenek [Tue, 24 Jun 2008 04:44:10 +0000 (04:44 +0000)]
Fix comments: "class method" should be "instance method" and vis versa

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

16 years agoRemove unneeded method arguments.
Ted Kremenek [Tue, 24 Jun 2008 03:56:45 +0000 (03:56 +0000)]
Remove unneeded method arguments.

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

16 years agoCache ObjC summaries by IdentifierInfo*, not by ObjCInterfaceDecl.
Ted Kremenek [Tue, 24 Jun 2008 03:49:48 +0000 (03:49 +0000)]
Cache ObjC summaries by IdentifierInfo*, not by ObjCInterfaceDecl.

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

16 years agoPatch by Anders Bergh:
Ted Kremenek [Tue, 24 Jun 2008 03:33:47 +0000 (03:33 +0000)]
Patch by Anders Bergh:

'There's not much to say about this patch, it just adds the Arch Linux
gcc 4.3.1 header paths for i686 and amd64. The patch was generated
using "svn diff" with clang at revision 52660. The paths aren't
distribution-specific, so they should work for all Linux distributions
using the default(?) names like "i686-pc-linux-gnu".'

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

16 years agoAdded ObjCSummaryCache, a new summary cache object to cache summaries for Objective...
Ted Kremenek [Mon, 23 Jun 2008 23:30:29 +0000 (23:30 +0000)]
Added ObjCSummaryCache, a new summary cache object to cache summaries for Objective-C methods.  Instead of mapping from Selectors -> Summaries, we will now map from (ObjCInterfaceDecl*,Selectors) -> Summaries.  This will allow more nuanced summary generation.  This patch just swaps in the new data structure; the rest of the code works as before by allowing the ObjCInterfaceDecl* to be null.

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

16 years agoRename summary methods for "instance methods" to "class methods" (the names got screw...
Ted Kremenek [Mon, 23 Jun 2008 22:21:20 +0000 (22:21 +0000)]
Rename summary methods for "instance methods" to "class methods" (the names got screwed up).  No functionality change.

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

16 years agoUpdated latest checker build to checker-44.
Ted Kremenek [Mon, 23 Jun 2008 18:32:25 +0000 (18:32 +0000)]
Updated latest checker build to checker-44.

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

16 years agoThe CF retain/release checker now assumes that allocations do not fail. Eventually...
Ted Kremenek [Mon, 23 Jun 2008 18:02:52 +0000 (18:02 +0000)]
The CF retain/release checker now assumes that allocations do not fail.  Eventually we will add a flag to the driver to enable allocation failures (documented as a FIXME).

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

16 years agoUpdate VS project files. Patch by Cedric Venet!
Ted Kremenek [Mon, 23 Jun 2008 16:18:59 +0000 (16:18 +0000)]
Update VS project files.  Patch by Cedric Venet!

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

16 years agoadd a new clang::APValue class at Eli's request. It is a discriminated
Chris Lattner [Sun, 22 Jun 2008 05:45:53 +0000 (05:45 +0000)]
add a new clang::APValue class at Eli's request.  It is a discriminated
union between [potentially complex] APInt/APFloat.

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

16 years agoadd a fixme back
Chris Lattner [Sat, 21 Jun 2008 22:44:51 +0000 (22:44 +0000)]
add a fixme back

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

16 years ago"this patch adds code generation hooks for Objective-C constant strings. It also...
Chris Lattner [Sat, 21 Jun 2008 21:44:18 +0000 (21:44 +0000)]
"this patch adds code generation hooks for Objective-C constant strings.  It also modifies Sema so that Objective-C constant strings are treated as untyped objects if the interface for the constant string class can not be found.  This is consistent with Apple GCC.  I thought it was consistent with GNU GCC, since this was causing failures when trying to compile GNUstep with (GNU) GCC, but it appears that this is not the case when attempting to produce a simple test case to demonstrate it.  Possibly there is a way of making the error go away, but I haven't found out what it is yet."

Patch by David Chisnall!

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

16 years agoImplement printing for ObjCClassDecl's, patch by Jean-Daniel Dupas!
Chris Lattner [Sat, 21 Jun 2008 21:40:20 +0000 (21:40 +0000)]
Implement printing for ObjCClassDecl's, patch by Jean-Daniel Dupas!

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

16 years agoDon't add isa with @defs only to work around it in the code generator, patch
Chris Lattner [Sat, 21 Jun 2008 21:37:25 +0000 (21:37 +0000)]
Don't add isa with @defs only to work around it in the code generator, patch
by David Chisnall.

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

16 years ago"This moves built-in Objective-C types up the scope chains to where they can be repla...
Chris Lattner [Sat, 21 Jun 2008 20:20:39 +0000 (20:20 +0000)]
"This moves built-in Objective-C types up the scope chains to where they can be replaced by versions included from the runtime library's headers."

This makes it ok to use @"foo" without a declaration for NSConstantString.

Patch by David Chisnall!

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

16 years agoadd parser and sema support for the funny ObjC '@defs' thing.
Chris Lattner [Sat, 21 Jun 2008 19:39:06 +0000 (19:39 +0000)]
add parser and sema support for the funny ObjC '@defs' thing.
Patch by David Chisnall!

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

16 years agoremove dead enums.
Chris Lattner [Sat, 21 Jun 2008 18:06:44 +0000 (18:06 +0000)]
remove dead enums.

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

16 years agoSwitch 'super' from being a weird cast thing to being a predefined expr node.
Chris Lattner [Sat, 21 Jun 2008 18:04:54 +0000 (18:04 +0000)]
Switch 'super' from being a weird cast thing to being a predefined expr node.
Patch by David Chisnall with objc rewriter and stmtdumper updates from me.

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

16 years ago"This maps the -pthread option to -lpthread - this isn't 100% correct,
Chris Lattner [Sat, 21 Jun 2008 17:46:11 +0000 (17:46 +0000)]
"This maps the -pthread option to -lpthread - this isn't 100% correct,
since handling this correctly is quite complex, and on some platforms
requires additional -D options and on some implies linking against a
different libc, but this works better than just ignoring the option.

The other change passes the -x option across to clang, which allows
compiling .c files as Objective-C and so on.  For some reason a lot of
configure scripts seem to be under the misguided impression that this
is a sensible thing to do."

Patch by David Chisnall!

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

16 years agoInclude stdint.h instead of stdio.h.
Ted Kremenek [Sat, 21 Jun 2008 17:20:55 +0000 (17:20 +0000)]
Include stdint.h instead of stdio.h.

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

16 years agoK&R-style functions not allowed in C++.
Argyrios Kyrtzidis [Sat, 21 Jun 2008 10:00:56 +0000 (10:00 +0000)]
K&R-style functions not allowed in C++.

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

16 years agoUpdated latest static analyzer builder to checker-43.
Ted Kremenek [Fri, 20 Jun 2008 23:22:15 +0000 (23:22 +0000)]
Updated latest static analyzer builder to checker-43.

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

16 years agoTest the dead-store checker using both -warn-dead-stores and -checker-simple.
Ted Kremenek [Fri, 20 Jun 2008 23:14:52 +0000 (23:14 +0000)]
Test the dead-store checker using both -warn-dead-stores and -checker-simple.

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

16 years agoWhen using the dead-stores checker with the BugReporter class, properly capture the...
Ted Kremenek [Fri, 20 Jun 2008 23:13:39 +0000 (23:13 +0000)]
When using the dead-stores checker with the BugReporter class, properly capture the diagnostic associated with a specific warning and emit it.

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

16 years agoUpdated latest checker build.
Ted Kremenek [Fri, 20 Jun 2008 21:56:47 +0000 (21:56 +0000)]
Updated latest checker build.

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

16 years agoUpdated call to dead stores to use proper arguments.
Ted Kremenek [Fri, 20 Jun 2008 21:55:29 +0000 (21:55 +0000)]
Updated call to dead stores to use proper arguments.

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

16 years agoUpdated latest static analyzer build to checker-41.
Ted Kremenek [Fri, 20 Jun 2008 21:54:57 +0000 (21:54 +0000)]
Updated latest static analyzer build to checker-41.

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

16 years agoUpdated Xcode project.
Ted Kremenek [Fri, 20 Jun 2008 21:46:17 +0000 (21:46 +0000)]
Updated Xcode project.

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

16 years agoModified the dead stores checker to...
Ted Kremenek [Fri, 20 Jun 2008 21:45:25 +0000 (21:45 +0000)]
Modified the dead stores checker to...

1) Check if a dead store appears as a subexpression.  For such cases, we emit
   a verbose diagnostic so that users aren't confused.  This addresses:

   <rdar://problem/5968508> checker gives misleading report for dead store in loop

2) Don't emit a dead store warning when assigning a null value to a pointer.
   This is a common form of defensive programming.  We may wish to make
   this an option to the the checker one day.

   This addresses the feature request in the following email:

   http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-June/001978.html

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

16 years agoAdded ParentMap, a class to represent a lazily constructed mapping from child to...
Ted Kremenek [Fri, 20 Jun 2008 21:40:36 +0000 (21:40 +0000)]
Added ParentMap, a class to represent a lazily constructed mapping from child to parents.

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

16 years agoAdded "Decl::getCodyBody()", a virtual method that returns the root AST node (Stmt...
Ted Kremenek [Fri, 20 Jun 2008 21:39:47 +0000 (21:39 +0000)]
Added "Decl::getCodyBody()", a virtual method that returns the root AST node (Stmt*) that the Decl wraps (if any).  Currently this only returns a non-null value for FunctionDecl and ObjCMethodDecl.

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

16 years agoUpdated latest static analysis build.
Ted Kremenek [Thu, 19 Jun 2008 23:20:00 +0000 (23:20 +0000)]
Updated latest static analysis build.

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

16 years agoAdd DTD information.
Ted Kremenek [Thu, 19 Jun 2008 23:14:24 +0000 (23:14 +0000)]
Add DTD information.

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

16 years agoRemove tabs.
Mike Stump [Thu, 19 Jun 2008 20:57:50 +0000 (20:57 +0000)]
Remove tabs.

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

16 years agoOne more test checkin.
Mike Stump [Thu, 19 Jun 2008 19:52:46 +0000 (19:52 +0000)]
One more test checkin.

Remove an extra space at the end of a line.

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

16 years agoTest commit to see if new account works.
Mike Stump [Thu, 19 Jun 2008 19:28:49 +0000 (19:28 +0000)]
Test commit to see if new account works.

I choose to remove extraneous whitespace at end of lines as a semantic
nop for the test.

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

16 years agoIntroduce initial transfer function support for __imag__ and __real__. We don't
Ted Kremenek [Thu, 19 Jun 2008 17:55:38 +0000 (17:55 +0000)]
Introduce initial transfer function support for __imag__ and __real__. We don't
have complex RValues yet, so this logic is only fully implemented when __imag__
and __real__ are used on non-complex types.

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

16 years agoUpdated static analyzer build to checker-39.
Ted Kremenek [Wed, 18 Jun 2008 05:43:24 +0000 (05:43 +0000)]
Updated static analyzer build to checker-39.

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

16 years agoAdded a new ProgramPoint: PostPurgeDeadSymbols. This new program point distinguishes...
Ted Kremenek [Wed, 18 Jun 2008 05:34:07 +0000 (05:34 +0000)]
Added a new ProgramPoint: PostPurgeDeadSymbols.  This new program point distinguishes between the cases when we just evaluated the transfer function of a Stmt* (PostStmt) or performed a load (PostLoad).  This solves a caching bug observed in a recent bug report.

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

16 years agoUpdate website link to latest checker build.
Ted Kremenek [Tue, 17 Jun 2008 19:23:54 +0000 (19:23 +0000)]
Update website link to latest checker build.

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

16 years agoFix non-termination bug reported by Thomas Clement!
Ted Kremenek [Tue, 17 Jun 2008 19:14:06 +0000 (19:14 +0000)]
Fix non-termination bug reported by Thomas Clement!

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

16 years agoChange self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.
Chris Lattner [Tue, 17 Jun 2008 18:05:57 +0000 (18:05 +0000)]
Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.
Patch by David Chisnall!

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

16 years agohandle -arch and -isysroot correctly (like ccc-analyszer do).
Nuno Lopes [Tue, 17 Jun 2008 17:23:14 +0000 (17:23 +0000)]
handle -arch and -isysroot correctly (like ccc-analyszer do).
Patch by Filipe Cabecinhas

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

16 years agoAdded link to Developer Meeting.
Ted Kremenek [Tue, 17 Jun 2008 14:02:30 +0000 (14:02 +0000)]
Added link to Developer Meeting.

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

16 years agoFlush bullets in <ul>
Ted Kremenek [Tue, 17 Jun 2008 13:55:34 +0000 (13:55 +0000)]
Flush bullets in <ul>

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

16 years agoConvert <h4> to <h3>.
Ted Kremenek [Tue, 17 Jun 2008 13:48:36 +0000 (13:48 +0000)]
Convert <h4> to <h3>.

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

16 years agoTighten <h2> padding.
Ted Kremenek [Tue, 17 Jun 2008 13:48:17 +0000 (13:48 +0000)]
Tighten <h2> padding.

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

16 years agoSimplify anchor.
Ted Kremenek [Tue, 17 Jun 2008 13:47:52 +0000 (13:47 +0000)]
Simplify anchor.

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

16 years agoRemove margin above <h1>.
Ted Kremenek [Tue, 17 Jun 2008 07:05:45 +0000 (07:05 +0000)]
Remove margin above <h1>.

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

16 years agoMake "important notes" more succinct.
Ted Kremenek [Tue, 17 Jun 2008 06:47:58 +0000 (06:47 +0000)]
Make "important notes" more succinct.

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

16 years agoInclude the "latest build" checker link using SSI.
Ted Kremenek [Tue, 17 Jun 2008 06:43:11 +0000 (06:43 +0000)]
Include the "latest build" checker link using SSI.

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

16 years agoSplit static analysis page into two pages: a high-level information page (with quick...
Ted Kremenek [Tue, 17 Jun 2008 06:38:07 +0000 (06:38 +0000)]
Split static analysis page into two pages: a high-level information page (with quick download links) and a usage page.

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

16 years agoTweak font sizes.
Ted Kremenek [Tue, 17 Jun 2008 06:36:13 +0000 (06:36 +0000)]
Tweak font sizes.
Color <h3> light blue, <h2> a dark grey.

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

16 years agoConvert <h2> -> <h3>. <h1> -> <h2> (more consistent with other pages)
Ted Kremenek [Tue, 17 Jun 2008 06:35:36 +0000 (06:35 +0000)]
Convert <h2> -> <h3>.  <h1> -> <h2>  (more consistent with other pages)

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

16 years agoMake this test actually pass, in addition to the previous patch
Eli Friedman [Tue, 17 Jun 2008 05:36:46 +0000 (05:36 +0000)]
Make this test actually pass, in addition to the previous patch
which made it work.

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

16 years agoFix more strict-aliasing warnings.
Ted Kremenek [Tue, 17 Jun 2008 03:11:08 +0000 (03:11 +0000)]
Fix more strict-aliasing warnings.
Fix indentation of class declarations in ExprCXX.h

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

16 years agoOnly use colored output when the environment variable SCAN_BUILD_COLOR is set.
Ted Kremenek [Tue, 17 Jun 2008 03:06:59 +0000 (03:06 +0000)]
Only use colored output when the environment variable SCAN_BUILD_COLOR is set.

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

16 years agoThis patch is motivated by numerous strict-aliasing warnings when compiling
Ted Kremenek [Tue, 17 Jun 2008 02:43:46 +0000 (02:43 +0000)]
This patch is motivated by numerous strict-aliasing warnings when compiling
clang as a Release build.

The big change is that all AST nodes (subclasses of Stmt) whose children are
Expr* store their children as Stmt* or arrays of Stmt*. This is to remove
strict-aliasing warnings when using StmtIterator. None of the interfaces of any
of the classes have changed (except those with arg_iterators, see below), as the
accessor methods introduce the needed casts (via cast<>). While this extra
casting may seem cumbersome, it actually adds some important sanity checks
throughout the codebase, as clients using StmtIterator can potentially overwrite
children that are expected to be Expr* with Stmt* (that aren't Expr*). The casts
provide extra sanity checks that are operational in debug builds to catch
invariant violations such as these.

For classes that have arg_iterators (e.g., CallExpr), the definition of
arg_iterator has been replaced. Instead of it being Expr**, it is an actual
class (called ExprIterator) that wraps a Stmt**, and provides the necessary
operators for iteration. The nice thing about this class is that it also uses
cast<> to type-checking, which introduces extra sanity checks throughout the
codebase that are useful for debugging.

A few of the CodeGen functions that use arg_iterator (especially from
OverloadExpr) have been modified to take begin and end iterators instead of a
base Expr** and the number of arguments. This matches more with the abstraction
of iteration. This still needs to be cleaned up a little bit, as clients expect
that ExprIterator is a RandomAccessIterator (which we may or may not wish to
allow for efficiency of representation).

This is a fairly large patch. It passes the tests (except CodeGen/bitfield.c,
which was already broken) on both a Debug and Release build, but it should
obviously be reviewed.

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

16 years agoSilence uninitialized value warning in Release build.
Ted Kremenek [Mon, 16 Jun 2008 23:46:27 +0000 (23:46 +0000)]
Silence uninitialized value warning in Release build.

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

16 years agoSilence uninitialized value warning during Release build.
Ted Kremenek [Mon, 16 Jun 2008 23:45:12 +0000 (23:45 +0000)]
Silence uninitialized value warning during Release build.

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

16 years agoRemove debugging message in ccc-analyzer.
Ted Kremenek [Mon, 16 Jun 2008 22:40:14 +0000 (22:40 +0000)]
Remove debugging message in ccc-analyzer.
Add color diagnostics from scan-build, and indicate the number of bugs found (if any).

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

16 years agoLatest release is checker-37.
Ted Kremenek [Mon, 16 Jun 2008 21:46:12 +0000 (21:46 +0000)]
Latest release is checker-37.

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

16 years agoRe-enable the analyzer.
Ted Kremenek [Mon, 16 Jun 2008 21:41:07 +0000 (21:41 +0000)]
Re-enable the analyzer.

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

16 years agoRemove Analysis-Apple.
Ted Kremenek [Mon, 16 Jun 2008 21:21:48 +0000 (21:21 +0000)]
Remove Analysis-Apple.

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

16 years agoMove test case "uninit-msg-expr.m" from Analysis-Apple to Analysis (now works on...
Ted Kremenek [Mon, 16 Jun 2008 21:15:29 +0000 (21:15 +0000)]
Move test case "uninit-msg-expr.m" from Analysis-Apple to Analysis (now works on all platforms).

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

16 years agoMoved test case NoReturn.m from Analysis-Apple to Analysis (now works on all platforms).
Ted Kremenek [Mon, 16 Jun 2008 21:05:04 +0000 (21:05 +0000)]
Moved test case NoReturn.m from Analysis-Apple to Analysis (now works on all platforms).

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

16 years agoMove NSString.m test case from Analysis-Apple to Analysis. The test case now works...
Ted Kremenek [Mon, 16 Jun 2008 20:37:30 +0000 (20:37 +0000)]
Move NSString.m test case from Analysis-Apple to Analysis.  The test case now works on all platforms.

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

16 years agoUpdate test case to use -pedantic (makes the test case more clear).
Ted Kremenek [Mon, 16 Jun 2008 19:53:46 +0000 (19:53 +0000)]
Update test case to use -pedantic (makes the test case more clear).

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

16 years agoFix misspelling of "svelte".
Ted Kremenek [Mon, 16 Jun 2008 19:51:41 +0000 (19:51 +0000)]
Fix misspelling of "svelte".

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

16 years agoMove Analysis-Apple/CFString.c to Analysis (the test case now works on all platforms).
Ted Kremenek [Mon, 16 Jun 2008 19:35:31 +0000 (19:35 +0000)]
Move Analysis-Apple/CFString.c to Analysis (the test case now works on all platforms).

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

16 years agoMove CFDateGC.m test case from Analysis-Apple to Analysis (it now runs on all platforms).
Ted Kremenek [Mon, 16 Jun 2008 18:46:17 +0000 (18:46 +0000)]
Move CFDateGC.m test case from Analysis-Apple to Analysis (it now runs on all platforms).

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

16 years agoMoved CFDate.m from test/Analysis-Apple to test/Analysis, and added the necessary...
Ted Kremenek [Mon, 16 Jun 2008 18:34:22 +0000 (18:34 +0000)]
Moved CFDate.m from test/Analysis-Apple to test/Analysis, and added the necessary declarations from Foundation.h to CFDate.m so that the test case can be exercised on all platforms.

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