]> granicus.if.org Git - clang/log
clang
15 years agoChange CodeGenModule::ConstructTypeAttributes to return the calling convention
Daniel Dunbar [Sat, 12 Sep 2009 00:59:20 +0000 (00:59 +0000)]
Change CodeGenModule::ConstructTypeAttributes to return the calling convention
to use, and allow the ABI implementation to override the calling convention.

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

15 years agoRemove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID
Douglas Gregor [Sat, 12 Sep 2009 00:22:50 +0000 (00:22 +0000)]
Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID

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

15 years agoRemove unnecessary ASTContext parameters from isMain and isExternC
Douglas Gregor [Sat, 12 Sep 2009 00:17:51 +0000 (00:17 +0000)]
Remove unnecessary ASTContext parameters from isMain and isExternC

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

15 years agoEliminate FunctionDecl::getBodyIfAvailable
Douglas Gregor [Sat, 12 Sep 2009 00:08:48 +0000 (00:08 +0000)]
Eliminate FunctionDecl::getBodyIfAvailable

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

15 years agoFix a crash when generating vtables that contain destructors.
Anders Carlsson [Sat, 12 Sep 2009 00:00:29 +0000 (00:00 +0000)]
Fix a crash when generating vtables that contain destructors.

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

15 years agoAdd basic covariant thunk generation support. WIP.
Mike Stump [Fri, 11 Sep 2009 23:25:56 +0000 (23:25 +0000)]
Add basic covariant thunk generation support.  WIP.

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

15 years agoWhen performing name lookup within a class template or class template
Douglas Gregor [Fri, 11 Sep 2009 22:57:37 +0000 (22:57 +0000)]
When performing name lookup within a class template or class template
partial specialization, make sure we look into non-dependent base
classes (but not dependent base classes). Fixes PR4951.

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

15 years agoNo need to build the visible conversionfunction list for root class.
Fariborz Jahanian [Fri, 11 Sep 2009 22:27:50 +0000 (22:27 +0000)]
No need to build the visible conversionfunction list for root class.

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

15 years agoSet the calling convention based on the CGFunctionInfo.
Daniel Dunbar [Fri, 11 Sep 2009 22:25:00 +0000 (22:25 +0000)]
Set the calling convention based on the CGFunctionInfo.

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

15 years agoAdd CallingConvention argument to CGFunctionInfo.
Daniel Dunbar [Fri, 11 Sep 2009 22:24:53 +0000 (22:24 +0000)]
Add CallingConvention argument to CGFunctionInfo.
 - Currently unused.

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

15 years agoIntroduce "DefinedOrUnknownSVal" into the SVal class hierarchy, providing a way
Ted Kremenek [Fri, 11 Sep 2009 22:07:28 +0000 (22:07 +0000)]
Introduce "DefinedOrUnknownSVal" into the SVal class hierarchy, providing a way
to statically type various methods in SValuator/GRState as required either a
defined value or a defined-but-possibly-unknown value. This leads to various
logic cleanups in GRExprEngine, and lets the compiler enforce via type checking
our assumptions about what symbolic values are possibly undefined and what are
not.

Along the way, clean up some of the static analyzer diagnostics regarding the uses of uninitialized values.

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

15 years agoPatch to build visible conversion function list lazily and make its
Fariborz Jahanian [Fri, 11 Sep 2009 21:44:33 +0000 (21:44 +0000)]
Patch to build visible conversion function list lazily and make its
first use in calling the conversion function on delete statements.

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

15 years agoSlight improvement for extern templates, so that an explicit
Douglas Gregor [Fri, 11 Sep 2009 21:19:12 +0000 (21:19 +0000)]
Slight improvement for extern templates, so that an explicit
instantiation definition can follow an explicit instantiation
declaration. This is as far as I want to go with extern templates now,
but they will still need quite a bit more work to get all of the C++0x
semantics right.

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

