]> granicus.if.org Git - clang/log
clang
14 years agoPreserve more information from a block's original function declarator, if one
John McCall [Fri, 4 Jun 2010 19:02:56 +0000 (19:02 +0000)]
Preserve more information from a block's original function declarator, if one
was given.  Remove some unnecessary accounting from BlockScopeInfo.  Handle
typedef'ed function types until such time as we decide not.

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

14 years agoDriver: Change -dwarf-debug-flags option to pass the original command line
Daniel Dunbar [Fri, 4 Jun 2010 18:47:06 +0000 (18:47 +0000)]
Driver: Change -dwarf-debug-flags option to pass the original command line
arguments after translation, instead of the -cc1 level arguments.

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

14 years agoDriver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
Daniel Dunbar [Fri, 4 Jun 2010 18:28:41 +0000 (18:28 +0000)]
Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
added as the last output step, instead of just hacking it into the link step.
 - Among other things, this fixes dSYM generation when using multiple -arch options.

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

14 years agoDriver: Add an explicit dsymutil action.
Daniel Dunbar [Fri, 4 Jun 2010 18:28:36 +0000 (18:28 +0000)]
Driver: Add an explicit dsymutil action.

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

14 years agoFor C++ copied in objects, use copy constructors in
Fariborz Jahanian [Fri, 4 Jun 2010 16:10:00 +0000 (16:10 +0000)]
For C++ copied in objects, use copy constructors in
setting up block's descriptor. This is on going work to
support c++ specific issues in setting up blocks
various APIs.

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

14 years agoAdd ARM paths for debian. Not enough to bootstrap on a beagle board, but
Rafael Espindola [Fri, 4 Jun 2010 14:28:10 +0000 (14:28 +0000)]
Add ARM paths for debian. Not enough to bootstrap on a beagle board, but
moves us further.

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

14 years agoRestructure how we interpret block-literal declarators. Correctly handle
John McCall [Fri, 4 Jun 2010 11:21:44 +0000 (11:21 +0000)]
Restructure how we interpret block-literal declarators.  Correctly handle
the case where we pick up block arguments from a typedef.  Save the block
signature as it was written, and preserve same through PCH.

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

14 years agoDon't insert in lexical context implicit definitions of static member instances.
Abramo Bagnara [Fri, 4 Jun 2010 09:35:39 +0000 (09:35 +0000)]
Don't insert in lexical context implicit definitions of static member instances.

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

14 years agoWhen checking for equality of template parameter lists, a template
Douglas Gregor [Fri, 4 Jun 2010 08:34:32 +0000 (08:34 +0000)]
When checking for equality of template parameter lists, a template
type parameter pack is distinct from a template type parameter.

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

14 years agoDelay checking for mutable const fields until we're checking the field.
John McCall [Fri, 4 Jun 2010 08:34:12 +0000 (08:34 +0000)]
Delay checking for mutable const fields until we're checking the field.
Allows this check to work properly for instantiated fields and removes
an unnecessary GetTypeForDeclarator call.

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

14 years agoProperly disambiguate between an elaborated-type-specifier and a
Douglas Gregor [Fri, 4 Jun 2010 07:30:15 +0000 (07:30 +0000)]
Properly disambiguate between an elaborated-type-specifier and a
type-parameter within a template parameter list. Found by inspection.

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

14 years agoMore refactoring.
John McCall [Fri, 4 Jun 2010 02:29:22 +0000 (02:29 +0000)]
More refactoring.

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

14 years agoAdd a short circuit in isVirtuallyDerivedFrom.
Anders Carlsson [Fri, 4 Jun 2010 01:40:08 +0000 (01:40 +0000)]
Add a short circuit in isVirtuallyDerivedFrom.

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

14 years agoAssignments to reference variables shouldn't kill the variable.
Jordy Rose [Fri, 4 Jun 2010 01:14:56 +0000 (01:14 +0000)]
Assignments to reference variables shouldn't kill the variable.

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

