]> granicus.if.org Git - clang/log
clang
13 years agoRe-fix r136172 so it isn't an error; apparently, some people are fond of their undefi...
Eli Friedman [Tue, 26 Jul 2011 23:27:24 +0000 (23:27 +0000)]
Re-fix r136172 so it isn't an error; apparently, some people are fond of their undefined behavior.

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

13 years agoThis appears to be passing on all hosts.
Eric Christopher [Tue, 26 Jul 2011 23:26:00 +0000 (23:26 +0000)]
This appears to be passing on all hosts.

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

13 years agoThis patch implements as much of the narrowing conversion error specified by
Jeffrey Yasskin [Tue, 26 Jul 2011 23:20:30 +0000 (23:20 +0000)]
This patch implements as much of the narrowing conversion error specified by
[dcl.init.list] as is possible without generalized initializer lists or full
constant expression support, and adds a c++0x-compat warning in C++98 mode.

The FixIt currently uses a typedef's basename without qualification, which is
likely to be incorrect on some code.  If it's incorrect on too much code, we
should write a function to get the string that refers to a type from a
particular context.

The warning is currently off by default. I'll fix LLVM and clang before turning
it on.

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

13 years agoDisable the optimization that skips emission of complete, non-virtual
Douglas Gregor [Tue, 26 Jul 2011 23:18:30 +0000 (23:18 +0000)]
Disable the optimization that skips emission of complete, non-virtual
destructors of abstract classes. It's undefined behavior to actually
call the destructor (e.g., via delete), but the presence of code that
calls this destructor doesn't make the program
ill-formed. Fixes <rdar://problem/9819242>.

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

13 years agoTry a little hack to fix the memset duplication on windows.
Eric Christopher [Tue, 26 Jul 2011 23:18:10 +0000 (23:18 +0000)]
Try a little hack to fix the memset duplication on windows.

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

13 years agoTry harder to fix these for windows.
Eric Christopher [Tue, 26 Jul 2011 23:12:06 +0000 (23:12 +0000)]
Try harder to fix these for windows.

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

13 years agoGeneralize for various build bots.
Eric Christopher [Tue, 26 Jul 2011 22:52:35 +0000 (22:52 +0000)]
Generalize for various build bots.

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

13 years agoDiagnose trying to delete a pointer to an abstract class with a non-virtual destructo...
Eli Friedman [Tue, 26 Jul 2011 22:50:18 +0000 (22:50 +0000)]
Diagnose trying to delete a pointer to an abstract class with a non-virtual destructor. PR10504.

I'm not completely sure the standard allows us to reject this, but if it doesn't, it should. :)

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

13 years agoRewrite match line to be friendlier to misc buildbots.
Eric Christopher [Tue, 26 Jul 2011 22:44:31 +0000 (22:44 +0000)]
Rewrite match line to be friendlier to misc buildbots.

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

13 years agoRewrite matching line to be friendlier to misc buildbots.
Eric Christopher [Tue, 26 Jul 2011 22:43:37 +0000 (22:43 +0000)]
Rewrite matching line to be friendlier to misc buildbots.

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

13 years agoAttempt to rewrite the matching for this test to pacify the windows
Eric Christopher [Tue, 26 Jul 2011 22:42:01 +0000 (22:42 +0000)]
Attempt to rewrite the matching for this test to pacify the windows
build bots.

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

13 years agoRemove unused diagnostic definition.
Anna Zaks [Tue, 26 Jul 2011 22:34:49 +0000 (22:34 +0000)]
Remove unused diagnostic definition.

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

13 years agoRework the match here to silence release mode windows buildbots.
Eric Christopher [Tue, 26 Jul 2011 22:32:44 +0000 (22:32 +0000)]
Rework the match here to silence release mode windows buildbots.

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

13 years agoAttempt to generalize this test for release mode buildbots.
Eric Christopher [Tue, 26 Jul 2011 22:31:33 +0000 (22:31 +0000)]
Attempt to generalize this test for release mode buildbots.

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

13 years agoTry to generalize the match to quiet the windows build bot.
Eric Christopher [Tue, 26 Jul 2011 22:27:01 +0000 (22:27 +0000)]
Try to generalize the match to quiet the windows build bot.

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

