]> granicus.if.org Git - clang/log
clang
16 years agoFix the setup of CodeGen/bitfield.c test.
Argyrios Kyrtzidis [Tue, 10 Jun 2008 15:48:26 +0000 (15:48 +0000)]
Fix the setup of CodeGen/bitfield.c test.
Due to the broken setup it was passing the test while it should have failed.

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

16 years agoFix the run line for this test.
Eli Friedman [Tue, 10 Jun 2008 05:18:06 +0000 (05:18 +0000)]
Fix the run line for this test.

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

16 years agoMake this test C instead of C++; making it C++ causes a failure on Linux
Eli Friedman [Tue, 10 Jun 2008 05:14:31 +0000 (05:14 +0000)]
Make this test C instead of C++; making it C++ causes a failure on Linux
because clang can't parse stdio.h in C++ mode yet.

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

16 years agoDon't include complex.h or tgmath.h for this test; they aren't needed,
Eli Friedman [Tue, 10 Jun 2008 05:09:36 +0000 (05:09 +0000)]
Don't include complex.h or tgmath.h for this test; they aren't needed,
and including tgmath.h causes the test to fail for no good reason.

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

16 years agoFix getTrueExpr for ConditionalOperator to actually work. No testcase
Eli Friedman [Tue, 10 Jun 2008 05:00:13 +0000 (05:00 +0000)]
Fix getTrueExpr for ConditionalOperator to actually work.  No testcase
because it's currently unused.

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

16 years ago-Add DeclChain member to DeclContext.
Argyrios Kyrtzidis [Tue, 10 Jun 2008 01:32:09 +0000 (01:32 +0000)]
-Add DeclChain member to DeclContext.
-ScopedDecls get chained to their DeclContext.
-DeclContext's DeclChain replaces FunctionDecl's DeclChain and EnumDecl's ElementList.

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

16 years agoMake CodeGenFunction::EmitDecl() recognise CXXClass/CXXStruct/CXXUnion.
Argyrios Kyrtzidis [Mon, 9 Jun 2008 23:42:47 +0000 (23:42 +0000)]
Make CodeGenFunction::EmitDecl() recognise CXXClass/CXXStruct/CXXUnion.

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

16 years agoDump the name of CXXStruct/CXXUnion/CXXClass Decl subclasses.
Argyrios Kyrtzidis [Mon, 9 Jun 2008 23:36:53 +0000 (23:36 +0000)]
Dump the name of CXXStruct/CXXUnion/CXXClass Decl subclasses.

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

16 years ago-Changes to TagDecl:
Argyrios Kyrtzidis [Mon, 9 Jun 2008 23:19:58 +0000 (23:19 +0000)]
-Changes to TagDecl:
  Added TagKind enum.
  Added getTagKind() method.
  Added convenience methods: isEnum(), isStruct(), isUnion(), isClass().
-RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one.

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

16 years agoAdded new C++ AST Decl subclasses.
Argyrios Kyrtzidis [Mon, 9 Jun 2008 21:05:31 +0000 (21:05 +0000)]
Added new C++ AST Decl subclasses.

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

16 years agoGet -serialize working again, plus a bit of minor cleanup.
Eli Friedman [Mon, 9 Jun 2008 20:02:51 +0000 (20:02 +0000)]
Get -serialize working again, plus a bit of minor cleanup.

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

16 years agoAdded link to Mac OS X builds. Provide instructions for those not using Mac OS X.
Ted Kremenek [Mon, 9 Jun 2008 14:30:01 +0000 (14:30 +0000)]
Added link to Mac OS X builds.  Provide instructions for those not using Mac OS X.

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

16 years agoSprinkle some "-o -" clang options to make the examples work.
Matthijs Kooijman [Mon, 9 Jun 2008 14:09:10 +0000 (14:09 +0000)]
Sprinkle some "-o -" clang options to make the examples work.

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

16 years agoAdd redirection page.
Ted Kremenek [Mon, 9 Jun 2008 13:38:32 +0000 (13:38 +0000)]
Add redirection page.

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

16 years agoGenerate debug descriptors for array types while generating the debug info.
Sanjiv Gupta [Mon, 9 Jun 2008 10:47:41 +0000 (10:47 +0000)]
Generate debug descriptors for array types while generating the debug info.

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