14 years agoFixed Objective-C type encoding for bitfields for the GNU runtime to match the encodi...
David Chisnall [Fri, 4 Jun 2010 01:10:52 +0000 (01:10 +0000)]
Fixed Objective-C type encoding for bitfields for the GNU runtime to match the encoding used by GCC.

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

14 years agoRemove now unused code.
Anders Carlsson [Fri, 4 Jun 2010 00:59:37 +0000 (00:59 +0000)]
Remove now unused code.

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

14 years agoUse CXXRecordDecl::getFinalOverriders to get final overriders. This speeds up vtable...
Anders Carlsson [Fri, 4 Jun 2010 00:54:04 +0000 (00:54 +0000)]
Use CXXRecordDecl::getFinalOverriders to get final overriders. This speeds up vtable layout by moving away from the old final overrider computation code that had O(N^2) complexity in some cases.

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

14 years agoRemove a couple of unnecessary uses of IsStandardConversion.
John McCall [Fri, 4 Jun 2010 00:29:51 +0000 (00:29 +0000)]
Remove a couple of unnecessary uses of IsStandardConversion.

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

14 years agoCheck the output of this test.
Eli Friedman [Thu, 3 Jun 2010 23:34:11 +0000 (23:34 +0000)]
Check the output of this test.

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

14 years agoThink through my commit this time.
Eli Friedman [Thu, 3 Jun 2010 23:31:53 +0000 (23:31 +0000)]
Think through my commit this time.

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

14 years agoMake sure this test doesn't break when we disallow throwing an exception
Eli Friedman [Thu, 3 Jun 2010 23:22:25 +0000 (23:22 +0000)]
Make sure this test doesn't break when we disallow throwing an exception
in -fno-exceptions mode.

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

14 years agoRemoving commit access test file.
Tom Care [Thu, 3 Jun 2010 22:31:09 +0000 (22:31 +0000)]
Removing commit access test file.

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

14 years agoTesting commit access.
Tom Care [Thu, 3 Jun 2010 22:30:22 +0000 (22:30 +0000)]
Testing commit access.

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

14 years agoClassify NEON intrinsics by overloading-type for codegen
Nate Begeman [Thu, 3 Jun 2010 21:36:23 +0000 (21:36 +0000)]
Classify NEON intrinsics by overloading-type for codegen
Add a few missing instructions

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

14 years agoMake sure to check the accessibility of and mark the destructor for the
Eli Friedman [Thu, 3 Jun 2010 20:39:03 +0000 (20:39 +0000)]
Make sure to check the accessibility of and mark the destructor for the
operand of a throw expression.  Fixes PR7281.

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

14 years agoDon't intentionally try to ignore the value of a scalar expression when we
Eli Friedman [Thu, 3 Jun 2010 19:58:07 +0000 (19:58 +0000)]
Don't intentionally try to ignore the value of a scalar expression when we
actually care about it. Fixes PR7291.

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

14 years agoHack in some really terrible C++ record PCH support that I need right now.
John McCall [Thu, 3 Jun 2010 19:28:45 +0000 (19:28 +0000)]
Hack in some really terrible C++ record PCH support that I need right now.
This is required in order to test:

The ASTImporter should set base classes after formally entering the definition.

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

14 years agoReturn a proper null CXSourceLocation from clang_getLocation() when the SourceLocatio...
Ted Kremenek [Thu, 3 Jun 2010 15:52:32 +0000 (15:52 +0000)]
Return a proper null CXSourceLocation from clang_getLocation() when the SourceLocation is invalid.  Fixes <rdar://problem/8056640>.

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

14 years agoDon't try to explicitly zero out bit-fields.
Anders Carlsson [Thu, 3 Jun 2010 15:36:07 +0000 (15:36 +0000)]
Don't try to explicitly zero out bit-fields.

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

14 years agoTest commit: fix method summary comment
Jordy Rose [Thu, 3 Jun 2010 06:52:32 +0000 (06:52 +0000)]
Test commit: fix method summary comment

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

