]> granicus.if.org Git - clang/log
clang
14 years agoCode completion for Objective-C class names after @interface,
Douglas Gregor [Wed, 18 Nov 2009 16:26:39 +0000 (16:26 +0000)]
Code completion for Objective-C class names after @interface,
@implementation, and in the declaration of the superclass of an
@interface.

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

14 years agoFix passing stdc++ correctly in the FreeBSD toolchain support, Credit to Roman Divacky.
Edward O'Callaghan [Wed, 18 Nov 2009 14:51:31 +0000 (14:51 +0000)]
Fix passing stdc++ correctly in the FreeBSD toolchain support, Credit to Roman Divacky.

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

14 years agoUpdate index tests for r89203.
Benjamin Kramer [Wed, 18 Nov 2009 14:20:01 +0000 (14:20 +0000)]
Update index tests for r89203.

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

14 years agoPredefine __INTMAX_WIDTH__ for the future parameterization of INTMAX macros in
Ken Dyck [Wed, 18 Nov 2009 13:52:57 +0000 (13:52 +0000)]
Predefine __INTMAX_WIDTH__ for the future parameterization of INTMAX macros in
stdint.h.

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

14 years agoMinor cleanup to member pointer handling.
Eli Friedman [Wed, 18 Nov 2009 09:41:26 +0000 (09:41 +0000)]
Minor cleanup to member pointer handling.

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

14 years agoSplit LookupResult into its own header.
John McCall [Wed, 18 Nov 2009 07:57:50 +0000 (07:57 +0000)]
Split LookupResult into its own header.

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

14 years agoClean up EmitPointerToDataMemberBinaryExpr a bit.
Eli Friedman [Wed, 18 Nov 2009 05:01:17 +0000 (05:01 +0000)]
Clean up EmitPointerToDataMemberBinaryExpr a bit.

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

14 years agoCode completion after @property, providing the names of forward-declared properties
Douglas Gregor [Wed, 18 Nov 2009 04:49:41 +0000 (04:49 +0000)]
Code completion after @property, providing the names of forward-declared properties

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

14 years agoRename code-completion test to actually make sense
Douglas Gregor [Wed, 18 Nov 2009 04:41:01 +0000 (04:41 +0000)]
Rename code-completion test to actually make sense

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

14 years agoCode completion for Objective-C properly lists
Douglas Gregor [Wed, 18 Nov 2009 04:19:12 +0000 (04:19 +0000)]
Code completion for Objective-C properly lists

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

14 years agoSet up vtable visibility appropriately.
Mike Stump [Wed, 18 Nov 2009 04:00:48 +0000 (04:00 +0000)]
Set up vtable visibility appropriately.

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

14 years agoMake CreateOverloadedUnaryOp build the correct node for postinc/dec operators.
Eli Friedman [Wed, 18 Nov 2009 03:58:17 +0000 (03:58 +0000)]
Make CreateOverloadedUnaryOp build the correct node for postinc/dec operators.

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

14 years agoPropagate hidden to the _ZTS symbols appropriately. WIP.
Mike Stump [Wed, 18 Nov 2009 03:46:51 +0000 (03:46 +0000)]
Propagate hidden to the _ZTS symbols appropriately.  WIP.

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

14 years agoAdd an assertion to catch bad calls to EmitCallArgs.
Eli Friedman [Wed, 18 Nov 2009 03:42:04 +0000 (03:42 +0000)]
Add an assertion to catch bad calls to EmitCallArgs.

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

14 years agoSimplify ActOnPostfixUnaryOp.
Eli Friedman [Wed, 18 Nov 2009 03:38:04 +0000 (03:38 +0000)]
Simplify ActOnPostfixUnaryOp.

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

14 years agoBe sure to set visibility for ZTI symbols for classes from the class.
Mike Stump [Wed, 18 Nov 2009 03:21:29 +0000 (03:21 +0000)]
Be sure to set visibility for ZTI symbols for classes from the class.

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

14 years agoMake _ZTI symbols hidden. This speeds up the dynamic linker.
Mike Stump [Wed, 18 Nov 2009 02:53:28 +0000 (02:53 +0000)]
Make _ZTI symbols hidden.  This speeds up the dynamic linker.

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

14 years agoIncremental progress on using declarations. Split UnresolvedUsingDecl into
John McCall [Wed, 18 Nov 2009 02:36:19 +0000 (02:36 +0000)]
Incremental progress on using declarations.  Split UnresolvedUsingDecl into
two classes, one for typenames and one for values;  this seems to have some
support from Doug if not necessarily from the extremely-vague-on-this-point
standard.  Track the location of the 'typename' keyword in a using-typename
decl.  Make a new lookup result for unresolved values and deal with it in
most places.

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