16 years agoAdd code to make test/CodeGen/struct-init.c work correctly without the
Eli Friedman [Mon, 9 Jun 2008 05:05:07 +0000 (05:05 +0000)]
Add code to make test/CodeGen/struct-init.c work correctly without the
pointer cast hack currently in isIntegerConstantExpr
(in lib/AST/Expr.cpp).  Also removes an odd test that even gcc doesn't accept.

The reason the pointer cast hack is relevant here is that it makes Sema
end up misinterpreting the relevant expression as a null pointer constant.

The reason for this patch is that I plan to remove the pointer cast hack
sometime soon because it causes strange issues, especially in its
current form; see my recent email to cfe-dev
"[PATCH] add constant expression evaluation to the AST and fix PR2413".

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

16 years agoFor struct initialization, check compatibility with the unqualified
Eli Friedman [Mon, 9 Jun 2008 03:52:40 +0000 (03:52 +0000)]
For struct initialization, check compatibility with the unqualified
type; this isn't explicitly stated in the standard, but it doesn't
really make sense for them to have an effect here.  Fixes the included
testcase, sent to me by Steve Naroff.

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

16 years agoSince this isn't linked from anywhere yet, I'm taking the opportunity
Chris Lattner [Sun, 8 Jun 2008 21:55:32 +0000 (21:55 +0000)]
Since this isn't linked from anywhere yet, I'm taking the opportunity
to move it to a more stable URL.  If the S-A work grows, this will be
the entrypoint for the pages related to it.

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

16 years agoimplement the alias attirbute (in both Sema and Codegen)
Nuno Lopes [Sun, 8 Jun 2008 15:45:52 +0000 (15:45 +0000)]
implement the alias attirbute (in both Sema and Codegen)

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

16 years agofix compiler warnings
Nuno Lopes [Sun, 8 Jun 2008 10:16:34 +0000 (10:16 +0000)]
fix compiler warnings

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

16 years agoDon't crash emitting an initializer for a static local with union type.
Eli Friedman [Sun, 8 Jun 2008 01:23:18 +0000 (01:23 +0000)]
Don't crash emitting an initializer for a static local with union type.
This fix just makes sure to construct the global with the appropriate
type, and fixes up the one user this affects to compensate.

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

16 years agoEnable the rewriter tests on all platforms; there don't appear to
Eli Friedman [Sat, 7 Jun 2008 23:20:33 +0000 (23:20 +0000)]
Enable the rewriter tests on all platforms; there don't appear to
be any regressions from this on my machine, but please let me know if
you run into issues.  (The idea here is that it's better to run all
tests on all platforms if at all possible.)

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

16 years agoDon't include objc.h, so the rewriter tests work on machines without it.
Eli Friedman [Sat, 7 Jun 2008 23:15:03 +0000 (23:15 +0000)]
Don't include objc.h, so the rewriter tests work on machines without it.

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

16 years agocapture whether a CharacterLiteral was wide or not in the AST.
Chris Lattner [Sat, 7 Jun 2008 22:35:38 +0000 (22:35 +0000)]
capture whether a CharacterLiteral was wide or not in the AST.
Patch by Mike Stump!

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

16 years agoFix ast dumping to work with long double literals, e.g. we dump:
Chris Lattner [Sat, 7 Jun 2008 22:13:43 +0000 (22:13 +0000)]
Fix ast dumping to work with long double literals, e.g. we dump:

long double X() { return 1.0L; }

as:

long double X()
(CompoundStmt 0xb06a00 <t.c:2:17, col:32>
  (ReturnStmt 0xb068d0 <col:19, col:26>
    (FloatingLiteral 0xb02cf0 <col:26> 'long double' 1.000000)))

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

16 years agoMark the right ctor explicit, patch by Cédric Venet
Chris Lattner [Sat, 7 Jun 2008 19:56:57 +0000 (19:56 +0000)]
Mark the right ctor explicit, patch by Cédric Venet

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

16 years agoFix crash with conversion to an address-space-qualified pointer. Bug
Eli Friedman [Sat, 7 Jun 2008 17:27:51 +0000 (17:27 +0000)]
Fix crash with conversion to an address-space-qualified pointer.  Bug
reported on cfe-dev by Cédric Venet.