13 years agoA couple minor issues with Sema for delete:
Eli Friedman [Tue, 26 Jul 2011 22:25:31 +0000 (22:25 +0000)]
A couple minor issues with Sema for delete:

1. Attempting to delete an expression of incomplete class type should be an error, not a warning.

2. If someone tries to delete a pointer to an incomplete class type, make sure we actually emit
the delete expression after we warn.

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

13 years agoUse unsigned long long for uint64_t. Fixes part of the windows buildbot.
Eric Christopher [Tue, 26 Jul 2011 22:19:01 +0000 (22:19 +0000)]
Use unsigned long long for uint64_t. Fixes part of the windows buildbot.

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

13 years agoMigrate most of the rest of test/FrontendC from llvm and migrate
Eric Christopher [Tue, 26 Jul 2011 22:17:02 +0000 (22:17 +0000)]
Migrate most of the rest of test/FrontendC from llvm and migrate
most of them to FileCheck.

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

13 years agoAdjust check for release mode.
Eric Christopher [Tue, 26 Jul 2011 22:07:13 +0000 (22:07 +0000)]
Adjust check for release mode.

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

13 years agoIn ARC we emit an error when compiling:
Argyrios Kyrtzidis [Tue, 26 Jul 2011 21:48:26 +0000 (21:48 +0000)]
In ARC we emit an error when compiling:

@interface Foo : NSObject
@property (readonly) id myProp;
@end

@implementation Foo
@synthesize myProp;
@end

t.m:9:13: error: ARC forbids synthesizing a property of an Objective-C object with unspecified storage attribute
@synthesize myProp;
            ^

which is fine, we want the ownership of the synthesized ivar to be explicit. But we should _not_ emit an error
for the following cases, because we can get the ownership either from the declared ivar or from the property type:

@interface Foo : NSObject {
__weak id _myProp1;
id myProp2;
}
@property (readonly) id myProp1;
@property (readonly) id myProp2;
@property (readonly) __strong id myProp3;
@end

@implementation Foo
@synthesize myProp1 = _myProp1;
@synthesize myProp2;
@synthesize myProp3;
@end

rdar://9844006.

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

13 years agoMigrate:
Eric Christopher [Tue, 26 Jul 2011 21:42:32 +0000 (21:42 +0000)]
Migrate:

       CodeGen/2003-08-21-WideString.c
       CodeGen/2003-10-02-UnionLValueError.c
       CodeGen/2004-02-20-Builtins.c
       CodeGen/2008-01-04-WideBitfield.c
       CodeGen/2002-07-14-MiscTests3.c
       CodeGen/2005-04-09-ComplexOps.c
       CodeGen/2008-12-23-AsmIntPointerTie.c
       CodeGen/2005-07-20-SqrtNoErrno.c
       CodeGen/2005-01-02-VAArgError-ICE.c
       CodeGen/2004-06-17-UnorderedCompares.c
       CodeGen/2002-06-25-FWriteInterfaceFailure.c
       CodeGen/2002-02-18-64bitConstant.c
       CodeGen/2002-05-24-Alloca.c
       CodeGen/2006-01-13-Includes.c
       CodeGen/2007-09-27-ComplexIntCompare.c
       CodeGen/2004-02-13-IllegalVararg.c
       CodeGen/2007-09-12-PragmaPack.c
       CodeGen/2002-08-02-UnionTest.c

from test/FrontendC with changes to remove header file includes.

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

13 years agoReport more memory using in Preprocessor::getTotalMemory() and PreprocessingRecord...
Ted Kremenek [Tue, 26 Jul 2011 21:17:24 +0000 (21:17 +0000)]
Report more memory using in Preprocessor::getTotalMemory() and PreprocessingRecord::getTotalMemory().

Most of the memory was already reported; but now we report more memory from side data structures.

Fixes <rdar://problem/9379717>.

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

13 years agoMigrate CodeGen/2007-03-05-DataLayout.c from test/FrontendC with changes
Eric Christopher [Tue, 26 Jul 2011 20:44:55 +0000 (20:44 +0000)]
Migrate CodeGen/2007-03-05-DataLayout.c from test/FrontendC with changes
to remove header file includes.

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