14 years agoMake addStmt always add stmt. Delegate other cases to Visit() directly.
Zhongxing Xu [Thu, 3 Jun 2010 06:43:23 +0000 (06:43 +0000)]
Make addStmt always add stmt. Delegate other cases to Visit() directly.

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

14 years agoCFG: add all LHS of assingments as lvalue. This improves support for C++ reference...
Zhongxing Xu [Thu, 3 Jun 2010 06:23:18 +0000 (06:23 +0000)]
CFG: add all LHS of assingments as lvalue. This improves support for C++ reference. Patch by Jordy.

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

14 years agoAdd comments.
Zhongxing Xu [Thu, 3 Jun 2010 06:19:01 +0000 (06:19 +0000)]
Add comments.

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

14 years agoAdd all final overriders to the map.
Anders Carlsson [Thu, 3 Jun 2010 01:00:02 +0000 (01:00 +0000)]
Add all final overriders to the map.

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

14 years agoThere is no dcl.init.ref p16. This test deals with p5.
Jeffrey Yasskin [Wed, 2 Jun 2010 22:01:22 +0000 (22:01 +0000)]
There is no dcl.init.ref p16. This test deals with p5.

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

14 years agoBlock C++ code gen. Adds support for block reference argument
Fariborz Jahanian [Wed, 2 Jun 2010 21:35:17 +0000 (21:35 +0000)]
Block C++ code gen. Adds support for block reference argument
types. Executable test will be added to LLVM test suite.
(radar 8041962).

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

14 years agoDon't try to emit the vtable for a class just because we're emitting a
John McCall [Wed, 2 Jun 2010 21:22:02 +0000 (21:22 +0000)]
Don't try to emit the vtable for a class just because we're emitting a
virtual function from it.

Fixes PR7241.

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

14 years agoHeaders: Fix quoting of macro arguments in a couple more places.
Daniel Dunbar [Wed, 2 Jun 2010 16:35:01 +0000 (16:35 +0000)]
Headers: Fix quoting of macro arguments in a couple more places.

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

14 years agoDon't substitute 'St' for 'std' when the namespace is nested inside another namespace.
Anders Carlsson [Wed, 2 Jun 2010 15:58:27 +0000 (15:58 +0000)]
Don't substitute 'St' for 'std' when the namespace is nested inside another namespace.

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

14 years agoFix undefined behavior, noticed by GCC 4.5. Patch by Dimitry Andric!
Daniel Dunbar [Wed, 2 Jun 2010 15:47:10 +0000 (15:47 +0000)]
Fix undefined behavior, noticed by GCC 4.5. Patch by Dimitry Andric!

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

14 years agoFix compiler warning about to false -> pointer conversion; patch by Dimitry Andric!
Daniel Dunbar [Wed, 2 Jun 2010 15:47:03 +0000 (15:47 +0000)]
Fix compiler warning about to false -> pointer conversion; patch by Dimitry Andric!

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

14 years agoFix unintentional method call due to false -> pointer conversion; patch by Dimitry...
Daniel Dunbar [Wed, 2 Jun 2010 15:46:52 +0000 (15:46 +0000)]
Fix unintentional method call due to false -> pointer conversion; patch by Dimitry Andric!

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

14 years agoWhen building RTTI descriptors for pointer types, we need to get the unqualified...
Anders Carlsson [Wed, 2 Jun 2010 15:44:35 +0000 (15:44 +0000)]
When building RTTI descriptors for pointer types, we need to get the unqualified array type and the qualifiers from it.

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

14 years agoFix vget_lane/vset_lane
Nate Begeman [Wed, 2 Jun 2010 07:15:01 +0000 (07:15 +0000)]
Fix vget_lane/vset_lane

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

14 years agotypeid() produces type information for the cv-unqualified version of
Douglas Gregor [Wed, 2 Jun 2010 06:16:02 +0000 (06:16 +0000)]
typeid() produces type information for the cv-unqualified version of
the type. Thanks to Anders for the bug report!

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