15 years agoAlter Action's friend interface to prepare for templated friend declarations and
John McCall [Fri, 11 Sep 2009 21:02:39 +0000 (21:02 +0000)]
Alter Action's friend interface to prepare for templated friend declarations and
to stop making promises we can't currently keep.

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

15 years agoFix use of uninitialized, David please check.
Daniel Dunbar [Fri, 11 Sep 2009 20:56:53 +0000 (20:56 +0000)]
Fix use of uninitialized, David please check.

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

15 years agoImprove testing for extern temp templates, slightly. We are (properly) suppressing...
Douglas Gregor [Fri, 11 Sep 2009 20:35:49 +0000 (20:35 +0000)]
Improve testing for extern temp templates, slightly. We are (properly) suppressing the implicit instantiation of members of extern templates

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

15 years agoTweak the semantics of FunctionDecl::isOutOfLine to consider an
Douglas Gregor [Fri, 11 Sep 2009 20:15:17 +0000 (20:15 +0000)]
Tweak the semantics of FunctionDecl::isOutOfLine to consider an
instantiation of a member function template or member function of a
class template to be out-of-line if the definition of that function
template or member function was defined out-of-line. This ensures that
we get the correct linkage for explicit instantiations of out-of-line
definitions.

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

15 years agoAdd test for dependent PredefinedExprs.
Sam Weinig [Fri, 11 Sep 2009 18:49:46 +0000 (18:49 +0000)]
Add test for dependent PredefinedExprs.

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

15 years agoUndid my yesterday patch which is not needed with an upcoming patch.
Fariborz Jahanian [Fri, 11 Sep 2009 18:46:22 +0000 (18:46 +0000)]
Undid my yesterday patch which is not needed with an upcoming patch.

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

15 years agoCleanup and test C++ default arguments. Improvements include:
Douglas Gregor [Fri, 11 Sep 2009 18:44:32 +0000 (18:44 +0000)]
Cleanup and test C++ default arguments. Improvements include:

  - Diagnose attempts to add default arguments to templates (or member
    functions of templates) after the initial declaration (DR217).
  - Improve diagnostics when a default argument is redefined. Now, the
    note will always point at the place where the default argument was
    previously defined, rather than pointing to the most recent
    declaration of the function.

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

15 years agoJust ignore friend templates for now so we won't crash.
Anders Carlsson [Fri, 11 Sep 2009 17:54:14 +0000 (17:54 +0000)]
Just ignore friend templates for now so we won't crash.

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

15 years agoFixes a regression in objc GC layout bitmap involving
Fariborz Jahanian [Fri, 11 Sep 2009 17:39:05 +0000 (17:39 +0000)]
Fixes a regression in objc GC layout bitmap involving
block pointer ivars.

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

15 years agoUpdate CMakeLists.
Benjamin Kramer [Fri, 11 Sep 2009 11:28:30 +0000 (11:28 +0000)]
Update CMakeLists.

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

15 years agoTrack a class template specialization's point of instantiation separately
John McCall [Fri, 11 Sep 2009 07:25:08 +0000 (07:25 +0000)]
Track a class template specialization's point of instantiation separately
from its location.  Initialize appropriately.

When implicitly creating a declaration of a class template specialization
after encountering the first reference to it, use the pattern class's
location instead of the location of the first reference.

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

15 years agoWhen stringizing a NamedDecl for a diagnostic, treat the template
John McCall [Fri, 11 Sep 2009 06:45:03 +0000 (06:45 +0000)]
When stringizing a NamedDecl for a diagnostic, treat the template
specialization types differently.

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

15 years agoUpdate prototype.
Daniel Dunbar [Fri, 11 Sep 2009 06:34:14 +0000 (06:34 +0000)]
Update prototype.

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

15 years agoFix PR4878 for real.
Anders Carlsson [Fri, 11 Sep 2009 05:54:14 +0000 (05:54 +0000)]
Fix PR4878 for real.

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