13 years agoMigrate CodeGen/2005-02-20-AggregateSAVEEXPR.c from test/FrontendC with
Eric Christopher [Tue, 26 Jul 2011 20:38:19 +0000 (20:38 +0000)]
Migrate CodeGen/2005-02-20-AggregateSAVEEXPR.c from test/FrontendC with
changes to remove any #include lines.

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

13 years agoMigrate CodeGen/2009-09-24-SqrtErrno.c from test/FrontendC with changes
Eric Christopher [Tue, 26 Jul 2011 20:31:17 +0000 (20:31 +0000)]
Migrate CodeGen/2009-09-24-SqrtErrno.c from test/FrontendC with changes
to avoid header inclusions.

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

13 years agoMigrate CodeGen/2002-03-11-LargeCharInString.c from test/FrontendC and
Eric Christopher [Tue, 26 Jul 2011 20:29:08 +0000 (20:29 +0000)]
Migrate CodeGen/2002-03-11-LargeCharInString.c from test/FrontendC and
modify to avoid any outside includes.

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

13 years agoAdd CodeGen/2009-07-15-pad-wchar_t-array.c migrated from test/FrontendC
Eric Christopher [Tue, 26 Jul 2011 20:27:12 +0000 (20:27 +0000)]
Add CodeGen/2009-07-15-pad-wchar_t-array.c migrated from test/FrontendC
and modified to avoid includes.

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

13 years agoMigrate wchar-const.c with fixes and FileCheck from llvm/test/FrontendC.
Eric Christopher [Tue, 26 Jul 2011 18:39:16 +0000 (18:39 +0000)]
Migrate wchar-const.c with fixes and FileCheck from llvm/test/FrontendC.

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

13 years agoRevert r136046 while fixing handling of e.g. &foo[index_one_past_size]
Kaelyn Uhrain [Tue, 26 Jul 2011 18:36:36 +0000 (18:36 +0000)]
Revert r136046 while fixing handling of e.g. &foo[index_one_past_size]

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

13 years agoThis patch extends the previous patch by starting to incorporate more functionality...
Jonathan D. Turner [Tue, 26 Jul 2011 18:21:30 +0000 (18:21 +0000)]
This patch extends the previous patch by starting to incorporate more functionality, like lookup-by-name and exporting lookup tables, into the module manager.  Methods now have documentation.  A few more functions have been switched over to the new iterator style and away from manual/explicit iteration.  Ultimately we want to move away from name lookup here, as symlinks make filenames not a safe unique value, but we use it here as a stopgap before better measures are in place (namely instead using FileEntry* from a global FileManager).

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

13 years agoProvide fixit for static use of objective-c type
Fariborz Jahanian [Tue, 26 Jul 2011 17:58:54 +0000 (17:58 +0000)]
Provide fixit for static use of objective-c type
in few more places and in each instance, fix up
the type to the expected type. // rdar://9603056

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

13 years agoEliminate a bunch of temporary strings.
Benjamin Kramer [Tue, 26 Jul 2011 16:59:25 +0000 (16:59 +0000)]
Eliminate a bunch of temporary strings.

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

13 years agoAdd new libclang API, clang_codeCompleteGetObjCSelector(), which
Douglas Gregor [Tue, 26 Jul 2011 15:24:30 +0000 (15:24 +0000)]
Add new libclang API, clang_codeCompleteGetObjCSelector(), which
provides the partial Objective-C selector used in a code
completion. From Connor Wakamo!

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

13 years agoWhen we decide not to rebuild an instantiated C++ 'new' expression
Douglas Gregor [Tue, 26 Jul 2011 15:11:03 +0000 (15:11 +0000)]
When we decide not to rebuild an instantiated C++ 'new' expression
that allocates an array of objects with a non-trivial destructor, be
sure to mark the destructor is "used". Fixes PR10480 /
<rdar://problem/9834317>.

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

13 years agoObjective-C++ ARC: When performing template argument deduction for a
Douglas Gregor [Tue, 26 Jul 2011 14:53:44 +0000 (14:53 +0000)]
Objective-C++ ARC: When performing template argument deduction for a
lifetime-qualified template parameter, ensure that the deduced
template argument is a lifetime type. Fixes <rdar://problem/9828157>.

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