14 years agoAdd special clang_getCursor() support for @class. Handles <rdar://problem/7383421>.
Ted Kremenek [Wed, 18 Nov 2009 02:02:52 +0000 (02:02 +0000)]
Add special clang_getCursor() support for @class.  Handles <rdar://problem/7383421>.

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

14 years agoCode completion for member accesses that involve Objective-C properties and instance...
Douglas Gregor [Wed, 18 Nov 2009 01:29:26 +0000 (01:29 +0000)]
Code completion for member accesses that involve Objective-C properties and instance variables

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

14 years agoEliminate some completely-redundant lookups
Douglas Gregor [Wed, 18 Nov 2009 01:29:02 +0000 (01:29 +0000)]
Eliminate some completely-redundant lookups

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

14 years agoPR5520: Make sure to check whether the base type is complete before looking for
Eli Friedman [Wed, 18 Nov 2009 01:28:03 +0000 (01:28 +0000)]
PR5520: Make sure to check whether the base type is complete before looking for
operator->.

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

14 years agoAdd ObjCClassDecl::getSourceRange().
Ted Kremenek [Wed, 18 Nov 2009 01:26:56 +0000 (01:26 +0000)]
Add ObjCClassDecl::getSourceRange().

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

14 years agoMissing piece of r89173.
Eli Friedman [Wed, 18 Nov 2009 00:57:03 +0000 (00:57 +0000)]
Missing piece of r89173.

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

14 years agoRefactor emitting call to delete operator into common function EmitDeleteCall.
Eli Friedman [Wed, 18 Nov 2009 00:50:08 +0000 (00:50 +0000)]
Refactor emitting call to delete operator into common function EmitDeleteCall.

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

14 years agoFix one last gotcha with typeid.
Mike Stump [Wed, 18 Nov 2009 00:40:12 +0000 (00:40 +0000)]
Fix one last gotcha with typeid.

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

14 years agoAdd SourceLocations to ObjCClassDecl for the class identifiers referenced by @class.
Ted Kremenek [Wed, 18 Nov 2009 00:28:11 +0000 (00:28 +0000)]
Add SourceLocations to ObjCClassDecl for the class identifiers referenced by @class.

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

14 years agoFinish code completion for Objective-C message sends
Douglas Gregor [Wed, 18 Nov 2009 00:06:18 +0000 (00:06 +0000)]
Finish code completion for Objective-C message sends

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

14 years agoCleanup.
Mike Stump [Tue, 17 Nov 2009 23:51:10 +0000 (23:51 +0000)]
Cleanup.

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

14 years agoAdd rtti support for arrays, functiond without prototypes, vectors and
Mike Stump [Tue, 17 Nov 2009 23:45:57 +0000 (23:45 +0000)]
Add rtti support for arrays, functiond without prototypes, vectors and
enums.

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

14 years agoRename Objective-C message send completion functions to indicate that we're referring...
Douglas Gregor [Tue, 17 Nov 2009 23:31:36 +0000 (23:31 +0000)]
Rename Objective-C message send completion functions to indicate that we're referring to message sends

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

14 years agoRefactor code-completion support for message sends, collecting the
Douglas Gregor [Tue, 17 Nov 2009 23:22:23 +0000 (23:22 +0000)]
Refactor code-completion support for message sends, collecting the
code to find and add Objective-C methods (starting at an
ObjCContainerDecl) into a single, static function. Also, make sure
that we search into the implementations of classes and categories to
find even more methods.

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

14 years agoPass source locations of identifiers referenced by @class through Action::ActOnForwar...
Ted Kremenek [Tue, 17 Nov 2009 23:12:20 +0000 (23:12 +0000)]
Pass source locations of identifiers referenced by @class through Action::ActOnForwardClassDeclaration().

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

14 years agoAdd rtti info for function prototypes and refactor. This allows
Mike Stump [Tue, 17 Nov 2009 23:11:22 +0000 (23:11 +0000)]
Add rtti info for function prototypes and refactor.  This allows
pointer to member functions to work.  WIP.

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

