]> granicus.if.org Git - clang/log
clang
15 years agoWoot, save 8 bytes in Decl on 64-bit by reordering fields. This
Daniel Dunbar [Wed, 4 Mar 2009 02:26:41 +0000 (02:26 +0000)]
Woot, save 8 bytes in Decl on 64-bit by reordering fields. This
reduces allocated Decl size by ~8% on Cocoa.h (~700k).

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

15 years agoThis test now passes using RegionStore.
Ted Kremenek [Wed, 4 Mar 2009 00:23:28 +0000 (00:23 +0000)]
This test now passes using RegionStore.

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

15 years agoRegionStore: Handle implicit parameters.
Ted Kremenek [Wed, 4 Mar 2009 00:23:05 +0000 (00:23 +0000)]
RegionStore: Handle implicit parameters.

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

15 years agoCreate "TypedViewRegions" that layer on top of SymbolicRegions when handling
Ted Kremenek [Wed, 4 Mar 2009 00:14:35 +0000 (00:14 +0000)]
Create "TypedViewRegions" that layer on top of SymbolicRegions when handling
pointer-to-pointer casts involving symbolic locations.

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

15 years agoUse GetSValAsScalarOrLoc instead of GetSVal to prevent unintended structure or array...
Ted Kremenek [Wed, 4 Mar 2009 00:13:50 +0000 (00:13 +0000)]
Use GetSValAsScalarOrLoc instead of GetSVal to prevent unintended structure or array "loads".

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

15 years agoAdd "GetSValAsScalarOrLoc" methods to GRState/GRStateRef that only perform a
Ted Kremenek [Wed, 4 Mar 2009 00:13:10 +0000 (00:13 +0000)]
Add "GetSValAsScalarOrLoc" methods to GRState/GRStateRef that only perform a
retrieval from the store/environment for locations or scalar types.

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

15 years agoRegionStore::RemoveDeadBindings needs to check all the symbols of the super region...
Ted Kremenek [Wed, 4 Mar 2009 00:11:38 +0000 (00:11 +0000)]
RegionStore::RemoveDeadBindings needs to check all the symbols of the super region of a scanned region as well.

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

15 years agoAdd new performance numbers; no discussion yet. Obvious two
Daniel Dunbar [Wed, 4 Mar 2009 00:04:28 +0000 (00:04 +0000)]
Add new performance numbers; no discussion yet. Obvious two
conclusions are our PCH generation is way faster than gcc, and the
Python based driver kills compile times.

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

15 years agoChange a warning to an error...
Steve Naroff [Tue, 3 Mar 2009 23:13:51 +0000 (23:13 +0000)]
Change a warning to an error...

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

15 years agoImplement an important missing warning when a selector
Fariborz Jahanian [Tue, 3 Mar 2009 22:19:15 +0000 (22:19 +0000)]
Implement an important missing warning when a selector
is searched for in the global pool. It already uncovered
a clang bug in message selection.

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

15 years agoFix <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized proper...
Steve Naroff [Tue, 3 Mar 2009 22:09:41 +0000 (22:09 +0000)]
Fix <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@65973 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRework use of loc::SymbolVal in the retain/release checker to use the new method
Ted Kremenek [Tue, 3 Mar 2009 22:06:47 +0000 (22:06 +0000)]
Rework use of loc::SymbolVal in the retain/release checker to use the new method
SVal::getAsLocSymbol(). This simplifies the code and allows the retain/release
checker to (I believe) also correctly reason about location symbols wrapped in
SymbolicRegions.

Along the way I cleaned up SymbolRef a little, disallowing implicit casts to
'unsigned'.

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

15 years agoFix <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch state...
Steve Naroff [Tue, 3 Mar 2009 21:16:54 +0000 (21:16 +0000)]
Fix <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements.

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

15 years agoFix <rdar://problem/6632061> [sema] non object types should not be allowed in @catch...
Steve Naroff [Tue, 3 Mar 2009 20:59:06 +0000 (20:59 +0000)]
Fix <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements.

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

