]> granicus.if.org Git - clang/log
clang
16 years agoFix typo and spelling of -Wunused-macros.
Daniel Dunbar [Wed, 14 Jan 2009 18:56:36 +0000 (18:56 +0000)]
Fix typo and spelling of -Wunused-macros.

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

16 years agoTest explicit constructor
Douglas Gregor [Wed, 14 Jan 2009 18:02:48 +0000 (18:02 +0000)]
Test explicit constructor

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

16 years agoIntroduce support for C++0x explicit conversion operators (N2437)
Douglas Gregor [Wed, 14 Jan 2009 15:45:31 +0000 (15:45 +0000)]
Introduce support for C++0x explicit conversion operators (N2437)

Small cleanup in the handling of user-defined conversions.

Also, implement an optimization when constructing a call. We avoid
recomputing implicit conversion sequences and instead use those
conversion sequences that we computed as part of overload resolution.

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

16 years agoAdd a FIXME.
Steve Naroff [Wed, 14 Jan 2009 07:06:32 +0000 (07:06 +0000)]
Add a FIXME.

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

16 years agoccc: Darwin/Compiler: Improve gcc compat in use of -auxbase-strip.
Daniel Dunbar [Wed, 14 Jan 2009 03:31:16 +0000 (03:31 +0000)]
ccc: Darwin/Compiler: Improve gcc compat in use of -auxbase-strip.

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

16 years agoccc: Implement argument translation for clang.
Daniel Dunbar [Wed, 14 Jan 2009 01:50:15 +0000 (01:50 +0000)]
ccc: Implement argument translation for clang.
 - This is what ccc (old) currently handles.

 - Clang accepts some more things that aren't getting forwarded...

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

16 years agoccc: Add hello.{cpp,m} tests.
Daniel Dunbar [Wed, 14 Jan 2009 01:34:13 +0000 (01:34 +0000)]
ccc: Add hello.{cpp,m} tests.
 - hello.cpp is XFAIL pending g++ emulation.

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

16 years agoccc: Add -ccc-echo special option, and support pulling CCC_CLANG,
Daniel Dunbar [Wed, 14 Jan 2009 01:32:05 +0000 (01:32 +0000)]
ccc: Add -ccc-echo special option, and support pulling CCC_CLANG,
CCC_ECHO, and CCC_FALLBACK from environment as ccc (old) did.

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

16 years agoccc: Use Clang/Compile for Objective-C files as well.
Daniel Dunbar [Wed, 14 Jan 2009 01:30:55 +0000 (01:30 +0000)]
ccc: Use Clang/Compile for Objective-C files as well.

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

16 years agoFix a subtle bug in DeclContext::DestroyDecls().
Steve Naroff [Wed, 14 Jan 2009 01:27:31 +0000 (01:27 +0000)]
Fix a subtle bug in DeclContext::DestroyDecls().

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

16 years agoccc: Add dummy Clang/Compile tool and use on Darwin/X86 for C files.
Daniel Dunbar [Wed, 14 Jan 2009 01:03:36 +0000 (01:03 +0000)]
ccc: Add dummy Clang/Compile tool and use on Darwin/X86 for C files.

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

16 years agoFunctionDecl::setParams() now uses the allocator associated with ASTContext to alloca...
Ted Kremenek [Wed, 14 Jan 2009 00:42:25 +0000 (00:42 +0000)]
FunctionDecl::setParams() now uses the allocator associated with ASTContext to allocate the array of ParmVarDecl*'s.

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

16 years agoccc: Darwin/Compile: Define __private_extern__ when building c++.
Daniel Dunbar [Wed, 14 Jan 2009 00:06:14 +0000 (00:06 +0000)]
ccc: Darwin/Compile: Define __private_extern__ when building c++.

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

16 years agoImplemenent objective-c's NSObject attribute as a way of ddeclaraing c-type
Fariborz Jahanian [Tue, 13 Jan 2009 23:34:40 +0000 (23:34 +0000)]
Implemenent objective-c's NSObject attribute as a way of ddeclaraing c-type
objects as an objective-c object.

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

16 years agoPTH:
Ted Kremenek [Tue, 13 Jan 2009 23:19:12 +0000 (23:19 +0000)]
PTH:
- Use canonical FileID when using getSpelling() caching.  This
  addresses some cache misses we were seeing with -fsyntax-only on
  Cocoa.h
