]> granicus.if.org Git - clang/log
clang
15 years agoFix regression: initialize 'size' for PathDiagnostic to 0.
Ted Kremenek [Fri, 6 Mar 2009 07:53:30 +0000 (07:53 +0000)]
Fix regression: initialize 'size' for PathDiagnostic to 0.
Add some assertions along the way...

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

15 years agoLike PathDiagnosticPieces, strip trailing periods at the end of PathDiagnostic descri...
Ted Kremenek [Fri, 6 Mar 2009 07:08:50 +0000 (07:08 +0000)]
Like PathDiagnosticPieces, strip trailing periods at the end of PathDiagnostic descriptions

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

15 years agocapitalize for consistency, a crash in regalloc now looks like this:
Chris Lattner [Fri, 6 Mar 2009 06:46:31 +0000 (06:46 +0000)]
capitalize for consistency, a crash in regalloc now looks like this:

Stack dump:
0. Program arguments: clang pr3399.c -S -O3
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Linear Scan Register Allocator' on function '@foo'
Abort

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

15 years agoAdd Parse/Sema support for weak_import attribute.
Daniel Dunbar [Fri, 6 Mar 2009 06:39:57 +0000 (06:39 +0000)]
Add Parse/Sema support for weak_import attribute.
 - Also, diagnose weak applied to types.

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

15 years agoTestcase for last fix.
Mike Stump [Fri, 6 Mar 2009 06:35:21 +0000 (06:35 +0000)]
Testcase for last fix.

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

15 years agoComplete __Block_byref_id_object_copy cogegen for block literals.
Mike Stump [Fri, 6 Mar 2009 06:12:24 +0000 (06:12 +0000)]
Complete __Block_byref_id_object_copy cogegen for block literals.

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

15 years agoTo the user, this is just a compiler of course, duh.
Chris Lattner [Fri, 6 Mar 2009 05:38:25 +0000 (05:38 +0000)]
To the user, this is just a compiler of course, duh.

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

15 years agoclean up the OVERVIEW line in clang --help.
Chris Lattner [Fri, 6 Mar 2009 05:38:04 +0000 (05:38 +0000)]
clean up the OVERVIEW line in clang --help.

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

15 years agoFinish off __Block_byref_id_object_dispose codegen for block literals.
Mike Stump [Fri, 6 Mar 2009 04:53:30 +0000 (04:53 +0000)]
Finish off __Block_byref_id_object_dispose codegen for block literals.

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

15 years ago#import is not considered an extension for ObjC.
Chris Lattner [Fri, 6 Mar 2009 04:28:03 +0000 (04:28 +0000)]
#import is not considered an extension for ObjC.

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

15 years agoRemove extra arg.
Mike Stump [Fri, 6 Mar 2009 02:45:21 +0000 (02:45 +0000)]
Remove extra arg.

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

15 years agoMore codegen support for the copy/dispose helpers for block literals.
Mike Stump [Fri, 6 Mar 2009 02:29:21 +0000 (02:29 +0000)]
More codegen support for the copy/dispose helpers for block literals.

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

15 years agoFramework for codegen for copy/dispose helpers.
Mike Stump [Fri, 6 Mar 2009 01:33:24 +0000 (01:33 +0000)]
Framework for codegen for copy/dispose helpers.

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

15 years agoUpdate checker build.
Ted Kremenek [Fri, 6 Mar 2009 00:53:59 +0000 (00:53 +0000)]
Update checker build.

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

15 years agoCleanup EH a bit given changes to ObjCCatchStmt.
Daniel Dunbar [Fri, 6 Mar 2009 00:01:21 +0000 (00:01 +0000)]
Cleanup EH a bit given changes to ObjCCatchStmt.
 - No functionality change.

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

15 years agoadd source range for type of super cast, giving something like:
Chris Lattner [Thu, 5 Mar 2009 23:09:00 +0000 (23:09 +0000)]
add source range for type of super cast, giving something like:

SemaObjC/call-super-2.m:78:29: error: cannot cast 'super' (it isn't an expression)
   return [(Object <Func> *)super instance_func0];
           ~~~~~~~~~~~~~~~~~^

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

15 years agomore minor simplifications.
Chris Lattner [Thu, 5 Mar 2009 23:03:49 +0000 (23:03 +0000)]
more minor simplifications.

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

15 years agorefactor C++ bitfield checking a bit (haha)
Chris Lattner [Thu, 5 Mar 2009 23:01:03 +0000 (23:01 +0000)]
refactor C++ bitfield checking a bit (haha)

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

15 years agoDon't mangle names of local variables.
Daniel Dunbar [Thu, 5 Mar 2009 22:59:19 +0000 (22:59 +0000)]
Don't mangle names of local variables.
 - For one thing, this adds unneeded overhead; for another, this
   routine can be used to emit unnamed decls which we shouldn't try to
   mangle.

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

15 years agoFix another GRExprEngine::VisitCast regression: handle casts of void* to function...
Ted Kremenek [Thu, 5 Mar 2009 22:47:06 +0000 (22:47 +0000)]
Fix another GRExprEngine::VisitCast regression: handle casts of void* to function pointers.

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

15 years agofix PR3607 and a fixme, by checking bitfield constraints
Chris Lattner [Thu, 5 Mar 2009 22:45:59 +0000 (22:45 +0000)]
fix PR3607 and a fixme, by checking bitfield constraints
more consistently.

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

15 years agoMore function stop for objc2's ivar layout bit map.
Fariborz Jahanian [Thu, 5 Mar 2009 22:39:55 +0000 (22:39 +0000)]
More function stop for objc2's ivar layout bit map.

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

15 years agoMinor tweak: Recognize 'CGCF' prefix in addition to 'CF' and 'CG'.
Ted Kremenek [Thu, 5 Mar 2009 22:11:14 +0000 (22:11 +0000)]
Minor tweak: Recognize 'CGCF' prefix in addition to 'CF' and 'CG'.

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

15 years agoFix regression in GRExprEngine::VisitCast: Do not wrap symbolic function pointers...
Ted Kremenek [Thu, 5 Mar 2009 20:22:13 +0000 (20:22 +0000)]
Fix regression in GRExprEngine::VisitCast: Do not wrap symbolic function pointers with TypedViewRegions.

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

15 years agoPartial fix <rdar://problem/6301205> [irgen] dot-syntax on super isn't supported.
Steve Naroff [Thu, 5 Mar 2009 20:12:00 +0000 (20:12 +0000)]
Partial fix <rdar://problem/6301205> [irgen] dot-syntax on super isn't supported.

Tweak Sema::ActOnMemberReferenceExpr() and Sema::ActOnDeclarationNameExpr() to handle "super." notation for Class methods.

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

15 years agoMoved CollectObjCIvars to more commonly available place
Fariborz Jahanian [Thu, 5 Mar 2009 20:08:48 +0000 (20:08 +0000)]
Moved CollectObjCIvars to more commonly available place
for future use.

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

15 years agoAdds a template for a function for objc2's gc's ivar layout
Fariborz Jahanian [Thu, 5 Mar 2009 19:17:31 +0000 (19:17 +0000)]
Adds a template for a function for objc2's gc's ivar layout
bitmap.

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

15 years agoUpdate test case: objects stored to self.ivar are not tracked.
Ted Kremenek [Thu, 5 Mar 2009 18:15:02 +0000 (18:15 +0000)]
Update test case: objects stored to self.ivar are not tracked.

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

15 years agoRetrofit some basic tracking of ivars (for the current object) into BasicStore.
Ted Kremenek [Thu, 5 Mar 2009 18:08:28 +0000 (18:08 +0000)]
Retrofit some basic tracking of ivars (for the current object) into BasicStore.

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

15 years agoMinor code compaction. No functionality change.
Ted Kremenek [Thu, 5 Mar 2009 16:41:21 +0000 (16:41 +0000)]
Minor code compaction.  No functionality change.

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

15 years agoRename VarBindings -> Bindings.
Ted Kremenek [Thu, 5 Mar 2009 16:32:59 +0000 (16:32 +0000)]
Rename VarBindings -> Bindings.

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

15 years agoBasicStore:
Ted Kremenek [Thu, 5 Mar 2009 16:31:07 +0000 (16:31 +0000)]
BasicStore:
- Store bindings using a MemRegion -> SVal binding instead of VarDecl -> SVal
  binding. This mirrors some of the idea of RegionStore, but is far simpler and
  not nearly as functional.  This leads to some code simplification and
  some potential for some minor precision hacks.

Along the way...
- constify the use of MemRegion* in a few places
- add operator<<(llvm::raw_ostream, const MemRegion*)

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

15 years agoTweak diag for <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthes...
Steve Naroff [Thu, 5 Mar 2009 15:45:01 +0000 (15:45 +0000)]
Tweak diag for <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar.

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

15 years agoFix <rdar://problem/6144382> [sema] gcc inconsistency w.r.t. forward protocol declara...
Steve Naroff [Thu, 5 Mar 2009 15:22:01 +0000 (15:22 +0000)]
Fix <rdar://problem/6144382> [sema] gcc inconsistency w.r.t. forward protocol declarations.

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

15 years agoprep work for copy/destroy helpers for block literals.
Mike Stump [Thu, 5 Mar 2009 08:32:30 +0000 (08:32 +0000)]
prep work for copy/destroy helpers for block literals.

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

15 years agoif we die in IR generation of a compound statement, include
Chris Lattner [Thu, 5 Mar 2009 08:04:57 +0000 (08:04 +0000)]
if we die in IR generation of a compound statement, include
it in the stack trace, giving us stuff like:

Stack dump:
0. Program arguments: clang t.c -emit-llvm
1. <eof> parser at end of file
2. t.c:1:5: LLVM IR generation of declaration 'a'
3. t.c:1:9: LLVM IR generation of compound statement ('{}')
4. t.c:2:3: LLVM IR generation of compound statement ('{}')
Abort

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

15 years agorename PrettyStackTraceDecl -> PrettyStackTraceActionsDecl.
Chris Lattner [Thu, 5 Mar 2009 08:00:35 +0000 (08:00 +0000)]
rename PrettyStackTraceDecl -> PrettyStackTraceActionsDecl.
Introduce a new PrettyStackTraceDecl.
Use it to add the top level LLVM IR generation stuff in
Backend.cpp to stack traces.  We now get crashes like:

Stack dump:
0. Program arguments: clang t.c -emit-llvm
1. <eof> parser at end of file
2. t.c:1:5: LLVM IR generation of declaration 'a'
Abort

for IR generation crashes.

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

15 years agoUpdate checker build.
Ted Kremenek [Thu, 5 Mar 2009 07:55:15 +0000 (07:55 +0000)]
Update checker build.

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

15 years agoremove unneeded forward decl.
Chris Lattner [Thu, 5 Mar 2009 07:54:06 +0000 (07:54 +0000)]
remove unneeded forward decl.

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

15 years agoif we crash while parsing a block literal, include it.
Chris Lattner [Thu, 5 Mar 2009 07:32:12 +0000 (07:32 +0000)]
if we crash while parsing a block literal, include it.

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

15 years agofix eof check
Chris Lattner [Thu, 5 Mar 2009 07:27:50 +0000 (07:27 +0000)]
fix eof check

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

15 years agoWhen the parser is live, print out the location and spelling of its current token.
Chris Lattner [Thu, 5 Mar 2009 07:24:28 +0000 (07:24 +0000)]
When the parser is live, print out the location and spelling of its current token.
For example:

Stack dump:
0. Program arguments: clang t.cpp
1. t.cpp:4:8: current parser token: ';'
2. t.cpp:3:1: parsing struct/union/class body 'x'
Abort

It is weird that the parser is always "underneath" any parse context
actions, but the parser is created first.

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

15 years agofinish comment.
Chris Lattner [Thu, 5 Mar 2009 07:16:05 +0000 (07:16 +0000)]
finish comment.

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

15 years agoDriver: Basic argument parsing.
Daniel Dunbar [Thu, 5 Mar 2009 06:38:47 +0000 (06:38 +0000)]
Driver: Basic argument parsing.
 - Add Driver::ParseArgStrings.
 - Store values directly in CommaJoinedArg to support simple access.
 - Add FlagArg class.

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

15 years agoTest case: When using RegionStore with the retain/release checker, stop tracking...
Ted Kremenek [Thu, 5 Mar 2009 05:14:55 +0000 (05:14 +0000)]
Test case: When using RegionStore with the retain/release checker, stop tracking objects assigned to self's ivar.

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

15 years agoAdd test case for RegionStore's tracking of the ivars of 'self'.
Ted Kremenek [Thu, 5 Mar 2009 04:55:08 +0000 (04:55 +0000)]
Add test case for RegionStore's tracking of the ivars of 'self'.

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

15 years agoAdd initial support for tracking ivars, with special handling for ivars of 'self'.
Ted Kremenek [Thu, 5 Mar 2009 04:50:08 +0000 (04:50 +0000)]
Add initial support for tracking ivars, with special handling for ivars of 'self'.

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

15 years agoMake IRGen compatible with declaring a function with incomplete
Eli Friedman [Thu, 5 Mar 2009 04:18:07 +0000 (04:18 +0000)]
Make IRGen compatible with declaring a function with incomplete
return/argument types.  (The generated IR isn't ideal, but we can't
really do better in general.)

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

15 years agoAdd 'cast<>' to remove an extra function call and dynamic cast.
Ted Kremenek [Thu, 5 Mar 2009 03:44:53 +0000 (03:44 +0000)]
Add 'cast<>' to remove an extra function call and dynamic cast.

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

15 years agoMore fixes in cast logic.
Ted Kremenek [Thu, 5 Mar 2009 03:42:31 +0000 (03:42 +0000)]
More fixes in cast logic.

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

15 years agoInitial implementation of CodeGen for incomplete function types; fixes
Eli Friedman [Thu, 5 Mar 2009 03:16:41 +0000 (03:16 +0000)]
Initial implementation of CodeGen for incomplete function types; fixes
PR3688.  (The FIXME is a rather big performance issue, but it only
affects code using this feature, which is relatively rare.)

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

15 years agoGRExprEngine: Polish up handling of casting integer constants to pointers and back.
Ted Kremenek [Thu, 5 Mar 2009 02:42:32 +0000 (02:42 +0000)]
GRExprEngine: Polish up handling of casting integer constants to pointers and back.

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

15 years agoAvoid dispose calls when only doing gc.
Mike Stump [Thu, 5 Mar 2009 02:34:38 +0000 (02:34 +0000)]
Avoid dispose calls when only doing gc.

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

15 years agoFix regression in transparent translation of nonloc::ConcreteInto to loc::ConcreteInt.
Ted Kremenek [Thu, 5 Mar 2009 02:33:55 +0000 (02:33 +0000)]
Fix regression in transparent translation of nonloc::ConcreteInto to loc::ConcreteInt.

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

15 years agoInclude struct context info for parser/sema crashes. This
Chris Lattner [Thu, 5 Mar 2009 02:25:03 +0000 (02:25 +0000)]
Include struct context info for parser/sema crashes.  This
gives us:

Stack dump:
0. using-directive.cpp:26:16: in compound statement ('{}')
1. using-directive.cpp:26:16: parsing function body 'A::K1::foo'
2. using-directive.cpp:25:3: parsing struct/union/class body 'A::K1'
3. using-directive.cpp:5:1: parsing namespace 'A'
4. clang using-directive.cpp
Abort

for code like:

namespace A {
...
  class K1 {
    void foo() { <<crash>>

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

15 years agoInclude namespace contexts in the virtual stack trace, so we get stuff
Chris Lattner [Thu, 5 Mar 2009 02:09:07 +0000 (02:09 +0000)]
Include namespace contexts in the virtual stack trace, so we get stuff
like this:

Stack dump:
0. using-directive.cpp:9:14: in compound statement ('{}')
1. using-directive.cpp:9:14: parsing function body 'A::B::f'
2. using-directive.cpp:7:3: parsing namespace 'A::B'
3. using-directive.cpp:5:1: parsing namespace 'A'
4. clang using-directive.cpp
Abort

for testcase like like:

namespace A {
  short i;
  namespace B {
    long i;
    void f() { <<crash>>

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

15 years agoinclude objc method decl contexts in stack trace of crash, e.g.:
Chris Lattner [Thu, 5 Mar 2009 02:03:49 +0000 (02:03 +0000)]
include objc method decl contexts in stack trace of crash, e.g.:

Stack dump:
0. message.m:53:13: in compound statement ('{}')
1. message.m:53:13: parsing Objective-C method 'xx'
2. clang message.m

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

15 years agoSet isMain bit for MainFile.
Devang Patel [Thu, 5 Mar 2009 01:55:07 +0000 (01:55 +0000)]
Set isMain bit for MainFile.

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

15 years agoWhen parsing a function body, add it to the crash stack, giving us something
Chris Lattner [Thu, 5 Mar 2009 01:25:28 +0000 (01:25 +0000)]
When parsing a function body, add it to the crash stack, giving us something
like:

Stack dump:
0. t.c:5:10: in compound statement ('{}')
1. t.c:3:12: in compound statement ('{}')
2. t.c:3:12: parsing function body 'foo'
3. clang t.c
Abort

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

15 years agoAdd codegen support for __block variables to call _Block_object_dispose as necessary.
Mike Stump [Thu, 5 Mar 2009 01:23:13 +0000 (01:23 +0000)]
Add codegen support for __block variables to call _Block_object_dispose as necessary.

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

15 years agofix some 80 col violations.
Chris Lattner [Thu, 5 Mar 2009 00:56:34 +0000 (00:56 +0000)]
fix some 80 col violations.

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

15 years agoSimplify the interface to ParseFunctionStatementBody to not take
Chris Lattner [Thu, 5 Mar 2009 00:49:17 +0000 (00:49 +0000)]
Simplify the interface to ParseFunctionStatementBody to not take
locations that are the current tok loc.  Note that inline C++ methods
have a big fixme that could cause a crash.

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

15 years agoUse LLVM type header rather than using stdint.h directly.
Eli Friedman [Thu, 5 Mar 2009 00:37:49 +0000 (00:37 +0000)]
Use LLVM type header rather than using stdint.h directly.

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

15 years agoFix message title
Ted Kremenek [Thu, 5 Mar 2009 00:12:45 +0000 (00:12 +0000)]
Fix message title

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

15 years agoupdate xcode proj
Chris Lattner [Thu, 5 Mar 2009 00:03:30 +0000 (00:03 +0000)]
update xcode proj

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

15 years agoInclude information about compound statements when crashing in sema or the
Chris Lattner [Thu, 5 Mar 2009 00:00:31 +0000 (00:00 +0000)]
Include information about compound statements when crashing in sema or the
parser.  For example, we now print out:

0. t.c:5:10: in compound statement {}
1. t.c:3:12: in compound statement {}
2. clang t.c -fsyntax-only

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

15 years agoFor now, do not track NSWindow objects and it's subclasses.
Ted Kremenek [Wed, 4 Mar 2009 23:30:42 +0000 (23:30 +0000)]
For now, do not track NSWindow objects and it's subclasses.

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

15 years agoDriver: Implement Option::accept methods.
Daniel Dunbar [Wed, 4 Mar 2009 23:22:02 +0000 (23:22 +0000)]
Driver: Implement Option::accept methods.

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

15 years agoDriver: Fix off by one in ParseOneArg; this code is ugly but will be
Daniel Dunbar [Wed, 4 Mar 2009 23:03:35 +0000 (23:03 +0000)]
Driver: Fix off by one in ParseOneArg; this code is ugly but will be
replaced anyway.

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

15 years agoDriver: Add Arg::dump and SeparateArg stubs.
Daniel Dunbar [Wed, 4 Mar 2009 23:02:50 +0000 (23:02 +0000)]
Driver: Add Arg::dump and SeparateArg stubs.

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

15 years agoRemoved an unfortunate cut and paste left-over.
Fariborz Jahanian [Wed, 4 Mar 2009 23:00:40 +0000 (23:00 +0000)]
Removed an unfortunate cut and paste left-over.

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

15 years agoAdd prototype support for invalidating fields for structures passed-by-reference
Ted Kremenek [Wed, 4 Mar 2009 22:56:43 +0000 (22:56 +0000)]
Add prototype support for invalidating fields for structures passed-by-reference
to unknown functions. Most of this logic should be eventually moved to
RegionStore and be made lazy.

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

15 years agoMemRegion:
Ted Kremenek [Wed, 4 Mar 2009 22:55:18 +0000 (22:55 +0000)]
MemRegion:
- Have 'TypedRegion::getRValueType()' return a null QualType for 'id<...>'
  instead of aborting.
- Change 'TypedRegion::isBoundable()' to return true for all objects with a
  non-null RValueType (this may not be the final behavior).

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

15 years agoAdd an optional "tag" to conjured symbols that allows us to distinguish between
Ted Kremenek [Wed, 4 Mar 2009 22:53:46 +0000 (22:53 +0000)]
Add an optional "tag" to conjured symbols that allows us to distinguish between
multiple symbols conjured at the same location. All that is required of the tag
is that it is a fixed void* value that points to an memory address that remains
valid throughout the remainder of the lifetime of the SymbolManager.

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

15 years agoFixup __block codegen in nested block literals.
Mike Stump [Wed, 4 Mar 2009 22:48:06 +0000 (22:48 +0000)]
Fixup __block codegen in nested block literals.

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

15 years agoDriver: Add OptTable::ParseOneArg.
Daniel Dunbar [Wed, 4 Mar 2009 22:41:37 +0000 (22:41 +0000)]
Driver: Add OptTable::ParseOneArg.

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

15 years agoDriver: Add ArgList::{append, getArgString}
Daniel Dunbar [Wed, 4 Mar 2009 22:40:08 +0000 (22:40 +0000)]
Driver: Add ArgList::{append, getArgString}

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

15 years agoDriver: Stub out Arg implementations.
Daniel Dunbar [Wed, 4 Mar 2009 22:37:52 +0000 (22:37 +0000)]
Driver: Stub out Arg implementations.

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

15 years agoImplemented access check for ivars accessed inside
Fariborz Jahanian [Wed, 4 Mar 2009 22:30:12 +0000 (22:30 +0000)]
Implemented access check for ivars accessed inside
c-style functions declared inside objc @implementations.

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

15 years agoDriver: Option's need to know their ID.
Daniel Dunbar [Wed, 4 Mar 2009 21:53:04 +0000 (21:53 +0000)]
Driver: Option's need to know their ID.
 - Also, add Input and Unknown opts to OptTable.

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

15 years agoStart making use of "pretty stack dumps" to get
Chris Lattner [Wed, 4 Mar 2009 21:41:39 +0000 (21:41 +0000)]
Start making use of "pretty stack dumps" to get
better crash info when clang crashes.  Step #2 of many.

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

15 years agominor cleanups
Chris Lattner [Wed, 4 Mar 2009 21:40:56 +0000 (21:40 +0000)]
minor cleanups

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

15 years agoDriver: Pull intrusive list out of Arg; this isn't going to suffice. I
Daniel Dunbar [Wed, 4 Mar 2009 21:17:31 +0000 (21:17 +0000)]
Driver: Pull intrusive list out of Arg; this isn't going to suffice. I
will make this efficient later (if it even matters)...

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

15 years agoDriver: Return reference for Arg::getOption().
Daniel Dunbar [Wed, 4 Mar 2009 21:14:57 +0000 (21:14 +0000)]
Driver: Return reference for Arg::getOption().

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

15 years agoAdd a little utility for interposing between a command line program
Daniel Dunbar [Wed, 4 Mar 2009 21:06:52 +0000 (21:06 +0000)]
Add a little utility for interposing between a command line program
and capturing its invocations.

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

15 years agoDriver: Add Option flags.
Daniel Dunbar [Wed, 4 Mar 2009 21:05:23 +0000 (21:05 +0000)]
Driver: Add Option flags.

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

15 years agoDriver: Tweak Option::accept interface.
Daniel Dunbar [Wed, 4 Mar 2009 20:53:00 +0000 (20:53 +0000)]
Driver: Tweak Option::accept interface.

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

15 years agoThe basic representation of diagnostics information in tablegen format, plus (uncomme...
Sebastian Redl [Wed, 4 Mar 2009 20:49:43 +0000 (20:49 +0000)]
The basic representation of diagnostics information in tablegen format, plus (uncommented and incomplete) test conversions of the existing def files to this format.

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

15 years agoDriver: Sink Driver/Compilation into clang::driver namespace.
Daniel Dunbar [Wed, 4 Mar 2009 20:49:20 +0000 (20:49 +0000)]
Driver: Sink Driver/Compilation into clang::driver namespace.
 - Add OptTable instance to Driver.

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

15 years agoFix typo in diagnostic.
Sebastian Redl [Wed, 4 Mar 2009 19:58:58 +0000 (19:58 +0000)]
Fix typo in diagnostic.

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

15 years agoccc: Fix passing of -nozero-initialized-in-bss.
Daniel Dunbar [Wed, 4 Mar 2009 19:17:10 +0000 (19:17 +0000)]
ccc: Fix passing of -nozero-initialized-in-bss.
 - PR3722.

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

15 years agoMove more blocks CodeGenFunction code up and out.
Mike Stump [Wed, 4 Mar 2009 19:03:44 +0000 (19:03 +0000)]
Move more blocks CodeGenFunction code up and out.

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

15 years agoMove some of the CodeGenFunction blocks code up and out. No
Mike Stump [Wed, 4 Mar 2009 18:57:26 +0000 (18:57 +0000)]
Move some of the CodeGenFunction blocks code up and out.  No
functionality change.

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

15 years agoMove more of the blocks code up and out.
Mike Stump [Wed, 4 Mar 2009 18:47:42 +0000 (18:47 +0000)]
Move more of the blocks code up and out.

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

15 years agoPartial fix for <rdar://problem/6645157> [clang on Xcode; regression]: error: instanc...
Steve Naroff [Wed, 4 Mar 2009 18:34:24 +0000 (18:34 +0000)]
Partial fix for <rdar://problem/6645157> [clang on Xcode; regression]: error: instance variable 'someField' is private.

A recent regression caused by http://llvm.org/viewvc/llvm-project?rev=65912&view=rev.

This commit isn't fully baked. Nevertheless, it should cause Xcode to compile again. Will speak with Fariborz offline.

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

15 years agofixes suggested by Sebastian!
Chris Lattner [Wed, 4 Mar 2009 18:24:58 +0000 (18:24 +0000)]
fixes suggested by Sebastian!

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

15 years agoRefactor code.
Devang Patel [Wed, 4 Mar 2009 18:21:39 +0000 (18:21 +0000)]
Refactor code.

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

15 years agoMove more of blocks codegen out of CodeGenModule and into the
Mike Stump [Wed, 4 Mar 2009 18:17:45 +0000 (18:17 +0000)]
Move more of blocks codegen out of CodeGenModule and into the
BlockModule.  No functionality change.  This should help people that
don't want to know anything about blocks not be confused by the
overloaded use of the term block or nor want to see all the blocks
goop.

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

15 years agoSome refactoring of recent code. No functionality change.
Fariborz Jahanian [Wed, 4 Mar 2009 18:15:57 +0000 (18:15 +0000)]
Some refactoring of recent code. No functionality change.

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

15 years agoFix a corner case of message lookup looking for class methods.
Fariborz Jahanian [Wed, 4 Mar 2009 17:50:39 +0000 (17:50 +0000)]
Fix a corner case of message lookup looking for class methods.
If all else failed, find the message in class's root's
list of instacne methods!

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