15 years agoimplement support for propagating *features* down to the code generator
Chris Lattner [Tue, 3 Mar 2009 19:56:18 +0000 (19:56 +0000)]
implement support for propagating *features* down to the code generator
and defining target-specific macros based on them (like __SSE3__ and
friends).  After extensive discussion with Daniel, this work will need
driver support, which will translate things like -msse3 into a -mattr
feature.  Until this work is done, the code in clang.cpp is disabled and
the X86TargetInfo ctor still defaults to SSE2.  With these two things
changed, this code will work.  PR3634

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

15 years agoFix <rdar://problem/6640991> Exception handling executes wrong clause (Daniel, please...
Steve Naroff [Tue, 3 Mar 2009 19:52:17 +0000 (19:52 +0000)]
Fix <rdar://problem/6640991> Exception handling executes wrong clause (Daniel, please verify).

Also necessary to fix:

<rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements
<rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements

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

15 years agoDon't use std::auto_ptr with getSubRegionMap().
Ted Kremenek [Tue, 3 Mar 2009 19:02:42 +0000 (19:02 +0000)]
Don't use std::auto_ptr with getSubRegionMap().

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

15 years agoFix case where we should use dyn_cast instead of cast.
Ted Kremenek [Tue, 3 Mar 2009 19:01:37 +0000 (19:01 +0000)]
Fix case where we should use dyn_cast instead of cast.

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

15 years agoFixed an ir-gen bug in syntheszing a getter function
Fariborz Jahanian [Tue, 3 Mar 2009 18:49:40 +0000 (18:49 +0000)]
Fixed an ir-gen bug in syntheszing a getter function
with property type which does not match its ivar and
in -fobjc-gc-only mode!

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

15 years agoFix extra ';' bug noticed by Mike Stump.
Ted Kremenek [Tue, 3 Mar 2009 18:15:30 +0000 (18:15 +0000)]
Fix extra ';' bug noticed by Mike Stump.

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

15 years agoHush gcc.
Daniel Dunbar [Tue, 3 Mar 2009 16:54:38 +0000 (16:54 +0000)]
Hush gcc.

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

15 years agoReturn 0 if the ConstExprEmitter can't handle an expression.
Anders Carlsson [Tue, 3 Mar 2009 16:43:34 +0000 (16:43 +0000)]
Return 0 if the ConstExprEmitter can't handle an expression.

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

15 years agoRemove old/incorrect warnings.
Steve Naroff [Tue, 3 Mar 2009 15:49:23 +0000 (15:49 +0000)]
Remove old/incorrect warnings.

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

15 years agoFix <rdar://problem/6497242> Inherited overridden protocol declared objects don't...
Steve Naroff [Tue, 3 Mar 2009 15:43:24 +0000 (15:43 +0000)]
Fix <rdar://problem/6497242> Inherited overridden protocol declared objects don't work.

Change Sema::DiagnosePropertyMismatch() to check for type compatibility (rather than type equivalence, which is too strict).

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

15 years agoFix <rdar://problem/6497608> clang does not catch ivar type mismatches in @implementa...
Steve Naroff [Tue, 3 Mar 2009 14:49:36 +0000 (14:49 +0000)]
Fix <rdar://problem/6497608> clang does not catch ivar type mismatches in @implementation.

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

15 years agoDriver: Sketch Arg & ArgList classes.
Daniel Dunbar [Tue, 3 Mar 2009 07:34:45 +0000 (07:34 +0000)]
Driver: Sketch Arg & ArgList classes.

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

15 years agoPR3691: Add support for complex modes. I also tossed in support for XF
Eli Friedman [Tue, 3 Mar 2009 06:41:03 +0000 (06:41 +0000)]
PR3691: Add support for complex modes.  I also tossed in support for XF
while I was at it.  There are still a lot of diagnostics missing from
this code, and it isn't completely correct for anything other than x86, but
it should work correctly on x86 for valid cases.

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