- Added Preprocessor::getPhysicalCharacterAt() utility method for
  clients to grab the first character at a specified sourcelocation.
  This uses the PTH spelling cache.
- Modified Sema::ActOnNumericConstant() to use
  Preprocessor::getPhysicalCharacterAt() instead of
  SourceManager::getCharacterData() (to get PTH hits).

These changes cause -fsyntax-only to not page in any sources from
Cocoa.h.  We see a speedup of 27%.

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

16 years agoPermitting typedefs without a name is a Microsoft/GNU extension
Douglas Gregor [Tue, 13 Jan 2009 23:10:51 +0000 (23:10 +0000)]
Permitting typedefs without a name is a Microsoft/GNU extension

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

16 years agoFix corner cases in PTH getSpelling() binary search.
Ted Kremenek [Tue, 13 Jan 2009 22:16:45 +0000 (22:16 +0000)]
Fix corner cases in PTH getSpelling() binary search.

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

16 years agoPTH: Fix remaining cases where the spelling cache in the PTH file was being missed...
Ted Kremenek [Tue, 13 Jan 2009 22:05:50 +0000 (22:05 +0000)]
PTH: Fix remaining cases where the spelling cache in the PTH file was being missed when it shouldn't.  This shaves another 7% off PTH time for -Eonly on Cocoa.h

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

16 years agoccc: Fix a test case.
Daniel Dunbar [Tue, 13 Jan 2009 21:11:28 +0000 (21:11 +0000)]
ccc: Fix a test case.

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

16 years agouse a slightly more sensible position for an array ref's "getExprLoc"
Chris Lattner [Tue, 13 Jan 2009 21:11:15 +0000 (21:11 +0000)]
use a slightly more sensible position for an array ref's "getExprLoc"

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

16 years agoccc: Darwin: Implement some important general argument translations
Daniel Dunbar [Tue, 13 Jan 2009 21:07:43 +0000 (21:07 +0000)]
ccc: Darwin: Implement some important general argument translations
for the Darwin tool chain.
 - Ideally we would localize these to tool specific argument
   processing but for now this matches gcc closely.

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

16 years agoTurn off some Destroy calls that are currenly causing double-destruction of ScopedDec...
Douglas Gregor [Tue, 13 Jan 2009 19:47:12 +0000 (19:47 +0000)]
Turn off some Destroy calls that are currenly causing double-destruction of ScopedDecls. We will re-enable this later, when we have time to fully solve the ownership issue.

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

16 years agoccc: Allow internal tool chain specific argument translation.
Daniel Dunbar [Tue, 13 Jan 2009 18:51:26 +0000 (18:51 +0000)]
ccc: Allow internal tool chain specific argument translation.
 - Pulled -Xarch processing into this.

 - Get rid of manual creation of forwarding arg array.

 - Use Darwin/CC1 instead of generic GCC cc1 on X86.

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

16 years agoUse the unqualified type for GCCs struct/union cast extension
Anders Carlsson [Tue, 13 Jan 2009 17:00:51 +0000 (17:00 +0000)]
Use the unqualified type for GCCs struct/union cast extension

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