14 years agoDo not register ObjCInterfaceDecls implicitly created by @class in the
Ted Kremenek [Tue, 17 Nov 2009 22:58:30 +0000 (22:58 +0000)]
Do not register ObjCInterfaceDecls implicitly created by @class in the
current DeclContext.  These "imaginary" declarations pose issues for
clients searching DeclContext for actual declarations.  Instead,
register them for name lookup, and add the ObjCInterfaceDecl later to
the DeclContext when we hit an actual @interface declaration.

This also fixes a bug where the invariant that the Decls in a
DeclContext are sorted in order of their appearance is no longer
violated.  What could happen is that an @class causes an
ObjCInterfaceDecl to get added first to the DeclContext, then the
ObjCClassDecl itself is added, and then later the SourceLocation of
the ObjCInterfaceDecl is updated with the correct location (which is
later in the file).  This breaks an assumed invariant in
ResolveLocation.cpp (and possibly other clients).

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

14 years agoThis patch finalizes implementatin of weak_import
Fariborz Jahanian [Tue, 17 Nov 2009 22:42:00 +0000 (22:42 +0000)]
This patch finalizes implementatin of weak_import
objective-c2 classes (radar 6815425).

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

14 years agoAdd rtti support for pointer to data members.
Mike Stump [Tue, 17 Nov 2009 22:33:00 +0000 (22:33 +0000)]
Add rtti support for pointer to data members.

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

14 years agoDrop unnecessary #include.
Daniel Dunbar [Tue, 17 Nov 2009 22:25:16 +0000 (22:25 +0000)]
Drop unnecessary #include.

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

14 years agoRemove unnecessary &&s.
Daniel Dunbar [Tue, 17 Nov 2009 22:25:07 +0000 (22:25 +0000)]
Remove unnecessary &&s.

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

14 years agoMore cases for weak_import objective-c2 classes.
Fariborz Jahanian [Tue, 17 Nov 2009 22:02:21 +0000 (22:02 +0000)]
More cases for weak_import objective-c2 classes.
(still radar 6815425).

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

14 years agoFix -Asserts warning.
Daniel Dunbar [Tue, 17 Nov 2009 21:51:03 +0000 (21:51 +0000)]
Fix -Asserts warning.

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

14 years agoAdd rtti support for non-member pointers. WIP.
Mike Stump [Tue, 17 Nov 2009 21:44:24 +0000 (21:44 +0000)]
Add rtti support for non-member pointers.  WIP.

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

14 years agoMore support for weak_import objective-c2 class.
Fariborz Jahanian [Tue, 17 Nov 2009 21:37:35 +0000 (21:37 +0000)]
More support for weak_import objective-c2 class.
(radar 6815425).

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

14 years agoImprove location information when adding conversion candidates
Douglas Gregor [Tue, 17 Nov 2009 21:16:22 +0000 (21:16 +0000)]
Improve location information when adding conversion candidates

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

14 years agofgetln is a BSDism; replace it with more portable code.
Benjamin Kramer [Tue, 17 Nov 2009 20:51:40 +0000 (20:51 +0000)]
fgetln is a BSDism; replace it with more portable code.

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

14 years agoAdd c-index-test mode "-test-file-scan", which scans a source file and calls clang_ge...
Ted Kremenek [Tue, 17 Nov 2009 19:37:36 +0000 (19:37 +0000)]
Add c-index-test mode "-test-file-scan", which scans a source file and calls clang_getCursor() on every character.

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

14 years agoFix test case.
Ted Kremenek [Tue, 17 Nov 2009 19:36:36 +0000 (19:36 +0000)]
Fix test case.

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

14 years agoAdded block type introspection support.
David Chisnall [Tue, 17 Nov 2009 19:33:30 +0000 (19:33 +0000)]
Added block type introspection support.

As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple.

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

14 years agoFixed bug where ivar offsets were being initialized as 0 with the fragile GNU ABI.
David Chisnall [Tue, 17 Nov 2009 19:32:15 +0000 (19:32 +0000)]
Fixed bug where ivar offsets were being initialized as 0 with the fragile GNU ABI.

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

14 years agoRename test.
Ted Kremenek [Tue, 17 Nov 2009 19:29:41 +0000 (19:29 +0000)]
Rename test.

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

14 years agoAdd clang_getNullCursor() and clang_equalCursors() (the latter for comparing cursors).
Ted Kremenek [Tue, 17 Nov 2009 19:28:59 +0000 (19:28 +0000)]
Add clang_getNullCursor() and clang_equalCursors() (the latter for comparing cursors).

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