15 years agoSketch Driver Option classes.
Daniel Dunbar [Tue, 3 Mar 2009 05:55:11 +0000 (05:55 +0000)]
Sketch Driver Option classes.

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

15 years agoSet svn:ignore on Output dir
Daniel Dunbar [Tue, 3 Mar 2009 05:53:50 +0000 (05:53 +0000)]
Set svn:ignore on Output dir

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

15 years agoFix for PR3687: use the memory representation for booleans when a
Eli Friedman [Tue, 3 Mar 2009 04:48:01 +0000 (04:48 +0000)]
Fix for PR3687: use the memory representation for booleans when a
sub-type describes a memory location, like the pointee type of a pointer
or the element type of an array.

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

15 years agoImplement the basics of implicit instantiation of class templates, in
Douglas Gregor [Tue, 3 Mar 2009 04:44:36 +0000 (04:44 +0000)]
Implement the basics of implicit instantiation of class templates, in
response to attempts to diagnose an "incomplete" type. This will force
us to use DiagnoseIncompleteType more regularly (rather than looking at
isIncompleteType), but that's also a good thing.

Implicit instantiation is still very simplistic, and will create a new
definition for the class template specialization (as it should) but it
only actually instantiates the base classes and attaches
those. Actually instantiating class members will follow.

Also, instantiate the types of non-type template parameters before
checking them,  allowing, e.g.,

  template<typename T, T Value> struct Constant;

to work properly.

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

15 years agoTighten message bubble height.
Ted Kremenek [Tue, 3 Mar 2009 03:00:21 +0000 (03:00 +0000)]
Tighten message bubble height.
Make bubble number decoration look more like circles than ovals.

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

15 years agoImplement FIXME: GRStateManager::scanReachableSymbols now supports scanning MemRegions.
Ted Kremenek [Tue, 3 Mar 2009 02:51:43 +0000 (02:51 +0000)]
Implement FIXME: GRStateManager::scanReachableSymbols now supports scanning MemRegions.

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

15 years agoUpdate checker build.
Ted Kremenek [Tue, 3 Mar 2009 01:44:57 +0000 (01:44 +0000)]
Update checker build.

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

15 years agoAdd StoreManager::getSubRegionMap(). This method returns an opaque mapping for clien...
Ted Kremenek [Tue, 3 Mar 2009 01:35:36 +0000 (01:35 +0000)]
Add StoreManager::getSubRegionMap().  This method returns an opaque mapping for clients of StoreManagers from MemRegions to their subregions.

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

15 years agoCheck of ivar access access control.
Fariborz Jahanian [Tue, 3 Mar 2009 01:21:12 +0000 (01:21 +0000)]
Check of ivar access access control.

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

15 years agoFix <rdar://problem/6635908> crash on invalid
Steve Naroff [Tue, 3 Mar 2009 00:45:38 +0000 (00:45 +0000)]
Fix <rdar://problem/6635908> crash on invalid

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

15 years agoAdd test case for pointer arithmetic.
Zhongxing Xu [Tue, 3 Mar 2009 00:28:42 +0000 (00:28 +0000)]
Add test case for pointer arithmetic.

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

15 years agofix PR#
Chris Lattner [Tue, 3 Mar 2009 00:00:26 +0000 (00:00 +0000)]
fix PR#

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

15 years agoAdjust CSS to make message bubble numbers less gaudy.
Ted Kremenek [Mon, 2 Mar 2009 23:39:27 +0000 (23:39 +0000)]
Adjust CSS to make message bubble numbers less gaudy.

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

15 years agoResize message bubble back to original size.
Ted Kremenek [Mon, 2 Mar 2009 23:06:15 +0000 (23:06 +0000)]
Resize message bubble back to original size.

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

15 years agoAdjust HTML message bubbles to utilize information from PathDiagnosticPiece::Kind.
Ted Kremenek [Mon, 2 Mar 2009 23:05:40 +0000 (23:05 +0000)]
Adjust HTML message bubbles to utilize information from PathDiagnosticPiece::Kind.

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