13 years agoAfter further discussion it has been determined that alignof should report
Chad Rosier [Tue, 26 Jul 2011 07:03:04 +0000 (07:03 +0000)]
After further discussion it has been determined that alignof should report
the preferred alignment.  Thus, revert r135934, r135935, and r135940.

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

13 years agoCleanup the stray comments and variables I could dig out of Sema to
Chandler Carruth [Tue, 26 Jul 2011 05:40:03 +0000 (05:40 +0000)]
Cleanup the stray comments and variables I could dig out of Sema to
refer to 'expansion' instead of 'instantiation'.

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

13 years agoFix a stray instantiation comment in Parse.
Chandler Carruth [Tue, 26 Jul 2011 05:19:46 +0000 (05:19 +0000)]
Fix a stray instantiation comment in Parse.

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

13 years agoClean up as many of the comments in Basic I can find to talk in terms of
Chandler Carruth [Tue, 26 Jul 2011 05:17:23 +0000 (05:17 +0000)]
Clean up as many of the comments in Basic I can find to talk in terms of
'expansion' rather than 'instantiation' for macro source locations.

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

13 years agoMigrate 'Instantiation' data and API bits of SLocEntry to 'Expansion'
Chandler Carruth [Tue, 26 Jul 2011 04:56:51 +0000 (04:56 +0000)]
Migrate 'Instantiation' data and API bits of SLocEntry to 'Expansion'
etc. With this I think essentially all of the SourceManager APIs are
converted. Comments and random other bits of cleanup should be all thats
left.

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

13 years agoConvert InstantiationInfo and much of the related code to ExpansionInfo
Chandler Carruth [Tue, 26 Jul 2011 04:41:47 +0000 (04:41 +0000)]
Convert InstantiationInfo and much of the related code to ExpansionInfo
and various other 'expansion' based terms. I've tried to reformat where
appropriate and catch as many references in comments but I'm going to do
several more passes. Also I've tried to expand parameter names to be
more clear where appropriate.

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

13 years agoRename create(MacroArg)InstantiationLoc to create(MacroArg)ExpansionLoc.
Chandler Carruth [Tue, 26 Jul 2011 03:03:05 +0000 (03:03 +0000)]
Rename create(MacroArg)InstantiationLoc to create(MacroArg)ExpansionLoc.

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

13 years agoRename SourceManager (and InstantiationInfo) isMacroArgInstantiation API
Chandler Carruth [Tue, 26 Jul 2011 03:03:00 +0000 (03:03 +0000)]
Rename SourceManager (and InstantiationInfo) isMacroArgInstantiation API
to isMacroArgExpansion.

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

13 years agoExpand array bounds checking to work in the presence of unary & and *,
Kaelyn Uhrain [Tue, 26 Jul 2011 01:52:28 +0000 (01:52 +0000)]
Expand array bounds checking to work in the presence of unary & and *,
and to work with pointer arithmetic in addition to array indexing.

The new pointer arithmetic porition of the array bounds checking can be
turned on by -Warray-bounds-pointer-arithmetic (and is off by default).

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

13 years agoAssembler really doesn't need to create TargetMachine anymore.
Evan Cheng [Tue, 26 Jul 2011 01:49:26 +0000 (01:49 +0000)]
Assembler really doesn't need to create TargetMachine anymore.

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

13 years agoTest commit
Kaelyn Uhrain [Tue, 26 Jul 2011 01:42:22 +0000 (01:42 +0000)]
Test commit

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

13 years agotest/CodeGen/2003-08-18-SigSetJmp.c: XFAIL: mingw, too!
NAKAMURA Takumi [Tue, 26 Jul 2011 01:40:37 +0000 (01:40 +0000)]
test/CodeGen/2003-08-18-SigSetJmp.c: XFAIL: mingw, too!

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

13 years agowin32 doesn't have sigsetjmp, just xfail this test there.
Eric Christopher [Tue, 26 Jul 2011 01:32:19 +0000 (01:32 +0000)]
win32 doesn't have sigsetjmp, just xfail this test there.

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