16 years agoDeclContext::KindTrait was not meant to be used outside of DeclContext::CastTo (cause...
Argyrios Kyrtzidis [Tue, 13 Jan 2009 13:11:58 +0000 (13:11 +0000)]
DeclContext::KindTrait was not meant to be used outside of DeclContext::CastTo (causes compilation error on MSVC).
Add DeclContext::getDeclKind() and use that instead of DeclContext::KindTrait.

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

16 years agoccc: Bug fix, '-f...' should be part of the '-f' group.
Daniel Dunbar [Tue, 13 Jan 2009 07:39:45 +0000 (07:39 +0000)]
ccc: Bug fix, '-f...' should be part of the '-f' group.

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

16 years agoAdd simple tool for comparing drivers (hardcoded to gcc and xcc) which
Daniel Dunbar [Tue, 13 Jan 2009 07:38:29 +0000 (07:38 +0000)]
Add simple tool for comparing drivers (hardcoded to gcc and xcc) which
support -###.

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

16 years agoccc: Darwin/Link also runs dsymutil in one very particular situation.
Daniel Dunbar [Tue, 13 Jan 2009 06:44:28 +0000 (06:44 +0000)]
ccc: Darwin/Link also runs dsymutil in one very particular situation.

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

16 years agoPrint function parameters in DeclContextPrinter.
Zhongxing Xu [Tue, 13 Jan 2009 06:25:33 +0000 (06:25 +0000)]
Print function parameters in DeclContextPrinter.

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

16 years agoccc: Bug fix and gcc compatibility tweak.
Daniel Dunbar [Tue, 13 Jan 2009 06:25:31 +0000 (06:25 +0000)]
ccc: Bug fix and gcc compatibility tweak.

 - --gstabs only goes to Darwin/Assembler when dealing with an
     assembly file from the command line.

 - Relative placement of -o option for cc1 moves depending on
   -fsyntax-only/-S, how quaint.

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

16 years agoccc: Add option groups.
Daniel Dunbar [Tue, 13 Jan 2009 05:54:38 +0000 (05:54 +0000)]
ccc: Add option groups.
 - Simple mechanism for group together sets of options so the driver
   can efficiently deal with them as a group (i.e., for forwarding -i*
   to cc1).

 - Use to finish off the major missing pieces of Darwin/CC1 support.

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

16 years agoWarn when someone tries to pass a variable with a non-POD type to a varargs function...
Anders Carlsson [Tue, 13 Jan 2009 05:48:52 +0000 (05:48 +0000)]
Warn when someone tries to pass a variable with a non-POD type to a varargs function/method/block.

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

16 years agoFix argument-passing bugs in a call to object
Douglas Gregor [Tue, 13 Jan 2009 05:10:00 +0000 (05:10 +0000)]
Fix argument-passing bugs in a call to object

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

16 years agoccc: Darwin/CC1: Hardcode (for now) some -m options to match gcc.
Daniel Dunbar [Tue, 13 Jan 2009 04:51:51 +0000 (04:51 +0000)]
ccc: Darwin/CC1: Hardcode (for now) some -m options to match gcc.

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

16 years agoccc: Allow host to over-ride default arch based on command line
Daniel Dunbar [Tue, 13 Jan 2009 04:05:40 +0000 (04:05 +0000)]
ccc: Allow host to over-ride default arch based on command line
arguments (e.g., -m32 and -m64).

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

16 years agoImprove c++ methods printing in DeclContextPrinter.
Zhongxing Xu [Tue, 13 Jan 2009 03:26:38 +0000 (03:26 +0000)]
Improve c++ methods printing in DeclContextPrinter.

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

16 years agoadd a fixme.
Zhongxing Xu [Tue, 13 Jan 2009 03:07:41 +0000 (03:07 +0000)]
add a fixme.

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

16 years agoImprove DeclContextPrinter: print enum name.
Zhongxing Xu [Tue, 13 Jan 2009 02:41:08 +0000 (02:41 +0000)]
Improve DeclContextPrinter: print enum name.

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

16 years agoBug fix, __private_extern__ globals were always introducing a definition.
Daniel Dunbar [Tue, 13 Jan 2009 02:25:00 +0000 (02:25 +0000)]
Bug fix, __private_extern__ globals were always introducing a definition.

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

16 years agoAdd KillStruct to region store.
Zhongxing Xu [Tue, 13 Jan 2009 01:49:57 +0000 (01:49 +0000)]
Add KillStruct to region store.
 - put the killed region in the kill set.
 - set its default value to unknown.
 - removes all bindings for its subregions.

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

16 years agoUpdated checker build.
Ted Kremenek [Tue, 13 Jan 2009 01:41:37 +0000 (01:41 +0000)]
Updated checker build.

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

16 years agoAdd an initial framework of a DeclContextPrinter. It can print DeclContext and
Zhongxing Xu [Tue, 13 Jan 2009 01:29:24 +0000 (01:29 +0000)]
Add an initial framework of a DeclContextPrinter. It can print DeclContext and
its Decls in indented format. An Example:

$ cat t.cpp
class A {
  int a;
  void f();
};
void A::f() {
  a = 3;
}

$ clang -print-decl-contexts t.cpp
[translation unit] 0x9754d7c
    <typedef> __builtin_va_list
    [class] A 0x9753310
        <class> A 0x975ce20
        <field> a
        <c++ method> f
        <c++ ctor> A
        <c++ ctor> A
        <c++ method> operator=
        <c++ dtor> ~A
    [c++ method] f [[0x9753310]]

Some comments: '<>' indicates a declaration, '[]' indicates a definition, '[[
]]' displays the semantic DeclContext which is different from the lexical
DeclContext.  The symbols printed can definitely be changed in the future.

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