15 years agoAdd plumbing to support programatically defining __SSE2__ and friends,
Chris Lattner [Mon, 2 Mar 2009 22:40:39 +0000 (22:40 +0000)]
Add plumbing to support programatically defining __SSE2__ and friends,
even though we still hard code sse2 for now.  No support for 3dnow or sse4a,
but someone could add that if they desired.

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

15 years agominor cleanups to target-specific #defines, no functionality change.
Chris Lattner [Mon, 2 Mar 2009 22:27:17 +0000 (22:27 +0000)]
minor cleanups to target-specific #defines, no functionality change.

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

15 years agoimprove compatibility with GCC 4.4, patch by Michel Salim (PR3697)
Chris Lattner [Mon, 2 Mar 2009 22:20:04 +0000 (22:20 +0000)]
improve compatibility with GCC 4.4, patch by Michel Salim (PR3697)

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

15 years agostart wiring up support for target-specific -mfoo options like -msse
Chris Lattner [Mon, 2 Mar 2009 22:11:07 +0000 (22:11 +0000)]
start wiring up support for target-specific -mfoo options like -msse

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

15 years agoFix <rdar://problem/6636803> [sema] crash on InterfaceBuilder.
Steve Naroff [Mon, 2 Mar 2009 22:00:56 +0000 (22:00 +0000)]
Fix <rdar://problem/6636803> [sema] crash on InterfaceBuilder.

Parser::ParseObjCMethodDefinition(): Make sure we don't exit the BodyScope until ActOnFinishFunctionBody() is complete.

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

15 years agoDiagnose a variety of access of ivars when they conflict with
Fariborz Jahanian [Mon, 2 Mar 2009 21:55:29 +0000 (21:55 +0000)]
Diagnose a variety of access of ivars when they conflict with
local or global variables in instance/class methods.

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

15 years agoPlist diagnostics now include PathDiagnostPiece::Kind.
Ted Kremenek [Mon, 2 Mar 2009 21:44:02 +0000 (21:44 +0000)]
Plist diagnostics now include PathDiagnostPiece::Kind.

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

15 years agoUpdate HTML diagnostics to honor the different between 'event' and 'control-flow...
Ted Kremenek [Mon, 2 Mar 2009 21:42:01 +0000 (21:42 +0000)]
Update HTML diagnostics to honor the different between 'event' and 'control-flow' diagnostics.

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

15 years agoBugReporter: Construct path-related PathDiagnosticPieces with kind "ControlFlow".
Ted Kremenek [Mon, 2 Mar 2009 21:41:18 +0000 (21:41 +0000)]
BugReporter: Construct path-related PathDiagnosticPieces with kind "ControlFlow".

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

15 years agoUpdate Xcode project.
Ted Kremenek [Mon, 2 Mar 2009 21:00:12 +0000 (21:00 +0000)]
Update Xcode project.

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

15 years agofix PR2639
Chris Lattner [Mon, 2 Mar 2009 20:58:48 +0000 (20:58 +0000)]
fix PR2639

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

15 years agoStub out some structure for C++ driver.
Daniel Dunbar [Mon, 2 Mar 2009 19:59:07 +0000 (19:59 +0000)]
Stub out some structure for C++ driver.

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

15 years agoinline asm calls should be nounwind. Chris, please review.
Anders Carlsson [Mon, 2 Mar 2009 19:58:15 +0000 (19:58 +0000)]
inline asm calls should be nounwind. Chris, please review.

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

15 years agoFix name.
Daniel Dunbar [Mon, 2 Mar 2009 19:50:00 +0000 (19:50 +0000)]
Fix name.

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

15 years agoUpdate Xcode project.
Ted Kremenek [Mon, 2 Mar 2009 19:41:07 +0000 (19:41 +0000)]
Update Xcode project.

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