15 years agoSupport elaborated dependent types and diagnose tag mismatches.
John McCall [Fri, 11 Sep 2009 04:59:25 +0000 (04:59 +0000)]
Support elaborated dependent types and diagnose tag mismatches.

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

15 years agoStart to add a new transfer function that inlines callee. To be continued.
Zhongxing Xu [Fri, 11 Sep 2009 04:13:42 +0000 (04:13 +0000)]
Start to add a new transfer function that inlines callee. To be continued.

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

15 years agoTest commit
Sam Weinig [Fri, 11 Sep 2009 03:29:30 +0000 (03:29 +0000)]
Test commit

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

15 years agoInstantiate PredefinedExprs correctly. Patch by Sam Weinig!
Anders Carlsson [Fri, 11 Sep 2009 01:22:35 +0000 (01:22 +0000)]
Instantiate PredefinedExprs correctly. Patch by Sam Weinig!

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

15 years agoSwizzle the target triple based on -mthumb, and update clang-cc to recognize
Daniel Dunbar [Fri, 11 Sep 2009 01:14:50 +0000 (01:14 +0000)]
Swizzle the target triple based on -mthumb, and update clang-cc to recognize
thumb-foo-bar as an ARM target.

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

15 years agoUpdate this test to expect the "inbounds" keyword, which LLVM's constant
Dan Gohman [Fri, 11 Sep 2009 00:27:06 +0000 (00:27 +0000)]
Update this test to expect the "inbounds" keyword, which LLVM's constant
folder is now automatically adding.

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

15 years agoDiagnose VLAs as an error in C++.
Douglas Gregor [Fri, 11 Sep 2009 00:18:58 +0000 (00:18 +0000)]
Diagnose VLAs as an error in C++.

Also, treat the GNU __null as an integral constant expression to match
GCC's behavior.

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

15 years agoMake sure ObjCInterfaceDecl's that are forward declared always contain a valid location.
Steve Naroff [Fri, 11 Sep 2009 00:12:01 +0000 (00:12 +0000)]
Make sure ObjCInterfaceDecl's that are forward declared always contain a valid location.

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

15 years agoPass the GlobalDecl to getMangledName, fixes PR4890.
Anders Carlsson [Fri, 11 Sep 2009 00:11:35 +0000 (00:11 +0000)]
Pass the GlobalDecl to getMangledName, fixes PR4890.

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

15 years agoPass GlobalDecls to GenerateCode and StartFunction.
Anders Carlsson [Fri, 11 Sep 2009 00:07:24 +0000 (00:07 +0000)]
Pass GlobalDecls to GenerateCode and StartFunction.

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

15 years agoGlobalDecl doesn't have an explicit constructor anymore.
Anders Carlsson [Thu, 10 Sep 2009 23:43:36 +0000 (23:43 +0000)]
GlobalDecl doesn't have an explicit constructor anymore.

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

15 years agoAdd stricter GlobalDecl constructors.
Anders Carlsson [Thu, 10 Sep 2009 23:38:47 +0000 (23:38 +0000)]
Add stricter GlobalDecl constructors.

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

15 years agoFix a regression where write-barrier was not being generated
Fariborz Jahanian [Thu, 10 Sep 2009 23:38:45 +0000 (23:38 +0000)]
Fix a regression where write-barrier was not being generated
for block pointer.

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

15 years agoEliminate some "default"s in CheckICE.
Douglas Gregor [Thu, 10 Sep 2009 23:31:45 +0000 (23:31 +0000)]
Eliminate some "default"s in CheckICE.

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

15 years agoLook for overloaded arrow operators in base classes.
Anders Carlsson [Thu, 10 Sep 2009 23:18:36 +0000 (23:18 +0000)]
Look for overloaded arrow operators in base classes.

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

15 years agoTeach LIT2 how to run Clang tests in the objdir for srcdir != objdir builds.
Daniel Dunbar [Thu, 10 Sep 2009 23:00:15 +0000 (23:00 +0000)]
Teach LIT2 how to run Clang tests in the objdir for srcdir != objdir builds.

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