14 years agoclang++ is now a different greek letter.
Chris Lattner [Wed, 2 Jun 2010 05:27:21 +0000 (05:27 +0000)]
clang++ is now a different greek letter.

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

14 years agoCorrectly mangle unsigned integer literals where the high bit is set.
Anders Carlsson [Wed, 2 Jun 2010 05:07:26 +0000 (05:07 +0000)]
Correctly mangle unsigned integer literals where the high bit is set.

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

14 years agoCorrectly mangle variadic functions that don't have any other parameters.
Anders Carlsson [Wed, 2 Jun 2010 04:40:13 +0000 (04:40 +0000)]
Correctly mangle variadic functions that don't have any other parameters.

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

14 years agoWhen mangling member function pointers, fake adding a substitution corresponding...
Anders Carlsson [Wed, 2 Jun 2010 04:29:50 +0000 (04:29 +0000)]
When mangling member function pointers, fake adding a substitution corresponding to the function type.

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

14 years agoAdd a compatibility note about incomplete types in templates.
John McCall [Wed, 2 Jun 2010 01:26:32 +0000 (01:26 +0000)]
Add a compatibility note about incomplete types in templates.

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

14 years agoCheckpoint arm_neon.h generation with tablegen
Nate Begeman [Wed, 2 Jun 2010 00:34:41 +0000 (00:34 +0000)]
Checkpoint arm_neon.h generation with tablegen

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

14 years agoMore cleanup.
Anders Carlsson [Tue, 1 Jun 2010 23:52:26 +0000 (23:52 +0000)]
More cleanup.

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

14 years agoMore cleanup.
Anders Carlsson [Tue, 1 Jun 2010 23:47:05 +0000 (23:47 +0000)]
More cleanup.

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

14 years agoCleanup.
Anders Carlsson [Tue, 1 Jun 2010 23:17:37 +0000 (23:17 +0000)]
Cleanup.

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

14 years agoDelete a blank line to make it easier to process this file with a script.
Dan Gohman [Tue, 1 Jun 2010 16:56:42 +0000 (16:56 +0000)]
Delete a blank line to make it easier to process this file with a script.

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

14 years agoAlter the ExternalASTSource interface to permit by-name lookups. PCH continues to
John McCall [Tue, 1 Jun 2010 09:23:16 +0000 (09:23 +0000)]
Alter the ExternalASTSource interface to permit by-name lookups.  PCH continues to
bring in the entire lookup table at once.

Also, give ExternalSemaSource's vtable a home.  This is important because otherwise
any reference to it will cause RTTI to be emitted, and since clang is compiled
with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's
RTTI).  So this change makes it possible to subclass ExternalSemaSource from projects
compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti.

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

14 years agoLimit the use of BindDefault().
Zhongxing Xu [Tue, 1 Jun 2010 04:49:26 +0000 (04:49 +0000)]
Limit the use of BindDefault().

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

14 years agoAdd support for calloc() in MallocChecker. Patch by Jordy Rose, with my
Zhongxing Xu [Tue, 1 Jun 2010 03:01:33 +0000 (03:01 +0000)]
Add support for calloc() in MallocChecker. Patch by Jordy Rose, with my
modification.

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

14 years agoFix crash in code completion when an ObjCMethodDecl doesn't have an associated @inter...
Ted Kremenek [Mon, 31 May 2010 21:43:10 +0000 (21:43 +0000)]
Fix crash in code completion when an ObjCMethodDecl doesn't have an associated @interface.
Fixes <rdar://problem/8026215>.

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

14 years agoMinor tweaks on doug's objc recovery patch: the caller
Chris Lattner [Mon, 31 May 2010 18:18:22 +0000 (18:18 +0000)]
Minor tweaks on doug's objc recovery patch: the caller
of isSimpleObjCMessageExpression checks the language,
so change a dynamic check into an assert.