Note that I seriously doubt that this perticular construct is useful,
though: it's a pointer in an alternate address space pointing into
unqualified address space.

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

16 years agoFix the line endings in the newly added DeclBase.cpp.
Eli Friedman [Sat, 7 Jun 2008 16:52:53 +0000 (16:52 +0000)]
Fix the line endings in the newly added DeclBase.cpp.

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

16 years agoFix Visual Studio project files; patch by Cédric Venet.
Eli Friedman [Sat, 7 Jun 2008 16:34:27 +0000 (16:34 +0000)]
Fix Visual Studio project files; patch by Cédric Venet.

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

16 years agoCreate debug type descriptors for aggregate/enum types.
Sanjiv Gupta [Sat, 7 Jun 2008 04:46:53 +0000 (04:46 +0000)]
Create debug type descriptors for aggregate/enum types.

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

16 years agoUse a common SourceManager when processing multiple files. This allows us to cache...
Ted Kremenek [Fri, 6 Jun 2008 22:42:39 +0000 (22:42 +0000)]
Use a common SourceManager when processing multiple files.  This allows us to cache the contents of source files already loaded from disk.

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

16 years agoUpdated Xcode project.
Ted Kremenek [Fri, 6 Jun 2008 21:48:51 +0000 (21:48 +0000)]
Updated Xcode project.

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

16 years agoReclaim memory owned by ObjCForwardProtocolDecls.
Ted Kremenek [Fri, 6 Jun 2008 21:05:33 +0000 (21:05 +0000)]
Reclaim memory owned by ObjCForwardProtocolDecls.

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

16 years agoReorganize this loop a bit so it doesn't crash for empty unions. Fixes
Eli Friedman [Fri, 6 Jun 2008 20:12:37 +0000 (20:12 +0000)]
Reorganize this loop a bit so it doesn't crash for empty unions.  Fixes
PR2419.

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

16 years agoImplement "Destroy" and destructor for ObjCClassDecl, allowing us to reclaim its...
Ted Kremenek [Fri, 6 Jun 2008 20:11:53 +0000 (20:11 +0000)]
Implement "Destroy" and destructor for ObjCClassDecl, allowing us to reclaim its memory and the memory of the Decls it owns.

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

16 years agoImplement "Destroy" and destructor for ObjCProtocolDecl, allowing us to reclaim its...
Ted Kremenek [Fri, 6 Jun 2008 19:48:57 +0000 (19:48 +0000)]
Implement "Destroy" and destructor for ObjCProtocolDecl, allowing us to reclaim its memory and the memory of the Decls it owns.

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

16 years agoClean up dead code from SemaInit landing.
Eli Friedman [Fri, 6 Jun 2008 19:40:52 +0000 (19:40 +0000)]
Clean up dead code from SemaInit landing.

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

16 years agoBecause of a lack of a clear ownership role between ObjCInterfaceDecls and
Ted Kremenek [Fri, 6 Jun 2008 17:21:42 +0000 (17:21 +0000)]
Because of a lack of a clear ownership role between ObjCInterfaceDecls and
ObjCPropertyDecls, have TranslationUnit destroy ObjCPropertyDecls. This is a
horrible hack, and must be removed eventually.

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

16 years agoInitial work on additional memory collection for ObjC AST objects. We now
Ted Kremenek [Fri, 6 Jun 2008 16:45:15 +0000 (16:45 +0000)]
Initial work on additional memory collection for ObjC AST objects.  We now
have Destroy methods of ObjcMethodDecl and ObjCInterfaceDecl which recursively
destroy their owned Decls and Stmts.  There are a few cases where it is not
clear what to do (FIXMEs included in the patch).

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

16 years agoimplement constant expr. sub ptr ptr
Nuno Lopes [Fri, 6 Jun 2008 16:41:08 +0000 (16:41 +0000)]
implement constant expr. sub ptr ptr

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

16 years agoDuring interface layout, don't forget super class.
Devang Patel [Fri, 6 Jun 2008 02:14:01 +0000 (02:14 +0000)]
During interface layout, don't forget super class.

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

16 years agoUndo previous check-in.
Devang Patel [Fri, 6 Jun 2008 02:00:35 +0000 (02:00 +0000)]
Undo previous check-in.

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