15 years agoAdd a 'kind' field to PathDiagnosticPieces.
Ted Kremenek [Mon, 2 Mar 2009 19:40:38 +0000 (19:40 +0000)]
Add a 'kind' field to PathDiagnosticPieces.

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

15 years agoFor now, do not output the 'DisplayHint' in plist files.
Ted Kremenek [Mon, 2 Mar 2009 19:40:15 +0000 (19:40 +0000)]
For now, do not output the 'DisplayHint' in plist files.

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

15 years agoFor now, do not output the 'DisplayHint' in plist files.
Ted Kremenek [Mon, 2 Mar 2009 19:39:50 +0000 (19:39 +0000)]
For now, do not output the 'DisplayHint' in plist files.

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

15 years agoFixed a typo.
Fariborz Jahanian [Mon, 2 Mar 2009 19:06:08 +0000 (19:06 +0000)]
Fixed a typo.

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

15 years agoCheck for duplicate declaration of method of a class
Fariborz Jahanian [Mon, 2 Mar 2009 19:05:07 +0000 (19:05 +0000)]
Check for duplicate declaration of method of a class
in its extension.

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

15 years agoNormalize .h guards.
Daniel Dunbar [Mon, 2 Mar 2009 18:59:45 +0000 (18:59 +0000)]
Normalize .h guards.

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