14 years agoUndo previous test fix. -split-phi-edges now disables automatically when the
Jakob Stoklund Olesen [Tue, 17 Nov 2009 19:18:32 +0000 (19:18 +0000)]
Undo previous test fix. -split-phi-edges now disables automatically when the
local register allocator is used.

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

14 years agoStart support of weak_import objective-c classes.
Fariborz Jahanian [Tue, 17 Nov 2009 19:08:08 +0000 (19:08 +0000)]
Start support of weak_import objective-c classes.
(Radar 6815425).

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

14 years agoReplace (-INT8_C(128)), which uses an illegally out-of-range argument for
Ken Dyck [Tue, 17 Nov 2009 18:29:12 +0000 (18:29 +0000)]
Replace (-INT8_C(128)), which uses an illegally out-of-range argument for
INT8_C, with (-INT8_C(127)-1) in the definition of INT8_MIN. Apply similar
changes to the definitions of INT16_MIN and INT24_MIN.

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

14 years agoAllow "source_filename" to be an optional argument (the client can provide NULL)...
Ted Kremenek [Tue, 17 Nov 2009 18:18:02 +0000 (18:18 +0000)]
Allow "source_filename" to be an optional argument (the client can provide NULL).  This allows the client to put the source_filename in the command_line_args without fear of the file being named twice.

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

14 years agoOrganize c-index-test into logic sections, and add section headers.
Ted Kremenek [Tue, 17 Nov 2009 18:13:31 +0000 (18:13 +0000)]
Organize c-index-test into logic sections, and add section headers.

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

14 years agoClean up c-index-test command line usage a bit by requiring a "-test-load-tu" option...
Ted Kremenek [Tue, 17 Nov 2009 18:09:14 +0000 (18:09 +0000)]
Clean up c-index-test command line usage a bit by requiring a "-test-load-tu" option when testing clang_loadTranslationUnit().  Running c-index-test without the correct arguments now also prints a useful summary of its correct usage.

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

14 years agoAdjust format attribute index for implicit object arguments. Fixes PR5521.
Sebastian Redl [Tue, 17 Nov 2009 18:02:24 +0000 (18:02 +0000)]
Adjust format attribute index for implicit object arguments. Fixes PR5521.

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

14 years agoImplement code completion for Objective-C message sends to "super".
Douglas Gregor [Tue, 17 Nov 2009 17:59:40 +0000 (17:59 +0000)]
Implement code completion for Objective-C message sends to "super".

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

14 years agoFixes a typo, reported by Doug.
Fariborz Jahanian [Tue, 17 Nov 2009 17:15:16 +0000 (17:15 +0000)]
Fixes a typo, reported by Doug.

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

14 years agoFix PR5531.
Anders Carlsson [Tue, 17 Nov 2009 17:11:23 +0000 (17:11 +0000)]
Fix PR5531.

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

14 years agoMake sure, for sure this time, that expressions do not have reference type
Douglas Gregor [Tue, 17 Nov 2009 16:44:57 +0000 (16:44 +0000)]
Make sure, for sure this time, that expressions do not have reference type

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

14 years agoAugment code-completion results to provide argument names and
Douglas Gregor [Tue, 17 Nov 2009 16:44:22 +0000 (16:44 +0000)]
Augment code-completion results to provide argument names and
placeholder arguments for Objective-C message sends.

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

14 years agoStringRef'ify CodeCompletionString
Douglas Gregor [Tue, 17 Nov 2009 16:43:05 +0000 (16:43 +0000)]
StringRef'ify CodeCompletionString

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

14 years agoUse the INTn_C integer constant macros to generate limit constants with correct
Ken Dyck [Tue, 17 Nov 2009 16:26:27 +0000 (16:26 +0000)]
Use the INTn_C integer constant macros to generate limit constants with correct
suffixes. This corrects the suffixes for the limit constants of the 32-bit
types on MSP430 and PIC16, and the 64-bit types on PPC64, SystemZ, X86_64.

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

