]> granicus.if.org Git - clang/log
clang
16 years agomore minor tidiness.
Chris Lattner [Sat, 28 Jun 2008 23:50:44 +0000 (23:50 +0000)]
more minor tidiness.

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

16 years agomore cleanups, refactor HandleVectorTypeAttribute
Chris Lattner [Sat, 28 Jun 2008 23:48:25 +0000 (23:48 +0000)]
more cleanups, refactor HandleVectorTypeAttribute
to work list the rest of the attr handlers.  Also, rename
it to HandleVectorSizeAttribute to match its attr name.
No functionality change.

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

16 years agoadjust the prototypes of a bunch of decl processing methods to take
Chris Lattner [Sat, 28 Jun 2008 23:36:30 +0000 (23:36 +0000)]
adjust the prototypes of a bunch of decl processing methods to take
the single attribute they look at by reference instead of by pointer.
This is a subtle indicator that they take the specified attribute, not
a whole list of them.

This also make HandleExtVectorTypeAttribute work the same way as the rest
of the attributes, adds some comments etc. No functionality change.

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

16 years agoHandle unnamed bitfields when parsing C++ classes.
Argyrios Kyrtzidis [Sat, 28 Jun 2008 08:10:48 +0000 (08:10 +0000)]
Handle unnamed bitfields when parsing C++ classes.

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

16 years agoFix for PR2501; this patch makes usual arithmetic conversions for
Eli Friedman [Sat, 28 Jun 2008 06:23:08 +0000 (06:23 +0000)]
Fix for PR2501; this patch makes usual arithmetic conversions for
integers which have the same width and different signedness work
correctly. (The testcase in PR2501 uses a comparison between long and
unsigned int).

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

16 years agoReplace CurFunctionDecl and CurMethodDecl with methods getCurFunctionDecl() and getCu...
Argyrios Kyrtzidis [Sat, 28 Jun 2008 06:07:14 +0000 (06:07 +0000)]
Replace CurFunctionDecl and CurMethodDecl with methods getCurFunctionDecl() and getCurMethodDecl() that return the appropriate Decl through CurContext.

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

16 years agoUpdated checker build to checker-47.
Ted Kremenek [Sat, 28 Jun 2008 00:13:07 +0000 (00:13 +0000)]
Updated checker build to checker-47.

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

16 years agoFix a bug where we didn't promote 'const float' (or typedefs) to
Chris Lattner [Fri, 27 Jun 2008 22:48:56 +0000 (22:48 +0000)]
Fix a bug where we didn't promote 'const float' (or typedefs) to
double in some places.

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

16 years agothe 'mode' attribute is a decl attribute, not a type attribute. Move it to
Chris Lattner [Fri, 27 Jun 2008 22:18:37 +0000 (22:18 +0000)]
the 'mode' attribute is a decl attribute, not a type attribute.  Move it to
SemaDeclAttr, and do some cleanups.

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

16 years agoNuno points out that my numbers were out of date
Chris Lattner [Fri, 27 Jun 2008 21:56:03 +0000 (21:56 +0000)]
Nuno points out that my numbers were out of date

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

16 years agomaking progress!
Chris Lattner [Fri, 27 Jun 2008 19:02:23 +0000 (19:02 +0000)]
making progress!

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

16 years agoAdd missing include file (due to a file splitting in llvm).
Cedric Venet [Fri, 27 Jun 2008 17:53:02 +0000 (17:53 +0000)]
Add missing include file (due to a file splitting in llvm).
Add new file to Sema Project for VS.
this unbreak the build for VS2005 (with the associated patch on llvm).

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

16 years agoAdded a simple static analysis check to look for improper uses of CFCreateNumber.
Ted Kremenek [Thu, 26 Jun 2008 23:59:48 +0000 (23:59 +0000)]
Added a simple static analysis check to look for improper uses of CFCreateNumber.

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

16 years agomove decl attribute processing to a new SemaDeclAttr.cpp.
Chris Lattner [Thu, 26 Jun 2008 18:38:35 +0000 (18:38 +0000)]
move decl attribute processing to a new SemaDeclAttr.cpp.

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

16 years agoUpdate Xcode project so that the clang target depends on LLVMAnalysis.a
Ted Kremenek [Thu, 26 Jun 2008 17:53:57 +0000 (17:53 +0000)]
Update Xcode project so that the clang target depends on LLVMAnalysis.a

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

16 years agoclang uses the llvm backend, so define __llvm__ like llvm-gcc.
Chris Lattner [Thu, 26 Jun 2008 17:26:01 +0000 (17:26 +0000)]
clang uses the llvm backend, so define __llvm__ like llvm-gcc.
Additionally, define __clang__ so clients can predicate based on
clang features.

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

16 years agoAnother class -> struct in declaration to match definition.
Cedric Venet [Thu, 26 Jun 2008 12:50:52 +0000 (12:50 +0000)]
Another class -> struct in declaration to match definition.

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

16 years agoMake clang work on 32 bit powerpc linux.
Matthijs Kooijman [Thu, 26 Jun 2008 08:39:30 +0000 (08:39 +0000)]
Make clang work on 32 bit powerpc linux.

Patch by Nick Lewycky!

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

16 years agoLink in LLVMAnalysis after LLVMCodeGen, since the latter depends on the former
Matthijs Kooijman [Thu, 26 Jun 2008 08:37:29 +0000 (08:37 +0000)]
Link in LLVMAnalysis after LLVMCodeGen, since the latter depends on the former
since LLVM r52748.

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

16 years agoMake Declarator::getDeclSpec() return a const reference to avoid
Chris Lattner [Thu, 26 Jun 2008 06:49:43 +0000 (06:49 +0000)]
Make Declarator::getDeclSpec() return a const reference to avoid
cases where mutation can introduce bugs.  Propagate around 'const'.

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

16 years agoadd a comment about something that was surprising, at least to me.
Chris Lattner [Thu, 26 Jun 2008 06:39:41 +0000 (06:39 +0000)]
add a comment about something that was surprising, at least to me.

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

16 years agorename some attr tests for consistency.
Chris Lattner [Thu, 26 Jun 2008 06:32:02 +0000 (06:32 +0000)]
rename some attr tests for consistency.

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

16 years agofix a bug handling type attributes in the declspec. declspec processing
Chris Lattner [Thu, 26 Jun 2008 06:27:57 +0000 (06:27 +0000)]
fix a bug handling type attributes in the declspec.  declspec processing
used to mutate the attribute list for declspecs when the type was
converted, breaking the case where one declspec was shared by multiple
declarators.

This fixes rdar://6032532.

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

16 years agoanother const correctness bug with declspec.
Chris Lattner [Thu, 26 Jun 2008 06:11:04 +0000 (06:11 +0000)]
another const correctness bug with declspec.

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

16 years agofix const correctness of accessor.
Chris Lattner [Thu, 26 Jun 2008 06:07:52 +0000 (06:07 +0000)]
fix const correctness of accessor.

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

16 years agorefactor more objc codegen interfaces to pass around selectors so
Chris Lattner [Thu, 26 Jun 2008 05:08:00 +0000 (05:08 +0000)]
refactor more objc codegen interfaces to pass around selectors so
we don't push strings into LLVM IR and then have to read them back out.

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

16 years agoindenting and other minor things.
Chris Lattner [Thu, 26 Jun 2008 04:52:29 +0000 (04:52 +0000)]
indenting and other minor things.

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

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