16 years agoDuring interface layout, don't forget super class.
Devang Patel [Fri, 6 Jun 2008 01:50:12 +0000 (01:50 +0000)]
During interface layout, don't forget super class.

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

16 years agoFix crash when running with multiple source files. This can be improved.
Ted Kremenek [Fri, 6 Jun 2008 01:47:30 +0000 (01:47 +0000)]
Fix crash when running with multiple source files.  This can be improved.

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

16 years agoOops...remove weird printf:-)
Steve Naroff [Thu, 5 Jun 2008 22:58:33 +0000 (22:58 +0000)]
Oops...remove weird printf:-)

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

16 years agoSecond half of "fix" for <rdar://problem/5986085> clang on xcode: error: redefinition...
Steve Naroff [Thu, 5 Jun 2008 22:57:10 +0000 (22:57 +0000)]
Second half of "fix" for <rdar://problem/5986085> clang on xcode: error: redefinition of 'XCElementToggler' as different kind of symbol

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

16 years agoIgnore a few more linker arguments.
Ted Kremenek [Thu, 5 Jun 2008 22:46:24 +0000 (22:46 +0000)]
Ignore a few more linker arguments.

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

16 years agosuper fix submitted by David Chisnall.
Steve Naroff [Thu, 5 Jun 2008 18:14:25 +0000 (18:14 +0000)]
super fix submitted by David Chisnall.

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

16 years agoFixed a recent test regression from last night (r51976).
Steve Naroff [Thu, 5 Jun 2008 15:03:27 +0000 (15:03 +0000)]
Fixed a recent test regression from last night (r51976).

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

16 years agoFix <rdar://problem/5986833> clang on xcode: incompatible type returning 'void',...
Steve Naroff [Thu, 5 Jun 2008 14:49:39 +0000 (14:49 +0000)]
Fix <rdar://problem/5986833> clang on xcode: incompatible type returning 'void', expected 'int'.

- Changed Sema::ObjCActOnStartOfMethodDef() to more accurately type "self" in factory methods.
- Changed Sema::ActOnInstanceMessage() to use the new type to restrict the lookup.

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

16 years agoFix <rdar://problem/5987482> clang on xcode: null dereference in Sema::ActOnMemberRef...
Steve Naroff [Thu, 5 Jun 2008 13:55:23 +0000 (13:55 +0000)]
Fix <rdar://problem/5987482> clang on xcode: null dereference in Sema::ActOnMemberReferenceExpr.

In addition to fixing the crasher, this commit fixes further improves property lookup (by searching protocols of qualified interfaces..."NSObject <prot>").

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

16 years agoEmit debug information for global and static variables when -g is specified.
Sanjiv Gupta [Thu, 5 Jun 2008 08:59:10 +0000 (08:59 +0000)]
Emit debug information for global and static variables when -g is specified.

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

16 years agoFix trivial crasher and downgrade an error to warning (to match GCC).
Steve Naroff [Thu, 5 Jun 2008 04:33:44 +0000 (04:33 +0000)]
Fix trivial crasher and downgrade an error to warning (to match GCC).

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

16 years agoSupport "<p>" as a short-hand for "id<p>". Here's a comment from GCC (the only docume...
Steve Naroff [Thu, 5 Jun 2008 00:02:44 +0000 (00:02 +0000)]
Support "<p>" as a short-hand for "id<p>". Here's a comment from GCC (the only documentation I could find on it).

/* Make "<SomeProtocol>" equivalent to "id <SomeProtocol>" - nisse@lysator.liu.se.  */

This commit adds the parser magic. The type associated with <p> is still incorrect. Will discuss with Chris.

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

16 years agoFix crash identified by <rdar://problem/5986085>.
Steve Naroff [Wed, 4 Jun 2008 23:08:38 +0000 (23:08 +0000)]
Fix crash identified by <rdar://problem/5986085>.

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

16 years agoAdd ObjCInterface layout support.
Devang Patel [Wed, 4 Jun 2008 21:54:36 +0000 (21:54 +0000)]
Add ObjCInterface layout support.
Reuse RecordLayout.

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

16 years agoUpdate a test and add a FIXME.
Steve Naroff [Wed, 4 Jun 2008 21:38:52 +0000 (21:38 +0000)]
Update a test and add a FIXME.

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