14 years agorecognize .hpp as c++ (needed for ./configure'ing boost)
Nuno Lopes [Tue, 17 Nov 2009 15:36:35 +0000 (15:36 +0000)]
recognize .hpp as c++ (needed for ./configure'ing boost)

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

14 years agoadd Fedora 11 include path. what a crap..
Nuno Lopes [Tue, 17 Nov 2009 15:28:35 +0000 (15:28 +0000)]
add Fedora 11 include path.  what a crap..

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

14 years agoMake test header independent so it doesn't fail on freebsd. I hope this doesn't
Benjamin Kramer [Tue, 17 Nov 2009 14:02:16 +0000 (14:02 +0000)]
Make test header independent so it doesn't fail on freebsd. I hope this doesn't
hurt the intention of the test.

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

14 years agoRemove unnecessary parens around the bodies of integer constant macros. C99
Ken Dyck [Tue, 17 Nov 2009 13:54:02 +0000 (13:54 +0000)]
Remove unnecessary parens around the bodies of integer constant macros. C99
requires that their arguments be decimal, hex, octal constants---no signs
allowed---making the parens unnecessary.

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

14 years agoFix MSVC warning.
Benjamin Kramer [Tue, 17 Nov 2009 11:15:38 +0000 (11:15 +0000)]
Fix MSVC warning.

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

14 years agoTemporarily unbreak the clang-on-llvm tests. :) Not going to fix unresolved
John McCall [Tue, 17 Nov 2009 10:36:41 +0000 (10:36 +0000)]
Temporarily unbreak the clang-on-llvm tests. :)  Not going to fix unresolved
lookup all in a night.

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

14 years ago... and add back a few more triple forces.
Daniel Dunbar [Tue, 17 Nov 2009 10:27:58 +0000 (10:27 +0000)]
... and add back a few more triple forces.

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

14 years agoRemove stale reference to old WPA dir, patch by Kovarththanan Rajaratnam.
Daniel Dunbar [Tue, 17 Nov 2009 10:15:57 +0000 (10:15 +0000)]
Remove stale reference to old WPA dir, patch by Kovarththanan Rajaratnam.

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

14 years agoUse clang to run tests which include headers from the system.
Daniel Dunbar [Tue, 17 Nov 2009 10:14:55 +0000 (10:14 +0000)]
Use clang to run tests which include headers from the system.

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

14 years agoAdd some -triples I was a little too liberal in removing.
Daniel Dunbar [Tue, 17 Nov 2009 10:04:38 +0000 (10:04 +0000)]
Add some -triples I was a little too liberal in removing.

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

14 years agoMerge several visibility tests into hidden-visibility.m, and check .ll output
Daniel Dunbar [Tue, 17 Nov 2009 10:04:28 +0000 (10:04 +0000)]
Merge several visibility tests into hidden-visibility.m, and check .ll output
not .s output.

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

14 years agoAdd missed CMake file for adding clang examples to CMake build.
Daniel Dunbar [Tue, 17 Nov 2009 09:40:40 +0000 (09:40 +0000)]
Add missed CMake file for adding clang examples to CMake build.

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

14 years agoSkip over shadow using decls during codegen.
John McCall [Tue, 17 Nov 2009 09:33:40 +0000 (09:33 +0000)]
Skip over shadow using decls during codegen.

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

14 years agoAdd optional CMake build for Clang examples, patch by Kovarththanan Rajaratnam.
Daniel Dunbar [Tue, 17 Nov 2009 09:32:51 +0000 (09:32 +0000)]
Add optional CMake build for Clang examples, patch by Kovarththanan Rajaratnam.

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

14 years agoSimplify CompilerInvocation::toArgs, now that LangOptions handling is more predictable.
Daniel Dunbar [Tue, 17 Nov 2009 09:15:57 +0000 (09:15 +0000)]
Simplify CompilerInvocation::toArgs, now that LangOptions handling is more predictable.

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

14 years agoEliminate TargetInfo::getDefaultLangOptions, this kind of logic is better done
Daniel Dunbar [Tue, 17 Nov 2009 09:15:44 +0000 (09:15 +0000)]
Eliminate TargetInfo::getDefaultLangOptions, this kind of logic is better done
in the driver.

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

14 years agoUse -fblocks and -fobjc-nonfragile-abi when that is what is being tested, instead...
Daniel Dunbar [Tue, 17 Nov 2009 09:04:12 +0000 (09:04 +0000)]
Use -fblocks and -fobjc-nonfragile-abi when that is what is being tested, instead of forcing the triple.

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

14 years agoAdd PreVisitReturn to Malloc checker. Now we can recognize returned memory
Zhongxing Xu [Tue, 17 Nov 2009 08:58:18 +0000 (08:58 +0000)]
Add PreVisitReturn to Malloc checker. Now we can recognize returned memory
block.

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

14 years agoDon't #include <stdio.h> when tests don't need it, or use clang instead of clang...
Daniel Dunbar [Tue, 17 Nov 2009 08:57:36 +0000 (08:57 +0000)]
Don't #include <stdio.h> when tests don't need it, or use clang instead of clang-cc when they do.

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