15 years agoInitial handling of -m{soft-float,hard-float,float-abi=} for ARM.
Daniel Dunbar [Thu, 10 Sep 2009 23:00:09 +0000 (23:00 +0000)]
Initial handling of -m{soft-float,hard-float,float-abi=} for ARM.

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

15 years agoMove X86 handling of -m[no-]soft-float and -m[no-]red-zone into AddX86TargetArgs.
Daniel Dunbar [Thu, 10 Sep 2009 22:59:57 +0000 (22:59 +0000)]
Move X86 handling of -m[no-]soft-float and -m[no-]red-zone into AddX86TargetArgs.

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

15 years agoChange getLLVMArchNameForARM to just get the suffix.
Daniel Dunbar [Thu, 10 Sep 2009 22:59:51 +0000 (22:59 +0000)]
Change getLLVMArchNameForARM to just get the suffix.

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

15 years agoPatch to collect conversion methods in base(s) and derived
Fariborz Jahanian [Thu, 10 Sep 2009 22:26:16 +0000 (22:26 +0000)]
Patch to collect conversion methods in base(s) and derived
class into a candidate set.

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

15 years agoNon fragile ABI for GNU runtime. Patch bu David Chisnall.
Fariborz Jahanian [Thu, 10 Sep 2009 21:48:21 +0000 (21:48 +0000)]
Non fragile ABI for GNU runtime. Patch bu David Chisnall.

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

15 years agoDon't check use of a member function declaration used if the member function is virtu...
Anders Carlsson [Thu, 10 Sep 2009 20:48:14 +0000 (20:48 +0000)]
Don't check use of a member function declaration used if the member function is virtual and the member reference expression doesn't explicitly qualify it. Fixes PR4878.

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

15 years agostatic_cast, reinterpret_cast, and const_cast can all be used in C++
Douglas Gregor [Thu, 10 Sep 2009 17:44:23 +0000 (17:44 +0000)]
static_cast, reinterpret_cast, and const_cast can all be used in C++
integral constant expressions (for conversions to integer types,
naturally). I don't *think* that const_casts will ever get to this
point, but I also can't convince myself that they won't... so I've
taken the safe route and allowed the ICE checking code to look at
const_cast.

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

15 years agoWhen performing unqualified name lookup into a DeclContext, also look into
Douglas Gregor [Thu, 10 Sep 2009 16:57:35 +0000 (16:57 +0000)]
When performing unqualified name lookup into a DeclContext, also look into
all of the parent DeclContexts that aren't represented within the
Scope chain. This fixes some name-lookup problems in out-of-line
definitions of members of nested classes.

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

15 years agoGet the size of object to pass to objc_memmove_collectable()
Fariborz Jahanian [Thu, 10 Sep 2009 16:20:31 +0000 (16:20 +0000)]
Get the size of object to pass to objc_memmove_collectable()
from correct field of TypeInfo.

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

15 years agoset svn:ignore
Nuno Lopes [Thu, 10 Sep 2009 12:05:26 +0000 (12:05 +0000)]
set svn:ignore

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

15 years agoAdd code to mangle the triple for LLVM on ARM.
Daniel Dunbar [Thu, 10 Sep 2009 06:49:20 +0000 (06:49 +0000)]
Add code to mangle the triple for LLVM on ARM.
 - I think we should get rid of this distinction though, but I need to discuss with the interested parties.

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

15 years agoMake AnalysisManager stateless. Now other analyzer components only depends on
Zhongxing Xu [Thu, 10 Sep 2009 05:44:00 +0000 (05:44 +0000)]
Make AnalysisManager stateless. Now other analyzer components only depends on
local node information.

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

15 years agoDon't pass -fno-builtin-str{cat,cpy} to clang-cc, I forget we don't support that...
Daniel Dunbar [Thu, 10 Sep 2009 04:57:27 +0000 (04:57 +0000)]
Don't pass -fno-builtin-str{cat,cpy} to clang-cc, I forget we don't support that yet. PR4941.

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