isSimpleObjCMessageExpression is expensive, so only do it
in the common case when it is likely to matter: when the [
of the postfix expr starts on a new line.  This should avoid
doing lookahead for every array expression.

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

14 years agoMake methods non-virtual again for now. I accidentally committed this in
Charles Davis [Mon, 31 May 2010 17:07:59 +0000 (17:07 +0000)]
Make methods non-virtual again for now. I accidentally committed this in
preparation for an alternate mangler.

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

14 years agoTweak test for non-64-bit Darwin
Douglas Gregor [Mon, 31 May 2010 14:58:57 +0000 (14:58 +0000)]
Tweak test for non-64-bit Darwin

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

14 years agoWhen we see the a '[' in a postfix expression in Objective-C, perform
Douglas Gregor [Mon, 31 May 2010 14:40:22 +0000 (14:40 +0000)]
When we see the a '[' in a postfix expression in Objective-C, perform
a simple, quick check to determine whether the expression starting
with '[' can only be an Objective-C message send. If so, don't parse
it as an array subscript expression. This improves recovery for, e.g.,

  [a method1]
  [a method2]

so that we now produce

  t.m:10:13: error: expected ';' after expression
  [a method]
            ^

instead of some mess about expecting ']'.

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

14 years agoSilence GCC warning about an accessible non-virtual destructor in a class with
Chandler Carruth [Mon, 31 May 2010 08:27:42 +0000 (08:27 +0000)]
Silence GCC warning about an accessible non-virtual destructor in a class with
virtual methods.

Please review cdavis, should these methods even be virtual?

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

14 years agoAfter conversations with Zhongxing Xu and Jordy Rose, refine the logic in
Ted Kremenek [Mon, 31 May 2010 01:22:04 +0000 (01:22 +0000)]
After conversations with Zhongxing Xu and Jordy Rose, refine the logic in
RegionStoreManager::RetrieveElement() that handles indexing into a larger scalar
object to only consult the direct binding of a super region if it is a scalar.
This isn't perfect yet, and a big FIXME is attached to the code.  This causes
the test case for PR 7218 now to pass.

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

14 years agofix incorrect tag
Chris Lattner [Sun, 30 May 2010 23:42:51 +0000 (23:42 +0000)]
fix incorrect tag

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

14 years agomake #warning warnings end up in their own diagnostic category.
Chris Lattner [Sun, 30 May 2010 23:42:10 +0000 (23:42 +0000)]
make #warning warnings end up in their own diagnostic category.
rdar://8042673

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

14 years agosimpler fix for rdar://8044135 - escaped newlines have already
Chris Lattner [Sun, 30 May 2010 23:27:38 +0000 (23:27 +0000)]
simpler fix for rdar://8044135 - escaped newlines have already
been processed, so they don't have to be tip-toed around.

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

14 years agoImprove our handling of NULL after an escaping '\' in a string
Douglas Gregor [Sun, 30 May 2010 22:59:50 +0000 (22:59 +0000)]
Improve our handling of NULL after an escaping '\' in a string
literal. Fixes <rdar://problem/8044135>.

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

14 years agoMove .td files from AST to Basic.
Sean Hunt [Sun, 30 May 2010 22:44:37 +0000 (22:44 +0000)]
Move .td files from AST to Basic.

Parse will need to see these files because it needs to know how to parse
attributes. The generated files are still placed in the appropriate directory so
as to preserve layering. No functional change.

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

14 years agoDon't try to parse class template specializations in C. It can only
Douglas Gregor [Sun, 30 May 2010 22:30:21 +0000 (22:30 +0000)]
Don't try to parse class template specializations in C. It can only
lead to heartache. Fixes <rdar://problem/8044088>.

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

14 years agoFuzzTest: Add support for reading list of replacements from a file.
Daniel Dunbar [Sun, 30 May 2010 22:27:55 +0000 (22:27 +0000)]
FuzzTest: Add support for reading list of replacements from a file.

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

14 years agoutils: Add a generic fuzz testing tool.
Daniel Dunbar [Sun, 30 May 2010 22:27:52 +0000 (22:27 +0000)]
utils: Add a generic fuzz testing tool.

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

14 years agoImprove parser recovery when we try to parse a call expression but the
Douglas Gregor [Sun, 30 May 2010 22:23:08 +0000 (22:23 +0000)]
Improve parser recovery when we try to parse a call expression but the
called function itself is invalid (e.g., because of a semantic error
referring to that declaration). Fixes <rdar://problem/8044142>.

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

14 years agoMake macro safe in the face of users who pass "addr+64". Addition of void* is
Nick Lewycky [Sun, 30 May 2010 18:26:21 +0000 (18:26 +0000)]
Make macro safe in the face of users who pass "addr+64". Addition of void* is
invalid.

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

14 years agoRemove unused parameter to FinalOverriders::PropagateOverrider.
Anders Carlsson [Sun, 30 May 2010 18:23:41 +0000 (18:23 +0000)]
Remove unused parameter to FinalOverriders::PropagateOverrider.

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

14 years agoRefactor the Is{Std,Clang,LLVM}Namespace methods and rename 'isClangAttr' to
Nick Lewycky [Sun, 30 May 2010 18:05:23 +0000 (18:05 +0000)]
Refactor the Is{Std,Clang,LLVM}Namespace methods and rename 'isClangAttr' to
'IsClangAttr' to match prevailing style in this file. Patch by Jon Mulder!

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

14 years agoConvert DeclNodes to use TableGen.
Sean Hunt [Sun, 30 May 2010 07:21:58 +0000 (07:21 +0000)]
Convert DeclNodes to use TableGen.

The macros required for DeclNodes use have changed to match the use of
StmtNodes. The FooFirst enumerator constants have been named firstFoo
to match usage elsewhere.

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

14 years agoAnd now for the best part: Removing the old code.
Anders Carlsson [Sun, 30 May 2010 06:56:46 +0000 (06:56 +0000)]
And now for the best part: Removing the old code.

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

14 years agoTurn on the new empty base subobject tracking code. It's a bit faster than the previo...
Anders Carlsson [Sun, 30 May 2010 06:52:33 +0000 (06:52 +0000)]
Turn on the new empty base subobject tracking code. It's a bit faster than the previous code. However, it still has quadratic performance, something which I intend to fix shortly in a subsequent patch.

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

14 years agoTeach code-completion for calls to be more careful with a
Douglas Gregor [Sun, 30 May 2010 06:10:08 +0000 (06:10 +0000)]
Teach code-completion for calls to be more careful with a
potentially-NULL "function" argument.

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

14 years agoFix for PR7040: Don't try to compute the LLVM type for a function where it
Eli Friedman [Sun, 30 May 2010 06:03:20 +0000 (06:03 +0000)]
Fix for PR7040: Don't try to compute the LLVM type for a function where it
isn't possible to compute.

This patch is mostly refactoring; the key change is the addition of the code
starting with the comment, "Check whether the function has a computable LLVM
signature."  The solution here is essentially the same as the way the
vtable code handles such functions.

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

14 years agoUnbreak non-Darwin builds
Douglas Gregor [Sun, 30 May 2010 04:00:50 +0000 (04:00 +0000)]
Unbreak non-Darwin builds

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

14 years agoTeach code completion to adjust its completion priorities based on the
Douglas Gregor [Sun, 30 May 2010 01:49:25 +0000 (01:49 +0000)]
Teach code completion to adjust its completion priorities based on the
type that we expect to see at a given point in the grammar, e.g., when
initializing a variable, returning a result, or calling a function. We
don't prune the candidate set at all, just adjust priorities to favor
things that should type-check, using an ultra-simplified type system.

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

14 years agoAccept '#pragma options align=mac68k' on Darwin/PPC and Darwin/PPC64.
Daniel Dunbar [Sun, 30 May 2010 00:07:30 +0000 (00:07 +0000)]
Accept '#pragma options align=mac68k' on Darwin/PPC and Darwin/PPC64.

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

14 years agoCleanup.
Anders Carlsson [Sat, 29 May 2010 21:10:24 +0000 (21:10 +0000)]
Cleanup.

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

14 years agoMake EmptySubobjectMap::CanPlaceBaseAtOffset take a BaseSubobjectInfo as well.
Anders Carlsson [Sat, 29 May 2010 20:49:49 +0000 (20:49 +0000)]
Make EmptySubobjectMap::CanPlaceBaseAtOffset take a BaseSubobjectInfo as well.

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

14 years agoChange RecordLayoutBuilder::LayoutBase to take a BaseSubobjectInfo. No functionality...
Anders Carlsson [Sat, 29 May 2010 20:47:33 +0000 (20:47 +0000)]
Change RecordLayoutBuilder::LayoutBase to take a BaseSubobjectInfo. No functionality change.

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

14 years agoAdd check for an invalid CXType in clang_getTypeDeclaration.
Ted Kremenek [Sat, 29 May 2010 20:01:52 +0000 (20:01 +0000)]
Add check for an invalid CXType in clang_getTypeDeclaration.

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

14 years agoRework the way virtual primary bases are added when laying out classes. Instead of...
Anders Carlsson [Sat, 29 May 2010 19:44:50 +0000 (19:44 +0000)]
Rework the way virtual primary bases are added when laying out classes. Instead of doing it as a separate step, we now use the BaseSubobjectInfo and use it when laying out the bases. This fixes a bug where we would either not add a primary virtual base at all, or add it at the wrong offset.

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

14 years agoChange LayoutVirtualBase to also take a BaseSubobjectInfo.
Anders Carlsson [Sat, 29 May 2010 17:48:36 +0000 (17:48 +0000)]
Change LayoutVirtualBase to also take a BaseSubobjectInfo.

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

14 years agoChange RecordLayoutBuilder::LayoutNonVirtualBase to take a BaseSubobjectInfo. No...
Anders Carlsson [Sat, 29 May 2010 17:42:25 +0000 (17:42 +0000)]
Change RecordLayoutBuilder::LayoutNonVirtualBase to take a BaseSubobjectInfo. No functionality change.

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

14 years agoMove computing the base subobject info for a class into the RecordLayoutBuilder becau...
Anders Carlsson [Sat, 29 May 2010 17:35:14 +0000 (17:35 +0000)]
Move computing the base subobject info for a class into the RecordLayoutBuilder because we're going to need it to be able to correctly add offsets for primary virtual bases.

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

14 years agoRevert r105097. Thinking about a better fix.
Zhongxing Xu [Sat, 29 May 2010 06:49:04 +0000 (06:49 +0000)]
Revert r105097. Thinking about a better fix.

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

14 years agoFix PR7218. Patch by Jordy Rose.
Zhongxing Xu [Sat, 29 May 2010 06:23:24 +0000 (06:23 +0000)]
Fix PR7218. Patch by Jordy Rose.

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

14 years agoMore PowerPC paths on Darwin
Douglas Gregor [Sat, 29 May 2010 01:21:11 +0000 (01:21 +0000)]
More PowerPC paths on Darwin

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

14 years agoAdd C++ include paths for Darwin PowerPC
Douglas Gregor [Sat, 29 May 2010 01:15:12 +0000 (01:15 +0000)]
Add C++ include paths for Darwin PowerPC

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

14 years agoadd fedora 13 paths, patch by Hendrik Richter.
Chris Lattner [Sat, 29 May 2010 01:01:38 +0000 (01:01 +0000)]
add fedora 13 paths, patch by Hendrik Richter.

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

14 years agoCopy source information for the inner type of an elaborated type; fixes some
John McCall [Fri, 28 May 2010 23:32:21 +0000 (23:32 +0000)]
Copy source information for the inner type of an elaborated type;  fixes some
valgrind problems.

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

14 years agoImplement remaining items in neon td file. Still need to modify emitter to generate...
Nate Begeman [Fri, 28 May 2010 23:15:59 +0000 (23:15 +0000)]
Implement remaining items in neon td file.  Still need to modify emitter to generate a proper header.

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