16 years agoPatch to fix encoding of Enum bitfields in ObjC.
Fariborz Jahanian [Tue, 13 Jan 2009 01:18:13 +0000 (01:18 +0000)]
Patch to fix encoding of Enum bitfields in ObjC.

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

16 years agoThis test now passes.
Ted Kremenek [Tue, 13 Jan 2009 01:06:56 +0000 (01:06 +0000)]
This test now passes.

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

16 years agoccc: Darwin/CC1: Be bug compatible with gcc in a corner case.
Daniel Dunbar [Tue, 13 Jan 2009 01:04:40 +0000 (01:04 +0000)]
ccc: Darwin/CC1: Be bug compatible with gcc in a corner case.

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

16 years agostatic analyzer: Handle casts from arrays to integers. This fixes PR 3297.
Ted Kremenek [Tue, 13 Jan 2009 01:04:21 +0000 (01:04 +0000)]
static analyzer: Handle casts from arrays to integers.  This fixes PR 3297.

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

16 years agoInvert condition on branch (was causing RegionStore::ArrayToPointer to return 'unknow...
Ted Kremenek [Tue, 13 Jan 2009 01:03:27 +0000 (01:03 +0000)]
Invert condition on branch (was causing RegionStore::ArrayToPointer to return 'unknown' on most cases.

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

16 years agoAdd the proper restrictions on the left-hand argument of a built-in
Douglas Gregor [Tue, 13 Jan 2009 00:52:54 +0000 (00:52 +0000)]
Add the proper restrictions on the left-hand argument of a built-in
assignment operator candidate (C++ [over.match.oper]p4).

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

16 years agoMake sure we don't name a constructor or destructor with a qualified
Douglas Gregor [Tue, 13 Jan 2009 00:11:19 +0000 (00:11 +0000)]
Make sure we don't name a constructor or destructor with a qualified
type. It leads to very weird errors.

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

16 years agoPatch to implement code gen for aggrgate-valued property used
Fariborz Jahanian [Mon, 12 Jan 2009 23:27:26 +0000 (23:27 +0000)]
Patch to implement code gen for aggrgate-valued property used
to access a field of its type.

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

16 years agoCleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak
Douglas Gregor [Mon, 12 Jan 2009 23:27:07 +0000 (23:27 +0000)]
Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak

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

16 years agoUpdate C++ status and add a few more tests of overloading for member function calls
Douglas Gregor [Mon, 12 Jan 2009 23:20:38 +0000 (23:20 +0000)]
Update C++ status and add a few more tests of overloading for member function calls

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

16 years agoFix test case (incomplete "expected-warning" line)
Ted Kremenek [Mon, 12 Jan 2009 23:09:55 +0000 (23:09 +0000)]
Fix test case (incomplete "expected-warning" line)

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

16 years agoPatch by Roman Divacky:
Ted Kremenek [Mon, 12 Jan 2009 23:09:09 +0000 (23:09 +0000)]
Patch by Roman Divacky:

Extend string-literal checking for printf() format string to handle conditional
ternary operators where both sides are literals.

This fixes PR 3319: http://llvm.org/bugs/show_bug.cgi?id=3319

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

16 years agoFix crasher due to use-after-release: DeclContext now owns all ObjCMethodDecls, and...
Ted Kremenek [Mon, 12 Jan 2009 22:49:54 +0000 (22:49 +0000)]
Fix crasher due to use-after-release: DeclContext now owns all ObjCMethodDecls, and shouldn't be released elsewhere.

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

16 years agoImplement support for anonymous structs and unions in C. Both C and
Douglas Gregor [Mon, 12 Jan 2009 22:49:06 +0000 (22:49 +0000)]
Implement support for anonymous structs and unions in C. Both C and
C++ handle anonymous structs/unions in the same way. Addresses several
bugs:

  <rdar://problem/6259534>
  <rdar://problem/6481130>
  <rdar://problem/6483159>

The test case in PR clang/1750 now passes with -fsyntax-only, but
CodeGen for inline assembler still fails.

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

16 years agoccc: Bug fix, output can be NULL.
Daniel Dunbar [Mon, 12 Jan 2009 22:19:59 +0000 (22:19 +0000)]
ccc: Bug fix, output can be NULL.

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

16 years agoretain/release checker:
Ted Kremenek [Mon, 12 Jan 2009 21:45:02 +0000 (21:45 +0000)]
retain/release checker:
- Refactor a bunch of logic in the retain/release checker, making it more
  condense and easier to read.
- Add support for "Create" methods in the DiskArbitration framework

retain/release tests:
- Rename CFDate.m to retain-release.m, and move test from CFString.c to
  retain-release.m
- Add DiskArbitration framework tests cases.
- Add/refine and few more retain/release GC test cases.

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

16 years agoccc: Even more Darwin/cc1 argument translation support.
Daniel Dunbar [Mon, 12 Jan 2009 21:44:10 +0000 (21:44 +0000)]
ccc: Even more Darwin/cc1 argument translation support.

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

16 years ago(LLVM up) Match TargetData API change in LLVM TOT.
Daniel Dunbar [Mon, 12 Jan 2009 21:08:18 +0000 (21:08 +0000)]
(LLVM up) Match TargetData API change in LLVM TOT.

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

16 years agoPatch to supprt case of readonly property being
Fariborz Jahanian [Mon, 12 Jan 2009 19:55:42 +0000 (19:55 +0000)]
Patch to supprt case of readonly property being
assigned to when it has user declared setter method
defined in the class implementation (but no declaration in
the class itself).

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

16 years agoccc: Add leading space in -### output to match gcc.
Daniel Dunbar [Mon, 12 Jan 2009 19:36:35 +0000 (19:36 +0000)]
ccc: Add leading space in -### output to match gcc.

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

16 years agoccc: (Darwin) More argument translation for Darwin/Compile tool.
Daniel Dunbar [Mon, 12 Jan 2009 18:51:02 +0000 (18:51 +0000)]
ccc: (Darwin) More argument translation for Darwin/Compile tool.

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

16 years agoProperly set the scope of non-fields declared within a struct, union,
Douglas Gregor [Mon, 12 Jan 2009 18:45:55 +0000 (18:45 +0000)]
Properly set the scope of non-fields declared within a struct, union,
or enum to be outside that struct, union, or enum. Fixes several
regressions:

  <rdar://problem/6487662>
  <rdar://problem/6487669>
  <rdar://problem/6487684>
  <rdar://problem/6487702>
  PR clang/3305
  PR clang/3312

There is still some work to do in Objective-C++, but this requires
that each of the Objective-C entities (interfaces, implementations,
etc.) to be introduced into the context stack with
PushDeclContext/PopDeclContext. This will be a separate fix, later.

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

16 years agoccc: (Darwin) More argument translation for Darwin/Compile tool.
Daniel Dunbar [Mon, 12 Jan 2009 17:53:19 +0000 (17:53 +0000)]
ccc: (Darwin) More argument translation for Darwin/Compile tool.

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

16 years agoccc: (Darwin) Start implementing argument translation for
Daniel Dunbar [Mon, 12 Jan 2009 09:23:15 +0000 (09:23 +0000)]
ccc: (Darwin) Start implementing argument translation for
Darwin/Compile tool.

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

16 years agoccc: When constructing a named output, only use base name (not full
Daniel Dunbar [Mon, 12 Jan 2009 07:48:07 +0000 (07:48 +0000)]
ccc: When constructing a named output, only use base name (not full
path).

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

16 years agoccc: (Darwin) Move path resolution into ToolChain.
Daniel Dunbar [Mon, 12 Jan 2009 07:45:49 +0000 (07:45 +0000)]
ccc: (Darwin) Move path resolution into ToolChain.

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

16 years agoccc: Implement the rest of Darwin/Assembler argument translation.
Daniel Dunbar [Mon, 12 Jan 2009 07:40:25 +0000 (07:40 +0000)]
ccc: Implement the rest of Darwin/Assembler argument translation.

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

16 years agoccc: Implement macosx-version-min conditions (including a bug fix).
Daniel Dunbar [Mon, 12 Jan 2009 05:02:38 +0000 (05:02 +0000)]
ccc: Implement macosx-version-min conditions (including a bug fix).

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

16 years agoccc: Generalize Darwin/Link tool based on Darwin version.
Daniel Dunbar [Mon, 12 Jan 2009 04:21:12 +0000 (04:21 +0000)]
ccc: Generalize Darwin/Link tool based on Darwin version.

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

16 years agoccc: Support arguments which behave like linker inputs.
Daniel Dunbar [Mon, 12 Jan 2009 03:33:58 +0000 (03:33 +0000)]
ccc: Support arguments which behave like linker inputs.
 - Support comma joined options which magically turn into multiple
   value arguments (e.g., -Wl,)

 - Split out separate Arg::render routine for when an argument is
   being rendered as an input (as opposed to in its original form).

 - Add option flag for options which should be rendered without the
   option when they are used as an input (e.g., -Xlinker or -o).

 - Support -weak-l..., -weak_framework, and -weak_library.

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

16 years agoccc: (Darwin) Pass -ObjC to linker if -ObjC, -ObjC++ or -fobjc is
Daniel Dunbar [Mon, 12 Jan 2009 02:24:21 +0000 (02:24 +0000)]
ccc: (Darwin) Pass -ObjC to linker if -ObjC, -ObjC++ or -fobjc is
present.

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

16 years agoHandle multi-value inputs
Anders Carlsson [Mon, 12 Jan 2009 02:22:13 +0000 (02:22 +0000)]
Handle multi-value inputs

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

16 years agoMake sure to initialize the ConstraintInfo to 0
Anders Carlsson [Mon, 12 Jan 2009 02:15:29 +0000 (02:15 +0000)]
Make sure to initialize the ConstraintInfo to 0

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

16 years agosome more minor asqualtype bugs.
Chris Lattner [Mon, 12 Jan 2009 00:21:19 +0000 (00:21 +0000)]
some more minor asqualtype bugs.

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

16 years agoimprove some more is*Type predicates to look through asqualtypes.
Chris Lattner [Mon, 12 Jan 2009 00:10:42 +0000 (00:10 +0000)]
improve some more is*Type predicates to look through asqualtypes.

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

16 years agotestcase that works now with r62061
Chris Lattner [Mon, 12 Jan 2009 00:08:58 +0000 (00:08 +0000)]
testcase that works now with r62061

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

16 years agosimplify these predicates a bit.
Chris Lattner [Sun, 11 Jan 2009 23:59:49 +0000 (23:59 +0000)]
simplify these predicates a bit.

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

16 years agomake ScalarExprEmitter::EmitCompare() emit the expression with the correct type inste...
Nuno Lopes [Sun, 11 Jan 2009 23:22:37 +0000 (23:22 +0000)]
make ScalarExprEmitter::EmitCompare() emit the expression with the correct type instead of always zext it to an int
this fixes codegen of simple exprs in C++ like 'if (x != 0)'

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

16 years agoccc: Add fairly complete argument translation for Darwin link step.
Daniel Dunbar [Sun, 11 Jan 2009 23:13:15 +0000 (23:13 +0000)]
ccc: Add fairly complete argument translation for Darwin link step.
 - Some things are still hardcoded, and macosx-version-min comparison
   isn't implemented, but otherwise this very closely matches gcc.

 - The one exception is that arguments (like -framework or -Wl,) which are
   treated as linker inputs instead of options are not being
   forwarded yet.

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

16 years agoccc: Add several convenience methods for argument translation.
Daniel Dunbar [Sun, 11 Jan 2009 22:42:24 +0000 (22:42 +0000)]
ccc: Add several convenience methods for argument translation.

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

16 years agoccc: Add and name a host of arguments.
Daniel Dunbar [Sun, 11 Jan 2009 22:12:37 +0000 (22:12 +0000)]
ccc: Add and name a host of arguments.
 - Also, fix bug in MultipleValuesOption which was accepting joined
   arguments.

 - Add ArgList::getArgs, provides iterator over all arg instances for a
   given option.

 - Option definition is very much in need of cleaning...

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

16 years agoccc: Give the Host an opportunity to switch ToolChains when binding
Daniel Dunbar [Sun, 11 Jan 2009 22:06:22 +0000 (22:06 +0000)]
ccc: Give the Host an opportunity to switch ToolChains when binding
archs (as a driver driver).

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

16 years agoccc: Print -### output on stderr to match gcc.
Daniel Dunbar [Sun, 11 Jan 2009 22:03:55 +0000 (22:03 +0000)]
ccc: Print -### output on stderr to match gcc.

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

16 years agoMore inline asm fixes
Anders Carlsson [Sun, 11 Jan 2009 21:23:27 +0000 (21:23 +0000)]
More inline asm fixes

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

16 years agomake paste avoidance avoid pasting digraphs and :: only when digraphs or c++ is enabled
Chris Lattner [Sun, 11 Jan 2009 19:48:19 +0000 (19:48 +0000)]
make paste avoidance avoid pasting digraphs and :: only when digraphs or c++ is enabled
respectively.  Inspired by a patch by Dan Villiom Podlaski Christiansen.

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

16 years agoHandle readwrite constraints correctly
Anders Carlsson [Sun, 11 Jan 2009 19:46:50 +0000 (19:46 +0000)]
Handle readwrite constraints correctly

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

16 years agoForgot to commit this
Anders Carlsson [Sun, 11 Jan 2009 19:40:10 +0000 (19:40 +0000)]
Forgot to commit this

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

16 years agoUse a common function for emitting asm inputs and remove a FIXME
Anders Carlsson [Sun, 11 Jan 2009 19:32:54 +0000 (19:32 +0000)]
Use a common function for emitting asm inputs and remove a FIXME

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

16 years agothis patch "adds support for specifying multiple dependancy targets using ‘-MT’....
Chris Lattner [Sun, 11 Jan 2009 19:28:34 +0000 (19:28 +0000)]
this patch "adds support for specifying multiple dependancy targets using ‘-MT’. Using this patch, I was able to use ‘ccc’ as C compiler for the few C files in LLVM. In my brief testing, the output remains identical to that of GCC."

Patch by Dan Villiom Podlaski Christiansen!

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

16 years agoFix operator precedence.
Sebastian Redl [Sun, 11 Jan 2009 13:39:06 +0000 (13:39 +0000)]
Fix operator precedence.

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

16 years agoConvert property implementation to DeclContext::addDecl().
Steve Naroff [Sun, 11 Jan 2009 12:47:58 +0000 (12:47 +0000)]
Convert property implementation to DeclContext::addDecl().
This completes the ObjCContainerDecl AST cleanup (for now).

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

16 years agoA few property related cleanups to ObjCContainerDecl AST.
Steve Naroff [Sun, 11 Jan 2009 01:06:09 +0000 (01:06 +0000)]
A few property related cleanups to ObjCContainerDecl AST.

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

16 years agoConvert some more actions to smart pointers.
Sebastian Redl [Sun, 11 Jan 2009 00:38:46 +0000 (00:38 +0000)]
Convert some more actions to smart pointers.
No performance regression in my basic test.
Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt).

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

16 years agoFix a misleading comment.
Steve Naroff [Sat, 10 Jan 2009 22:55:25 +0000 (22:55 +0000)]
Fix a misleading comment.

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

16 years agoThis patch fixes the code gen failures which was a fallout from
Fariborz Jahanian [Sat, 10 Jan 2009 21:06:09 +0000 (21:06 +0000)]
This patch fixes the code gen failures which was a fallout from
not merging protocol properties into the classes which
use those protocols. With this patch, all my exceutable
test pass again.

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

16 years agoExplicit declaration of property setters over-ride
Fariborz Jahanian [Sat, 10 Jan 2009 18:43:55 +0000 (18:43 +0000)]
Explicit declaration of property setters over-ride
prohibition of 'readonly' properties in an assignment.

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

16 years agoadd a bunch of castToDeclContext/castFromDeclContext methods.
Zhongxing Xu [Sat, 10 Jan 2009 14:38:38 +0000 (14:38 +0000)]
add a bunch of castToDeclContext/castFromDeclContext methods.

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

16 years agoadd castToDeclContext/castFromDeclContext methods to RecordDecl.
Zhongxing Xu [Sat, 10 Jan 2009 14:14:16 +0000 (14:14 +0000)]
add castToDeclContext/castFromDeclContext methods to RecordDecl.

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