15 years agoARM: Pass -mcpu to clang-cc based on -march= and -mcpu=.
Daniel Dunbar [Thu, 10 Sep 2009 04:57:17 +0000 (04:57 +0000)]
ARM: Pass -mcpu to clang-cc based on -march= and -mcpu=.

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

15 years agoDon't substitute prcontext.
Daniel Dunbar [Thu, 10 Sep 2009 04:57:10 +0000 (04:57 +0000)]
Don't substitute prcontext.

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

15 years agoImplement Darwin/ARM behavior for defaulting to -fno-builtin-str{cat,cpy}.
Daniel Dunbar [Thu, 10 Sep 2009 03:37:02 +0000 (03:37 +0000)]
Implement Darwin/ARM behavior for defaulting to -fno-builtin-str{cat,cpy}.

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

15 years agoMake the forwarding member of block byref structs be a pointer to the block byref...
Anders Carlsson [Thu, 10 Sep 2009 01:32:12 +0000 (01:32 +0000)]
Make the forwarding member of block byref structs be a pointer to the block byref struct itself.

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

15 years agoAdd a check that -static is not used with -dynamic or -mdynamic-no-pic.
Daniel Dunbar [Thu, 10 Sep 2009 01:21:12 +0000 (01:21 +0000)]
Add a check that -static is not used with -dynamic or -mdynamic-no-pic.

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

15 years agoFactor out CheckPreprocessing options to share between Clang/CC1 tools.
Daniel Dunbar [Thu, 10 Sep 2009 01:21:05 +0000 (01:21 +0000)]
Factor out CheckPreprocessing options to share between Clang/CC1 tools.

Also, fix forwarding of -C/-CC to cc1.

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

15 years agoRecognize and ignore -Woverloaded-virtual.
Daniel Dunbar [Thu, 10 Sep 2009 01:20:58 +0000 (01:20 +0000)]
Recognize and ignore -Woverloaded-virtual.

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

15 years agoFix dependencies for DiagnosticGroups.td.
Daniel Dunbar [Thu, 10 Sep 2009 01:20:50 +0000 (01:20 +0000)]
Fix dependencies for DiagnosticGroups.td.

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

15 years agoWhen re-entering a template scope, we may be entering a class template
Douglas Gregor [Thu, 10 Sep 2009 00:12:48 +0000 (00:12 +0000)]
When re-entering a template scope, we may be entering a class template
partial specialization rather than a subclass of TemplateDecl. Fixes a
crash in libstdc++ 4.2's <map>.

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

15 years agoDon't bother to perform any initialization for a variable declaration
Douglas Gregor [Wed, 9 Sep 2009 23:58:28 +0000 (23:58 +0000)]
Don't bother to perform any initialization for a variable declaration
of class type whose default constructor is trivial. Should un-break
testing on x86_64-pc-linux-gnu.

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

15 years agoFor a C++ delete expression where the operand is of class type that
Douglas Gregor [Wed, 9 Sep 2009 23:39:55 +0000 (23:39 +0000)]
For a C++ delete expression where the operand is of class type that
has a single conversion to pointer-to-object type, implicitly convert
to that pointer-to-object type (C++ [expr.delete]p1).

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

15 years agoUse the right GlobalDecl type for destructors.
Anders Carlsson [Wed, 9 Sep 2009 23:17:18 +0000 (23:17 +0000)]
Use the right GlobalDecl type for destructors.

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

15 years agoImprove handling of initialization by constructor, by ensuring that
Douglas Gregor [Wed, 9 Sep 2009 23:08:42 +0000 (23:08 +0000)]
Improve handling of initialization by constructor, by ensuring that
such initializations properly convert constructor arguments and fill
in default arguments where necessary. This also makes the ownership
model more clear.

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

