]>
granicus.if.org Git - clang/log
Daniel Dunbar [Fri, 6 Mar 2009 22:20:40 +0000 (22:20 +0000)]
Add my "clang compatible" test runner. Sorry for keeping this to myself...
Usage: from clang/test, 'make -f ../utils/test/Makefile.multi'
Pros: About 20% faster than the Makefile based version on my 8 core
box (way faster on Windows I imagine, if it works).
Cons: Needs some cleanup. Ctrl-C works quite poorly on Darwin; more
Python's fault than mine.
Future: Support config definitions so we can use this for running LLVM
tests instead of dejagnu. Parallel testing goodness? Indeed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66293
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 6 Mar 2009 22:13:30 +0000 (22:13 +0000)]
(LLVM svn up) Generalize RuntimeFunctions to RuntimeGlobals and add
CodeGenModule::CreateRuntimeVariable.
- No real functionality change; although we now assert on silly
things like:
--
int objc_exception_throw;
void f0() { @throw(@"A"); }
--
instead of accepting it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66292
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Mar 2009 22:10:49 +0000 (22:10 +0000)]
Start work on subclassing PathDiagnosticPiece to distinguish more between control-flow pieces, events, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66291
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Mar 2009 22:09:31 +0000 (22:09 +0000)]
Add null-check assertion in the constructor of Selector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66290
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 6 Mar 2009 20:45:54 +0000 (20:45 +0000)]
Handle #pragma pack(0). I left this out of diagnostic because users should
really use pack() instead.
- <rdar://problem/
6650243 > clang warns about '#pragma pack(0)'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66287
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 6 Mar 2009 19:06:37 +0000 (19:06 +0000)]
Improve recovery from ill-formed scope specifiers. Fixes PR3670.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66286
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 6 Mar 2009 18:42:23 +0000 (18:42 +0000)]
Pass the type of the block literal around to make required temporal ordering of code clearer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66284
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 6 Mar 2009 18:35:43 +0000 (18:35 +0000)]
Fix thinko. *cough* ofcourseItestedit *cough*
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66283
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 6 Mar 2009 18:34:03 +0000 (18:34 +0000)]
Implement the GNU semantics for forward declarations of enum types in
C and C++. Fixes PR3688.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66282
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 6 Mar 2009 18:32:01 +0000 (18:32 +0000)]
Tidy file removal cleanup & remove race condition on file existence.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66281
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 6 Mar 2009 17:50:25 +0000 (17:50 +0000)]
x86_64 ABI: Handle long double in union when upper eightbyte results
in a lone X87 class.
- PR3735.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66277
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Fri, 6 Mar 2009 17:41:35 +0000 (17:41 +0000)]
Implement the machinery that can process TableGenerated warning options.
Manually write a table and some ad-hoc code to provide feature parity with the current code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66276
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 6 Mar 2009 16:36:40 +0000 (16:36 +0000)]
Use list instead of vector for storing strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66271
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 6 Mar 2009 16:20:49 +0000 (16:20 +0000)]
IRgen support for weak_import.
- <rdar://problem/
6652110 > clang should support weak_import
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66270
91177308 -0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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