13 years agoRework this slightly to work for optimized compilers and remove the
Eric Christopher [Tue, 26 Jul 2011 01:24:10 +0000 (01:24 +0000)]
Rework this slightly to work for optimized compilers and remove the
optimization from the test.

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

13 years agoThese tests use standard headers and so need ms extensions with MSVC headers.
Eric Christopher [Tue, 26 Jul 2011 01:12:27 +0000 (01:12 +0000)]
These tests use standard headers and so need ms extensions with MSVC headers.
Use the driver instead of just clang -cc1.

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

13 years agoRemove this test, it's more properly an optimizer test.
Eric Christopher [Tue, 26 Jul 2011 01:11:20 +0000 (01:11 +0000)]
Remove this test, it's more properly an optimizer test.

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

13 years agoMigrate and FileCheck-ize some of:
Eric Christopher [Tue, 26 Jul 2011 00:57:50 +0000 (00:57 +0000)]
Migrate and FileCheck-ize some of:

2003-09-18-BitfieldTests.c 2007-04-11-PR1321.c 2003-11-13-TypeSafety.c 2003-08-29-StructLayoutBug.c 2010-05-14-Optimized-VarType.c 2003-10-06-NegateExprType.c 2007-06-05-NoInlineAttribute.c 2011-03-31-ArrayRefFolding.c 2010-07-14-ref-off-end.c Atomics-no64bit.c 2007-05-11-str-const.c 2004-11-27-InvalidConstantExpr.c 2007-04-05-UnPackedStruct.c 2004-03-15-SimpleIndirectGoto.c 2004-01-08-ExternInlineRedefine.c sret2.c 2007-02-07-AddrLabel.c 2002-09-19-StarInLabel.c 2003-11-16-StaticArrayInit.c 2003-08-18-SigSetJmp.c 2007-04-24-VolatileStructCopy.c 2002-07-29-Casts.c 2005-06-15-ExpandGotoInternalProblem.c 2007-09-17-WeakRef.c 2007-04-24-str-const.c 2003-08-30-LargeIntegerBitfieldMember.c inline-asm-mrv.c

from llvm/test/FrontendC.

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

13 years agoMigrate over 2009-04-22-UnknownSize.c, 2009-07-17-VoidParameter.c,
Eric Christopher [Tue, 26 Jul 2011 00:47:54 +0000 (00:47 +0000)]
Migrate over 2009-04-22-UnknownSize.c, 2009-07-17-VoidParameter.c,
2009-03-09-WeakDeclarations-1.c, and 2010-05-31-palignr.c from
llvm/test/FrontendC.

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

13 years agoRename createCodeEmitter to createMCCodeEmitter; createObjectStreamer to createMCObje...
Evan Cheng [Tue, 26 Jul 2011 00:42:40 +0000 (00:42 +0000)]
Rename createCodeEmitter to createMCCodeEmitter; createObjectStreamer to createMCObjectStreamer.

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

13 years agoRename createAsmParser to createMCAsmParser.
Evan Cheng [Tue, 26 Jul 2011 00:24:45 +0000 (00:24 +0000)]
Rename createAsmParser to createMCAsmParser.

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

13 years agoRename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to createMCAsmBackend.
Evan Cheng [Mon, 25 Jul 2011 23:25:09 +0000 (23:25 +0000)]
Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to createMCAsmBackend.

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