16 years agoRefactoring.
Devang Patel [Wed, 4 Jun 2008 21:22:16 +0000 (21:22 +0000)]
Refactoring.
Move field layout code in a ASTRecordLayout member fn.

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

16 years agoccc-analyzer now properly eats the -install_name, -exported_symbols_list, -current_ve...
Ted Kremenek [Wed, 4 Jun 2008 20:49:03 +0000 (20:49 +0000)]
ccc-analyzer now properly eats the -install_name, -exported_symbols_list, -current_version, -compatibility_version, and -sectorder command line arguments.

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

16 years agoAdded fixmes.
Ted Kremenek [Wed, 4 Jun 2008 20:48:08 +0000 (20:48 +0000)]
Added fixmes.

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

16 years agoParser::ParseObjCSynchronizedStmt() needs to Enter/Exit a decl scope.
Steve Naroff [Wed, 4 Jun 2008 20:36:13 +0000 (20:36 +0000)]
Parser::ParseObjCSynchronizedStmt() needs to Enter/Exit a decl scope.

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

16 years agoMake sure the types are consistent for a void conditional. No visible
Eli Friedman [Wed, 4 Jun 2008 19:47:51 +0000 (19:47 +0000)]
Make sure the types are consistent for a void conditional.  No visible
difference, but it's better to be consistent.

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

16 years agoFor setting attributes, don't assume there are ParamVarDecls available,
Eli Friedman [Wed, 4 Jun 2008 19:41:28 +0000 (19:41 +0000)]
For setting attributes, don't assume there are ParamVarDecls available,
because trying to access non-existent ParamVarDecls can crash.
Testcase from the original source for PR2414.

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

16 years agofix crash when codegening 'cond ? lhs : call-to-void-func()'
Nuno Lopes [Wed, 4 Jun 2008 19:15:45 +0000 (19:15 +0000)]
fix crash when codegening 'cond ? lhs : call-to-void-func()'

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

16 years agofix type of ?: operator. If one of the operator is void, the type should be void...
Nuno Lopes [Wed, 4 Jun 2008 19:14:12 +0000 (19:14 +0000)]
fix type of ?: operator. If one of the operator is void, the type should be void as well.
Please confirm this is safe

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

16 years agoFix a gcc compatibility issue which allows more protocol-qualified id on RHS to be
Fariborz Jahanian [Wed, 4 Jun 2008 19:00:03 +0000 (19:00 +0000)]
Fix a gcc compatibility issue which allows more protocol-qualified id on RHS to be
assigned to less protocol qualified object on LHS.

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

16 years agoDon't assume that the type of a FunctionDecl is a FunctionType; that
Eli Friedman [Wed, 4 Jun 2008 17:58:41 +0000 (17:58 +0000)]
Don't assume that the type of a FunctionDecl is a FunctionType; that
assumption isn't accurate in the presence of typedefs.

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

16 years agoMake the width and alignment for long double consistent with the
Eli Friedman [Wed, 4 Jun 2008 17:01:45 +0000 (17:01 +0000)]
Make the width and alignment for long double consistent with the
hardcoded data layout in getTargetDescription.  Hopefully fixes a test
failure.

Of course, this should be fixed properly, but that's a bigger fix.

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

16 years agoclang fix to parallel LLVM r51928
Eli Friedman [Wed, 4 Jun 2008 16:13:19 +0000 (16:13 +0000)]
clang fix to parallel LLVM r51928
(http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080602/063306.html).

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

16 years agoMoved LangOptions from TranslationUnit to ASTContext. This induced a variety of...
Ted Kremenek [Wed, 4 Jun 2008 15:55:15 +0000 (15:55 +0000)]
Moved LangOptions from TranslationUnit to ASTContext.  This induced a variety of cleanups in some ASTConsumers.

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

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

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

16 years agoASTContext::typesAreCompatible(): id is compatible with all qualified id types.
Steve Naroff [Wed, 4 Jun 2008 15:07:33 +0000 (15:07 +0000)]
ASTContext::typesAreCompatible(): id is compatible with all qualified id types.

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

16 years agoSema::ActOnClassMessage() needs to look through it's local implementation for private...
Steve Naroff [Wed, 4 Jun 2008 14:43:54 +0000 (14:43 +0000)]
Sema::ActOnClassMessage() needs to look through it's local implementation for private class methods.

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