14 years agoRemove some redundant tests.
Daniel Dunbar [Tue, 17 Nov 2009 08:57:06 +0000 (08:57 +0000)]
Remove some redundant tests.

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

14 years agoCommit this random test case.
John McCall [Tue, 17 Nov 2009 08:57:02 +0000 (08:57 +0000)]
Commit this random test case.

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

14 years agoAdd -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
Daniel Dunbar [Tue, 17 Nov 2009 08:07:36 +0000 (08:07 +0000)]
Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
instead of using getDefaultLangOptions.
 - Remove unused -fobjc-tight-layout while at it.

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

14 years agoAdd driver::types::isObjC predicate.
Daniel Dunbar [Tue, 17 Nov 2009 08:07:16 +0000 (08:07 +0000)]
Add driver::types::isObjC predicate.

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

14 years agoAdd EvalEndPath interface to Checker. Now we can check memory leaked at the
Zhongxing Xu [Tue, 17 Nov 2009 07:54:15 +0000 (07:54 +0000)]
Add EvalEndPath interface to Checker. Now we can check memory leaked at the
end of the path. Need to unify interfaces.

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

14 years agoStore "sugared" decls in LookupResults (i.e. decl aliases like using declarations);
John McCall [Tue, 17 Nov 2009 07:50:12 +0000 (07:50 +0000)]
Store "sugared" decls in LookupResults (i.e. decl aliases like using declarations);
strip the sugar off in getFoundDecl() and getAsSingleDecl(), but leave it on for
clients like overload resolution who want to use the iterators.

Refactor a few pieces of overload resolution to strip off using declarations in
a single place.  Don't do anything useful with the extra context knowledge yet.

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

14 years agoClear the dest set.
Zhongxing Xu [Tue, 17 Nov 2009 07:19:51 +0000 (07:19 +0000)]
Clear the dest set.

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

14 years agoMove -fnext-runtime defaulting to driver (and change clang-cc default to
Daniel Dunbar [Tue, 17 Nov 2009 07:07:28 +0000 (07:07 +0000)]
Move -fnext-runtime defaulting to driver (and change clang-cc default to
-fnext-runtime), instead of using getDefaultLangOptions.

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

14 years agoMove -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.
Daniel Dunbar [Tue, 17 Nov 2009 07:06:20 +0000 (07:06 +0000)]
Move -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.

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

14 years agoSort visitor methods. No functionality change.
Ted Kremenek [Tue, 17 Nov 2009 07:02:15 +0000 (07:02 +0000)]
Sort visitor methods.  No functionality change.

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

14 years agoBe more careful with anonymous namespaces, since Clang diagnoses the ambiguity here
Douglas Gregor [Tue, 17 Nov 2009 06:52:37 +0000 (06:52 +0000)]
Be more careful with anonymous namespaces, since Clang diagnoses the ambiguity here

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

14 years agoMove char-is-signed defaulting to driver, instead of using
Daniel Dunbar [Tue, 17 Nov 2009 06:37:03 +0000 (06:37 +0000)]
Move char-is-signed defaulting to driver, instead of using
getDefaultLangOptions.

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

14 years agoAdd newline at the end of the file.
Ted Kremenek [Tue, 17 Nov 2009 06:34:24 +0000 (06:34 +0000)]
Add newline at the end of the file.

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

14 years agoSilence some warnings produced by Clang, and add a missing header
Douglas Gregor [Tue, 17 Nov 2009 06:14:37 +0000 (06:14 +0000)]
Silence some warnings produced by Clang, and add a missing header

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

14 years agoImplement template instantiation for using directives, which is dead simple.
Douglas Gregor [Tue, 17 Nov 2009 06:07:40 +0000 (06:07 +0000)]
Implement template instantiation for using directives, which is dead simple.

Also, make the "don't know how to instantiate a particular kind of
declaration" diagnostic nicer, so we don't have to trap Clang in a
debugger to figure out what went wrong.

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

14 years agoAdd initial cut at CompilerInvocation::toArgs, which "serializes" the CompilerInvocat...
Daniel Dunbar [Tue, 17 Nov 2009 06:02:29 +0000 (06:02 +0000)]
Add initial cut at CompilerInvocation::toArgs, which "serializes" the CompilerInvocation into a list of arguments which can be passed to clang-cc (eventually, clang -cc1).
 - Unfortunately, this is currently a tedious and manual translation. Eventually it would be nice to automatically generate this code.

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