13 years agoFix the MSVC build. 2 problems:
Francois Pichet [Mon, 25 Jul 2011 22:00:44 +0000 (22:00 +0000)]
Fix the MSVC build. 2 problems:
   - buildPieces was return a C++ object from inside an extern "C". (MSVC didn't like that)
   - clang_getCursorReferenceNameRange was missing a CINDEX_LINKAGE causing a link error.

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

13 years agoobjective-c: Provide a 'fixit' when class was used
Fariborz Jahanian [Mon, 25 Jul 2011 21:12:27 +0000 (21:12 +0000)]
objective-c: Provide a 'fixit' when class was used
to declare a static object. // rdar://9603056

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

13 years agoRename getInstantiationLineNumber to getExpansionLineNumber in both
Chandler Carruth [Mon, 25 Jul 2011 21:09:52 +0000 (21:09 +0000)]
Rename getInstantiationLineNumber to getExpansionLineNumber in both
SourceManager and FullSourceLoc.

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

13 years agoRepair some indentation I missed in my previous commit.
Chandler Carruth [Mon, 25 Jul 2011 20:59:15 +0000 (20:59 +0000)]
Repair some indentation I missed in my previous commit.

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

13 years agoRename getInstantiationColumnNumber to getExpansionColumnNumber in both
Chandler Carruth [Mon, 25 Jul 2011 20:57:57 +0000 (20:57 +0000)]
Rename getInstantiationColumnNumber to getExpansionColumnNumber in both
SourceManager and FullSourceLoc.

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

13 years agoAssembler doesn't need to initialize TargetMachine's anymore.
Evan Cheng [Mon, 25 Jul 2011 20:53:26 +0000 (20:53 +0000)]
Assembler doesn't need to initialize TargetMachine's anymore.

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

13 years agoRename getDecomposedInstantiationLoc to getDecomposedExpansionLoc.
Chandler Carruth [Mon, 25 Jul 2011 20:52:32 +0000 (20:52 +0000)]
Rename getDecomposedInstantiationLoc to getDecomposedExpansionLoc.

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

13 years agogetInstantiationLocSlowCase -> getExpansionLocSlowCase
Chandler Carruth [Mon, 25 Jul 2011 20:52:26 +0000 (20:52 +0000)]
getInstantiationLocSlowCase -> getExpansionLocSlowCase

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

13 years agoRename SourceManager::getImmediateInstantiationRange to
Chandler Carruth [Mon, 25 Jul 2011 20:52:21 +0000 (20:52 +0000)]
Rename SourceManager::getImmediateInstantiationRange to
getImmediateExpansionRange.

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

13 years agoRefactor of how modules are handled in ASTReader to remove explicit uses of a chain...
Jonathan D. Turner [Mon, 25 Jul 2011 20:32:21 +0000 (20:32 +0000)]
Refactor of how modules are handled in ASTReader to remove explicit uses of a chain of AST files, instead redirect calls through a module manager.  This should help move toward a DAG and the potential of loading multiple, unrelated PCH files.  It's still early in development.

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

13 years agoAllow target to specify about using minimum alignment vs preferred. Takes care of
Chad Rosier [Mon, 25 Jul 2011 19:39:39 +0000 (19:39 +0000)]
Allow target to specify about using minimum alignment vs preferred.  Takes care of
FIXME: Override "preferred align" for double and long long for ARM apcs-gnu ABI.
Also part of rdar://9802874

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

13 years agoPick up expected diagnostics not only in the main file but also in the file where...
Axel Naumann [Mon, 25 Jul 2011 19:18:12 +0000 (19:18 +0000)]
Pick up expected diagnostics not only in the main file but also in the file where the first diagnostic occurred.
Useful if the main file is not relevant (like with cling).
By Vassil Vassilev.

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

13 years agoFix r135934. Rename was intended, but without additional tests for double.
Chad Rosier [Mon, 25 Jul 2011 19:17:48 +0000 (19:17 +0000)]
Fix r135934.  Rename was intended, but without additional tests for double.

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

13 years agoRename an alignment test to be more precise and add another test for the default
Chad Rosier [Mon, 25 Jul 2011 19:00:00 +0000 (19:00 +0000)]
Rename an alignment test to be more precise and add another test for the default
ABI.

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

13 years agoUpdate C++0x status for explicit override controls and explicit
Douglas Gregor [Mon, 25 Jul 2011 18:53:48 +0000 (18:53 +0000)]
Update C++0x status for explicit override controls and explicit
conversion operators, from Jonathan Sauer.

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

13 years agohttp://llvm.org/bugs/show_bug.cgi?id=10472
Howard Hinnant [Mon, 25 Jul 2011 18:09:56 +0000 (18:09 +0000)]
http://llvm.org/bugs/show_bug.cgi?id=10472

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

13 years agoAdded clang_getCursorReferenceNameRange to libclang to to retrieve parts of
Douglas Gregor [Mon, 25 Jul 2011 17:48:11 +0000 (17:48 +0000)]
Added clang_getCursorReferenceNameRange to libclang to to retrieve parts of
a cursor reference, from Erik Verbruggen!

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

13 years agoRename SourceManager::getInstantiationRange to getExpansionRange.
Chandler Carruth [Mon, 25 Jul 2011 16:56:02 +0000 (16:56 +0000)]
Rename SourceManager::getInstantiationRange to getExpansionRange.

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

13 years agoMechanically rename SourceManager::getInstantiationLoc and
Chandler Carruth [Mon, 25 Jul 2011 16:49:02 +0000 (16:49 +0000)]
Mechanically rename SourceManager::getInstantiationLoc and
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part
of the API and documentation update from 'instantiation' as the term for
macros to 'expansion'.

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

13 years agoShorten some expressions by using ArrayRef::slice().
Frits van Bommel [Mon, 25 Jul 2011 15:13:01 +0000 (15:13 +0000)]
Shorten some expressions by using ArrayRef::slice().

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

13 years agowww/get_started.html: Fix a phrase, "in the *build* directory* in the instructions...
NAKAMURA Takumi [Mon, 25 Jul 2011 12:40:26 +0000 (12:40 +0000)]
www/get_started.html: Fix a phrase, "in the *build* directory* in the instructions of Visual Studio. Thanks to Andreas Bittel to point it out.

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

13 years agoadd link to 2010 dev mtg
Chris Lattner [Sun, 24 Jul 2011 21:00:45 +0000 (21:00 +0000)]
add link to 2010 dev mtg

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

13 years agoobjc: clang should warn if redeclaration of methods
Fariborz Jahanian [Sun, 24 Jul 2011 20:53:26 +0000 (20:53 +0000)]
objc: clang should warn if redeclaration of methods
declared in protocol in the class qualified by the
protocol have type conflicts. To reduce amount of
noise, this is done when class is implemented.
// rdar://9352731

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

13 years agolib/AST/CMakeLists.txt: Update LLVM_USED_LIBS, not to miss symbols with building...
NAKAMURA Takumi [Sat, 23 Jul 2011 23:29:47 +0000 (23:29 +0000)]
lib/AST/CMakeLists.txt: Update LLVM_USED_LIBS, not to miss symbols with building shared lib. Thanks to Ryuta Suzuki.

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

13 years agofix PR10415, tidying up IR representation of module level inline asm
Chris Lattner [Sat, 23 Jul 2011 20:04:25 +0000 (20:04 +0000)]
fix PR10415, tidying up IR representation of module level inline asm
to avoid extraneous \n's.

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

13 years agoExtend libclang with clang_equalRanges, from Erik Verbruggen!
Douglas Gregor [Sat, 23 Jul 2011 19:35:14 +0000 (19:35 +0000)]
Extend libclang with clang_equalRanges, from Erik Verbruggen!

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

13 years agoAdd a link-friendly name to the Clang extension acceptance criteria
Douglas Gregor [Sat, 23 Jul 2011 19:22:17 +0000 (19:22 +0000)]
Add a link-friendly name to the Clang extension acceptance criteria

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

13 years agoDocument the criteria for evaluating a proposed extension to Clang.
Douglas Gregor [Sat, 23 Jul 2011 19:21:07 +0000 (19:21 +0000)]
Document the criteria for evaluating a proposed extension to Clang.

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

13 years agoTests for explicit conversion operators, along with a fix to avoid
Douglas Gregor [Sat, 23 Jul 2011 18:59:35 +0000 (18:59 +0000)]
Tests for explicit conversion operators, along with a fix to avoid
considering explicit conversion operators when determining surrogate
functions. Fixes PR10453. Note that there are a few test cases where
Clang is still wrong because it does not implement DR899; see PR10456.

Patch by Jonathan Sauer!

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

13 years agoMove ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon Mulder!
Chris Lattner [Sat, 23 Jul 2011 17:14:25 +0000 (17:14 +0000)]
Move ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon Mulder!

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

13 years agoUnbreak the MSVC build, using namespace clang is required otherwise MSVC will not...
Francois Pichet [Sat, 23 Jul 2011 11:36:43 +0000 (11:36 +0000)]
Unbreak the MSVC build, using namespace clang is required otherwise MSVC will not find raw_ostream.

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

13 years agoremove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
Chris Lattner [Sat, 23 Jul 2011 10:55:15 +0000 (10:55 +0000)]
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.

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

13 years agoclean up forward declarations of raw_ostream to use the new LLVM.h
Chris Lattner [Sat, 23 Jul 2011 10:35:09 +0000 (10:35 +0000)]
clean up forward declarations of raw_ostream to use the new LLVM.h
patch by Jon Mulder!

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

13 years agoMigrate 2007-10-01-BuildArrayRef.c from llvm/test/FrontendC.
Eric Christopher [Sat, 23 Jul 2011 02:16:25 +0000 (02:16 +0000)]
Migrate 2007-10-01-BuildArrayRef.c from llvm/test/FrontendC.

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

13 years agoMove TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.
Evan Cheng [Sat, 23 Jul 2011 00:45:53 +0000 (00:45 +0000)]
Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.

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

13 years agoAdd ext_backslash_newline_eof to Wnewline-eof group.
Anna Zaks [Sat, 23 Jul 2011 00:36:52 +0000 (00:36 +0000)]
Add ext_backslash_newline_eof to Wnewline-eof group.

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

13 years agoThis patch (thanks to Doug Gregor) fixes a
Sean Callanan [Fri, 22 Jul 2011 23:46:03 +0000 (23:46 +0000)]
This patch (thanks to Doug Gregor) fixes a
problem where Clang was setting the
hasExternalVisibleDecls() bit for all
DeclContexts it imported.  This caused Clang
to make unnecessary calls to
findExternalVisibleDecls() when an external
AST source was installed.

In fact, Clang sometimes interpreted a failure
by one of these spurious calls to find a
Decl as meaning the Decl didn't exist, even
though findExternalLexicalDecls() did locate
that decl.  This produced amusing errors of
the form:

-
error: no member named 'b' in 'A'; did you
mean 'b'?
-

Now, if hasExternalVisibleDecls() or
hasExternalLexicalDecls() should be set, the
external AST source must do so itself.

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

13 years agoExpose no newline at end of file warning under Wnewline-eof flag.
Anna Zaks [Fri, 22 Jul 2011 23:08:19 +0000 (23:08 +0000)]
Expose no newline at end of file warning under Wnewline-eof flag.

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

13 years agoMatch LLVM API change.
Evan Cheng [Fri, 22 Jul 2011 21:59:11 +0000 (21:59 +0000)]
Match LLVM API change.

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

13 years agokill a FIXME in IsIntegralPromotion
David Majnemer [Fri, 22 Jul 2011 21:09:04 +0000 (21:09 +0000)]
kill a FIXME in IsIntegralPromotion

IsIntegralPromotion should consider the signedness of FromType when
calculating promotions. This, as of now, cannot be exercised on any
platform so there is no corresponding test.

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

13 years agoRemove prepending of '$' to module names.
Jonathan D. Turner [Fri, 22 Jul 2011 17:25:03 +0000 (17:25 +0000)]
Remove prepending of '$' to module names.

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

13 years agoSwitch all of the "isysroot" const char*'s throughout the AST reader
Douglas Gregor [Fri, 22 Jul 2011 16:35:34 +0000 (16:35 +0000)]
Switch all of the "isysroot" const char*'s throughout the AST reader
and writer to StringRef or std::string, as appropriate.

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

13 years agoRename ASTReader::PerFileData to serialization::Module, pulling it out
Douglas Gregor [Fri, 22 Jul 2011 16:00:58 +0000 (16:00 +0000)]
Rename ASTReader::PerFileData to serialization::Module, pulling it out
of ASTReader so it can become its own full-fledged class
(eventually). No functionality change.

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

13 years agoUse -ffreestanding with clang_cc1 to make the test picks the clang builtin include.
Francois Pichet [Fri, 22 Jul 2011 10:49:54 +0000 (10:49 +0000)]
Use -ffreestanding with clang_cc1 to make the test picks the clang builtin include.

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