16 years agoMove Decl and DeclContext implementations into a new DeclBase.cpp file.
Argyrios Kyrtzidis [Wed, 4 Jun 2008 13:04:04 +0000 (13:04 +0000)]
Move Decl and DeclContext implementations into a new DeclBase.cpp file.

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

16 years agoMake sure we look through categories when searching for a classes property.
Steve Naroff [Wed, 4 Jun 2008 04:46:04 +0000 (04:46 +0000)]
Make sure we look through categories when searching for a classes property.

Fixes <rdar://problem/5984338> clang on xcode: property implementation must have its declaration in interface 'PBXOpenQuicklyModule'

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

16 years agoGive the "isa" slot a name!
Steve Naroff [Wed, 4 Jun 2008 03:03:48 +0000 (03:03 +0000)]
Give the "isa" slot a name!

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

16 years agoAdd a few more built-in functions.
Steve Naroff [Tue, 3 Jun 2008 22:16:48 +0000 (22:16 +0000)]
Add a few more built-in functions.

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

16 years agoPut back my temporary hack until Eli addresses this in a more complete fashion.
Steve Naroff [Tue, 3 Jun 2008 22:06:04 +0000 (22:06 +0000)]
Put back my temporary hack until Eli addresses this in a more complete fashion.

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

16 years agoImplement another property related FIXME:
Steve Naroff [Tue, 3 Jun 2008 21:56:14 +0000 (21:56 +0000)]
Implement another property related FIXME:

Fix <rdar://problem/5967199> clang on xcode: error: member reference is not to a structure or union

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

16 years agoRe-fix r51907 in a way which doesn't affect valid code. This essentially
Eli Friedman [Tue, 3 Jun 2008 21:01:11 +0000 (21:01 +0000)]
Re-fix r51907 in a way which doesn't affect valid code. This essentially
moves the check for the invalid construct to a point where it doesn't
affect other uses of isIntegerConstantExpr, and we can warn properly
when the extension is used.  This makes it a bit more complicated, but
it's a lot cleaner.

Steve, please tell me if this check is sufficient to handle the
relevant system header.  I know it's enough to handle the testcase, but
I don't know what exactly the original looks like.

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

16 years agoFixup recent "super" regression.
Steve Naroff [Tue, 3 Jun 2008 18:21:00 +0000 (18:21 +0000)]
Fixup recent "super" regression.

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

16 years agoAdd a builtin. Fixes <rdar://problem/5982037> clang on xcode: error: incompatible...
Steve Naroff [Tue, 3 Jun 2008 17:37:43 +0000 (17:37 +0000)]
Add a builtin. Fixes <rdar://problem/5982037> clang on xcode: error: incompatible operand types ('int' and 'char *').

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