15 years agoImprove Darwin argument translation to match what the driver driver does.
Daniel Dunbar [Wed, 9 Sep 2009 22:33:15 +0000 (22:33 +0000)]
Improve Darwin argument translation to match what the driver driver does.

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

15 years agoMove Clang X86 cpu/feature argument translation into AddX86TargetArgs.
Daniel Dunbar [Wed, 9 Sep 2009 22:33:08 +0000 (22:33 +0000)]
Move Clang X86 cpu/feature argument translation into AddX86TargetArgs.

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

15 years agoChange Get{File,Program}Path to return an std::string (instead of a sys::Path).
Daniel Dunbar [Wed, 9 Sep 2009 22:33:00 +0000 (22:33 +0000)]
Change Get{File,Program}Path to return an std::string (instead of a sys::Path).

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

15 years agoRemove gratuitous use of c_str().
Daniel Dunbar [Wed, 9 Sep 2009 22:32:48 +0000 (22:32 +0000)]
Remove gratuitous use of c_str().

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

15 years agoUse Twine concatenation instead of llvm::format.
Daniel Dunbar [Wed, 9 Sep 2009 22:32:41 +0000 (22:32 +0000)]
Use Twine concatenation instead of llvm::format.

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

15 years agoSimplify.
Daniel Dunbar [Wed, 9 Sep 2009 22:32:34 +0000 (22:32 +0000)]
Simplify.

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

15 years agoStringRefize ArgList construction of ArgStrings.
Daniel Dunbar [Wed, 9 Sep 2009 22:32:26 +0000 (22:32 +0000)]
StringRefize ArgList construction of ArgStrings.

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

15 years agoSuppress build warning.
Daniel Dunbar [Wed, 9 Sep 2009 22:32:15 +0000 (22:32 +0000)]
Suppress build warning.

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

15 years agoIf a cast expression needs either a conversion function or a constructor to be called...
Anders Carlsson [Wed, 9 Sep 2009 21:33:21 +0000 (21:33 +0000)]
If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.

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

15 years agoImplement: <rdar://problem/7185647> [RegionStore] 'self' cannot be NULL upon entry...
Ted Kremenek [Wed, 9 Sep 2009 20:36:12 +0000 (20:36 +0000)]
Implement:  <rdar://problem/7185647> [RegionStore] 'self' cannot be NULL upon entry to a method

Here we implement this as a precondition within GRExprEngine, even though it is
related to how BasicStoreManager and RegionStoreManager model 'self'
differently. Putting this as a high-level precondition is more general, which is
why it isn't in RegionStore.cpp.

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

15 years agoStatus update related to code gen for type conversion
Fariborz Jahanian [Wed, 9 Sep 2009 20:00:07 +0000 (20:00 +0000)]
Status update related to code gen for type conversion
functions.

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

15 years agoUse AddDarwinArch for passing arch name to assembler.
Daniel Dunbar [Wed, 9 Sep 2009 18:36:27 +0000 (18:36 +0000)]
Use AddDarwinArch for passing arch name to assembler.

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

15 years agoAdd DarwinTool base class for all Darwin tools, and move AddDarwin[Sub]Arch there.
Daniel Dunbar [Wed, 9 Sep 2009 18:36:20 +0000 (18:36 +0000)]
Add DarwinTool base class for all Darwin tools, and move AddDarwin[Sub]Arch there.

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

15 years agoPush bound architecture name into TranslateArgs.
Daniel Dunbar [Wed, 9 Sep 2009 18:36:12 +0000 (18:36 +0000)]
Push bound architecture name into TranslateArgs.

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

15 years agoPush bound architecture name into Compilation::getArgsForToolChain.
Daniel Dunbar [Wed, 9 Sep 2009 18:36:01 +0000 (18:36 +0000)]
Push bound architecture name into Compilation::getArgsForToolChain.

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

15 years agoRemove tabs, and whitespace cleanups.
Mike Stump [Wed, 9 Sep 2009 15:08:12 +0000 (15:08 +0000)]
Remove tabs, and whitespace cleanups.

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