15 years agoAttempt to make test more robust (fails for users who put LLVM in
Daniel Dunbar [Mon, 2 Mar 2009 18:50:36 +0000 (18:50 +0000)]
Attempt to make test more robust (fails for users who put LLVM in
/path/with/store/in/it").

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

15 years agoEnable Objective-C interface debug info.
Devang Patel [Mon, 2 Mar 2009 17:58:28 +0000 (17:58 +0000)]
Enable Objective-C interface debug info.

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

15 years agoFix cmake builds.
Mike Stump [Mon, 2 Mar 2009 17:05:26 +0000 (17:05 +0000)]
Fix cmake builds.

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

15 years agoremove an implemented fixme.
Zhongxing Xu [Mon, 2 Mar 2009 08:25:09 +0000 (08:25 +0000)]
remove an implemented fixme.

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

15 years agoInitial support for pointer arithmetic. Only support concrete indexes and
Zhongxing Xu [Mon, 2 Mar 2009 07:52:23 +0000 (07:52 +0000)]
Initial support for pointer arithmetic. Only support concrete indexes and
offsets for now.

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

15 years agoAvoid crash when child iterator gives null result.
Daniel Dunbar [Mon, 2 Mar 2009 07:00:57 +0000 (07:00 +0000)]
Avoid crash when child iterator gives null result.

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

15 years agoRename lib/Driver (etc) to lib/Frontend in prep for the *actual*
Daniel Dunbar [Mon, 2 Mar 2009 06:16:29 +0000 (06:16 +0000)]
Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*
driver taking lib/Driver.

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

15 years agoABITestGen: Add v2i16 and v16f32 as default vector types to generate.
Daniel Dunbar [Mon, 2 Mar 2009 06:14:33 +0000 (06:14 +0000)]
ABITestGen: Add v2i16 and v16f32 as default vector types to generate.

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

15 years agoFirst cut at zero-cost EH support.
Daniel Dunbar [Mon, 2 Mar 2009 06:08:11 +0000 (06:08 +0000)]
First cut at zero-cost EH support.
 - Still manually generates the EH code; the parts related to cleanup
   need to be integrated into the cleanup stack (for proper
   interaction with VLAs, etc.).

 - Some differences vs gcc in corner cases; I believe our behavior is
   correct but need to verify/file bugs vs gcc.

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

15 years agoMake sure to invoke (not call) to objc_exception_throw if necessary.
Daniel Dunbar [Mon, 2 Mar 2009 05:20:36 +0000 (05:20 +0000)]
Make sure to invoke (not call) to objc_exception_throw if necessary.

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

15 years agoFix completely broken thinko in GetClassGlobal.
Daniel Dunbar [Mon, 2 Mar 2009 05:18:14 +0000 (05:18 +0000)]
Fix completely broken thinko in GetClassGlobal.

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

15 years agoDon't set nounwind on functions when in using the new Obj-C ABI.
Daniel Dunbar [Mon, 2 Mar 2009 04:58:03 +0000 (04:58 +0000)]
Don't set nounwind on functions when in using the new Obj-C ABI.

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

15 years agoCleanup handling of function attributes in calls.
Daniel Dunbar [Mon, 2 Mar 2009 04:32:35 +0000 (04:32 +0000)]
Cleanup handling of function attributes in calls.
 - No intended functionality change.

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

15 years agoPush checking down, also, give the user a hit as to which part of the
Mike Stump [Mon, 2 Mar 2009 03:04:42 +0000 (03:04 +0000)]
Push checking down, also, give the user a hit as to which part of the
block literal is causing the problem, instead of the vague reference
to the entire block literal.

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

15 years agoRework the way we find locally-scoped external declarations when we
Douglas Gregor [Mon, 2 Mar 2009 00:19:53 +0000 (00:19 +0000)]
Rework the way we find locally-scoped external declarations when we
need them to evaluate redeclarations or call a function that hasn't
already been declared. We now keep a DenseMap of these locally-scoped
declarations so that they are not visible but can be quickly found,
e.g., when we're looking for previous declarations or before we go
ahead and implicitly declare a function that's being called. Fixes
PR3672.

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

15 years agoAdd BLOCK_HAS_DESCRIPTOR to global blocks.
Anders Carlsson [Sun, 1 Mar 2009 21:09:29 +0000 (21:09 +0000)]
Add BLOCK_HAS_DESCRIPTOR to global blocks.

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

15 years agoBe sure to mark blocks with no imports as being global.
Mike Stump [Sun, 1 Mar 2009 20:07:53 +0000 (20:07 +0000)]
Be sure to mark blocks with no imports as being global.

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

15 years agosimplify some code.
Chris Lattner [Sun, 1 Mar 2009 18:47:06 +0000 (18:47 +0000)]
simplify some code.

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

15 years agoFix <rdar://problem/6248764> parser rejects: bad receiver type 'CFStringRef'.
Steve Naroff [Sun, 1 Mar 2009 17:14:31 +0000 (17:14 +0000)]
Fix <rdar://problem/6248764> parser rejects: bad receiver type 'CFStringRef'.

Downgrade an error to a warning (for GCC compatibility).

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

15 years agoFix PR3509 by providing correct starting locations for initializer lists
Douglas Gregor [Sun, 1 Mar 2009 17:12:46 +0000 (17:12 +0000)]
Fix PR3509 by providing correct starting locations for initializer lists

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

15 years agoFix <rdar://problem/6619539> incompatible pointer types sending 'XCElementSpacer...
Steve Naroff [Sun, 1 Mar 2009 16:12:44 +0000 (16:12 +0000)]
Fix <rdar://problem/6619539> incompatible pointer types sending 'XCElementSpacer *', expected 'XCElement *' (not handling protocol signatures correctly?).

- Reworked ASTContext::canAssignObjCInterfaces().
- Added ObjCProtocolDecl::lookupProtocolNamed().

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

15 years agoRename AnonTypedRegion to TypedViewRegion.
Ted Kremenek [Sun, 1 Mar 2009 05:44:08 +0000 (05:44 +0000)]
Rename AnonTypedRegion to TypedViewRegion.

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

15 years agoAdjust wording of bug names.
Ted Kremenek [Sun, 1 Mar 2009 05:43:22 +0000 (05:43 +0000)]
Adjust wording of bug names.

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

15 years agoObj-C non fragile ABI: Use GetClassGlobal in one more instance I missed.
Daniel Dunbar [Sun, 1 Mar 2009 04:51:18 +0000 (04:51 +0000)]
Obj-C non fragile ABI: Use GetClassGlobal in one more instance I missed.

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

15 years agoObj-C non fragile ABI: Add GetInterfaceEHType for getting the Obj-C
Daniel Dunbar [Sun, 1 Mar 2009 04:46:24 +0000 (04:46 +0000)]
Obj-C non fragile ABI: Add GetInterfaceEHType for getting the Obj-C
exception typeinfo metadata, and a few other EH related types/functions.
 - No functionality change.

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

15 years agoNeXT: Unify code for creating a class global.
Daniel Dunbar [Sun, 1 Mar 2009 04:40:10 +0000 (04:40 +0000)]
NeXT: Unify code for creating a class global.
 - No functionality change.

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

15 years agoObjCAtCatchStmt's ParamStmt is always a DeclStmt.
Daniel Dunbar [Sun, 1 Mar 2009 04:28:32 +0000 (04:28 +0000)]
ObjCAtCatchStmt's ParamStmt is always a DeclStmt.

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

15 years agotestcase for mike's fix for PR3612
Chris Lattner [Sun, 1 Mar 2009 03:26:22 +0000 (03:26 +0000)]
testcase for mike's fix for PR3612

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

15 years agoThis test requires blocks.
Daniel Dunbar [Sun, 1 Mar 2009 02:20:08 +0000 (02:20 +0000)]
This test requires blocks.

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

15 years agoRemove debugging code.
Anders Carlsson [Sun, 1 Mar 2009 02:12:54 +0000 (02:12 +0000)]
Remove debugging code.

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

15 years agoEmit errors about unsupported blocks features.
Anders Carlsson [Sun, 1 Mar 2009 01:45:25 +0000 (01:45 +0000)]
Emit errors about unsupported blocks features.

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

15 years agoInitialize NSConcreteStackBlock
Anders Carlsson [Sun, 1 Mar 2009 01:17:11 +0000 (01:17 +0000)]
Initialize NSConcreteStackBlock

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

15 years agoDo some blocks cleanup and simplification. Fix a crash, and add a test case.
Anders Carlsson [Sun, 1 Mar 2009 01:09:12 +0000 (01:09 +0000)]
Do some blocks cleanup and simplification. Fix a crash, and add a test case.

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

15 years agoadjust to changes in the mainline llvm .ll printer.
Chris Lattner [Sun, 1 Mar 2009 00:59:19 +0000 (00:59 +0000)]
adjust to changes in the mainline llvm .ll printer.

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

15 years ago"This patch uses the new ObjCImplDecl class to merge Sema::ImplMethodsVsClassMethods...
Chris Lattner [Sun, 1 Mar 2009 00:56:52 +0000 (00:56 +0000)]
"This patch uses the new ObjCImplDecl class to merge  Sema::ImplMethodsVsClassMethods and Sema::ImplCategoryMethodsVsIntfMethods methods.
And now, when clang check a class implementation to find unimplemented methods, it also checks all methods from the class extensions (unnamed categories).

There is also a test case to check this warning.

This patch contains also a minor update for ObjCImplDecl . getNameAsCString and getNameAsString now returns an empty string instead of crashing for unnamed categories."

Patch by Jean-Daniel Dupas!

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

15 years agoWhoops, actually remove the VLA/VM check in FinalizeDeclaratorGroup.
Anders Carlsson [Sat, 28 Feb 2009 23:31:06 +0000 (23:31 +0000)]
Whoops, actually remove the VLA/VM check in FinalizeDeclaratorGroup.

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

15 years agoFix invalid VLAs/VMs in Sema::ActOnVariableDeclarator, so that the variable will...
Anders Carlsson [Sat, 28 Feb 2009 21:56:50 +0000 (21:56 +0000)]
Fix invalid VLAs/VMs in Sema::ActOnVariableDeclarator, so that the variable will have the right type by the time the initializer is checked. This ensures that code like

int a[(int)(1.0 / 1.0) = { 1 } will work.

Eli, please review.

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