16 years agoChange Expr::isIntegerConstantExpr() to allow for pointer types (for GCC compatibilit...
Steve Naroff [Tue, 3 Jun 2008 17:15:29 +0000 (17:15 +0000)]
Change Expr::isIntegerConstantExpr() to allow for pointer types (for GCC compatibility). Note FIXME.

Fix <rdar://problem/5977870> clang on xcode: error: arrays with static storage duration must have constant integer length

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

16 years agoAllow implicit pointer/int conversions on ObjCQualifiedIdTypes in Sema::CheckCompareO...
Steve Naroff [Tue, 3 Jun 2008 14:04:54 +0000 (14:04 +0000)]
Allow implicit pointer/int conversions on ObjCQualifiedIdTypes in Sema::CheckCompareOperands() and Sema::CheckAssignmentConstraints().

Fixes <rdar://problem/5980804> clang on xcode: error: incompatible type sending 'id<XDUMLType>', expected 'NSCellType'.

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

16 years agoFinish up r51900.
Steve Naroff [Tue, 3 Jun 2008 13:21:30 +0000 (13:21 +0000)]
Finish up r51900.

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

16 years agoAllow for a GCC cast extension.
Steve Naroff [Tue, 3 Jun 2008 12:56:35 +0000 (12:56 +0000)]
Allow for a GCC cast extension.
Fixes part of <rdar://problem/5980829> clang on xcode: used type 'NSRange' where arithmetic or pointer type is required.

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

16 years agomake rewrite macros insert a space when commenting out macros where the token didn't
Chris Lattner [Tue, 3 Jun 2008 06:10:17 +0000 (06:10 +0000)]
make rewrite macros insert a space when commenting out macros where the token didn't
lead with a space.

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

16 years agoFix parser bug/FIXME with @catch.
Steve Naroff [Tue, 3 Jun 2008 05:36:54 +0000 (05:36 +0000)]
Fix parser bug/FIXME with @catch.

<rdar://problem/5980846> clang on xcode: error: declarator requires an identifier (for @catch)

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

16 years agoFix <rdar://problem/5979875> clang on xcode: error: use of undeclared identifier...
Steve Naroff [Mon, 2 Jun 2008 23:03:37 +0000 (23:03 +0000)]
Fix <rdar://problem/5979875> clang on xcode: error: use of undeclared identifier 'super'

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

16 years agoUse the correct 'ccc-analyzer' when the build command is a direct invocation of gcc.
Ted Kremenek [Mon, 2 Jun 2008 21:52:47 +0000 (21:52 +0000)]
Use the correct 'ccc-analyzer' when the build command is a direct invocation of gcc.

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

16 years agohandle the full assignment-expression grammar when using an
Chris Lattner [Mon, 2 Jun 2008 21:31:07 +0000 (21:31 +0000)]
handle the full assignment-expression grammar when using an
objc message send in an initializer expression.

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

16 years agoFix <rdar://problem/5976164> clang ObjC rewriter: for ... in enumeration inserts...
Steve Naroff [Mon, 2 Jun 2008 20:23:21 +0000 (20:23 +0000)]
Fix <rdar://problem/5976164> clang ObjC rewriter: for ... in enumeration inserts undeclared function (objc_enumerationMutation should be in preamble)

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

16 years agoTeach the CF retain checker about "_init" methods. Fixes: <rdar://problem/5956379>
Ted Kremenek [Mon, 2 Jun 2008 17:14:13 +0000 (17:14 +0000)]
Teach the CF retain checker about "_init" methods.  Fixes: <rdar://problem/5956379>

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

16 years agoUse "file_language" for per-language -x options.
Ted Kremenek [Mon, 2 Jun 2008 17:13:40 +0000 (17:13 +0000)]
Use "file_language" for per-language -x options.

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

16 years agofix decl attributes cleaning
Nuno Lopes [Sun, 1 Jun 2008 22:53:53 +0000 (22:53 +0000)]
fix decl attributes cleaning
this plugs the leak of attributes and also fixes a crash in the test

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

16 years agoInclude <string> header to allow compiling for MSVC.
Argyrios Kyrtzidis [Sun, 1 Jun 2008 21:23:24 +0000 (21:23 +0000)]
Include <string> header to allow compiling for MSVC.

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

16 years agofix PR2357 (#ifs didnt invalidate the multiple-inclusion optimization state)
Nuno Lopes [Sun, 1 Jun 2008 18:31:24 +0000 (18:31 +0000)]
fix PR2357 (#ifs didnt invalidate the multiple-inclusion optimization state)

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

16 years agoDon't name the ObjC types if there aren't any ObjC objects in the file.
Eli Friedman [Sun, 1 Jun 2008 16:00:02 +0000 (16:00 +0000)]
Don't name the ObjC types if there aren't any ObjC objects in the file.
Patch by David Chisnall.

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

16 years agoFirst cut at setting attributes for functions and calls; this puts us
Eli Friedman [Sun, 1 Jun 2008 15:54:49 +0000 (15:54 +0000)]
First cut at setting attributes for functions and calls; this puts us
much closer to passing the gcc struct layout tests.

It might be possible to refactor this a bit, but I'm not sure there's
actually enough common code for that to be useful.

To get the calling convention completely correct, a bit of
platform-specific code is necessary even for x86-Linux. On x86-Linux, the
alignment of function parameters is extremely strange; as far as I can tell,
it's always 4 except for SSE vectors or structs containing SSE vectors.  I'm
continuing to investigate this.

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

16 years agoMake sure _Bool globals have the correct type.
Eli Friedman [Sun, 1 Jun 2008 15:31:44 +0000 (15:31 +0000)]
Make sure _Bool globals have the correct type.

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