15 years agoRemove tab characters.
Mike Stump [Wed, 9 Sep 2009 13:12:01 +0000 (13:12 +0000)]
Remove tab characters.

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

15 years agoReflow comments and some minor whitespace fixups.
Mike Stump [Wed, 9 Sep 2009 13:00:44 +0000 (13:00 +0000)]
Reflow comments and some minor whitespace fixups.

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

15 years agoFix a thinko
Douglas Gregor [Wed, 9 Sep 2009 06:04:29 +0000 (06:04 +0000)]
Fix a thinko

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

15 years agoMake BuildByRefType take a ValueDecl instead of a QualType and an alignment.
Anders Carlsson [Wed, 9 Sep 2009 02:51:03 +0000 (02:51 +0000)]
Make BuildByRefType take a ValueDecl instead of a QualType and an alignment.

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

15 years agoAllow a declaration of an array to complete a prior, incomplete
Douglas Gregor [Wed, 9 Sep 2009 01:45:28 +0000 (01:45 +0000)]
Allow a declaration of an array to complete a prior, incomplete
declaration of that array in C++.

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

15 years agoInitial stab at implement dependent member references to member
Douglas Gregor [Wed, 9 Sep 2009 00:23:06 +0000 (00:23 +0000)]
Initial stab at implement dependent member references to member
templates, e.g.,

  x.template get<T>

We can now parse these, represent them within an UnresolvedMemberExpr
expression, then instantiate that expression node in simple cases.

This allows us to stumble through parsing LLVM's Casting.h.

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

15 years agoMore objc GC's API work for array of pointers declared
Fariborz Jahanian [Tue, 8 Sep 2009 23:38:54 +0000 (23:38 +0000)]
More objc GC's API work for array of pointers declared
as __strong.

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

15 years agoChange Darwin toolchain lookup to use llvm::Triple.
Daniel Dunbar [Tue, 8 Sep 2009 23:37:36 +0000 (23:37 +0000)]
Change Darwin toolchain lookup to use llvm::Triple.
 - -2+1 FIXMEs.

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

15 years agoValidate arguments to -arch.
Daniel Dunbar [Tue, 8 Sep 2009 23:37:30 +0000 (23:37 +0000)]
Validate arguments to -arch.

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

15 years agoRename HostInfo::getToolChain to HostInfo::CreateToolChain, and don't recreate
Daniel Dunbar [Tue, 8 Sep 2009 23:37:19 +0000 (23:37 +0000)]
Rename HostInfo::getToolChain to HostInfo::CreateToolChain, and don't recreate
the default tool chain when binding the default architecture.

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

15 years agoDelete trailing whitespace.
Daniel Dunbar [Tue, 8 Sep 2009 23:37:08 +0000 (23:37 +0000)]
Delete trailing whitespace.

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

15 years agoSimplify.
Daniel Dunbar [Tue, 8 Sep 2009 23:37:02 +0000 (23:37 +0000)]
Simplify.

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

15 years agoFix ShouldUseClangCompiler to use llvm::Triple.
Daniel Dunbar [Tue, 8 Sep 2009 23:36:55 +0000 (23:36 +0000)]
Fix ShouldUseClangCompiler to use llvm::Triple.
 - -1 FIXME, and fixes 'clang -arch armv4t ...', for example.

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

15 years agoTweak & reflow comments, and delete trailing whitespace.
Daniel Dunbar [Tue, 8 Sep 2009 23:36:43 +0000 (23:36 +0000)]
Tweak & reflow comments, and delete trailing whitespace.

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

15 years agoMake sure to access APValue's data via a char array (rather than
Douglas Gregor [Tue, 8 Sep 2009 19:57:33 +0000 (19:57 +0000)]
Make sure to access APValue's data via a char array (rather than
through an array of void*), so that we don't run afoul of the
strict-aliasing rules in C++ 3.10p15. Unfortunately, GCC 4.4 still
complains about this code.

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