]> granicus.if.org Git - clang/log
clang
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

15 years agoFixes a regression in generating objc's GC API
Fariborz Jahanian [Tue, 8 Sep 2009 19:45:47 +0000 (19:45 +0000)]
Fixes a regression in generating objc's GC API
in assiging to c pointer types with a GC'able
attribute.

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

15 years agoconvert this to filecheck, hopefully it will fix PR4888. If nothing
Chris Lattner [Tue, 8 Sep 2009 18:43:45 +0000 (18:43 +0000)]
convert this to filecheck, hopefully it will fix PR4888.  If nothing
else it will make tests run faster and make 4888 easier to diagnose.

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

15 years agoVastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig!
Anders Carlsson [Tue, 8 Sep 2009 18:24:21 +0000 (18:24 +0000)]
Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig!

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

15 years agoFix PR4922, where Sema would complete tentative definitions in nondeterminstic
Chris Lattner [Tue, 8 Sep 2009 18:19:27 +0000 (18:19 +0000)]
Fix PR4922, where Sema would complete tentative definitions in nondeterminstic
order because it was doing so while iterating over a densemap.

There are still similar problems in other places, for example
WeakUndeclaredIdentifiers is still written to the PCH file in a nondeterminstic
order, and we emit warnings about #pragma weak in nondeterminstic order.

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

15 years agoreduce indentation.
Chris Lattner [Tue, 8 Sep 2009 18:10:11 +0000 (18:10 +0000)]
reduce indentation.

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

15 years agoSupport templateids in friend declarations. Fixes bug 4859.
John McCall [Tue, 8 Sep 2009 17:47:29 +0000 (17:47 +0000)]
Support templateids in friend declarations.  Fixes bug 4859.

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

15 years agoSupport running tests using the new 'lit', via 'make test LIT2=1'.
Daniel Dunbar [Tue, 8 Sep 2009 16:39:23 +0000 (16:39 +0000)]
Support running tests using the new 'lit', via 'make test LIT2=1'.

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

15 years agoRemove FIXMEs for pedantically-gcc-bug-compatible behavior.
Daniel Dunbar [Tue, 8 Sep 2009 16:39:16 +0000 (16:39 +0000)]
Remove FIXMEs for pedantically-gcc-bug-compatible behavior.
 - We aren't going to fix these since they haven't caused problems in practice.

 - Similarly, don't forward -object to Darwin ld.

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

15 years agoHandle variadic constructors better. Share code between BuildCXXConstructExpr and...
Anders Carlsson [Tue, 8 Sep 2009 01:48:42 +0000 (01:48 +0000)]
Handle variadic constructors better. Share code between BuildCXXConstructExpr and BuildCXXTemporaryObjectExpr.

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

15 years agoClean up the CXXConstructExpr constructor, add Arg getters.
Anders Carlsson [Tue, 8 Sep 2009 01:23:37 +0000 (01:23 +0000)]
Clean up the CXXConstructExpr constructor, add Arg getters.

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

15 years agoreject returning a block expr even when it has parens and casts in the way.
Chris Lattner [Tue, 8 Sep 2009 00:36:37 +0000 (00:36 +0000)]
reject returning a block expr even when it has parens and casts in the way.

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

15 years agoRemove trailing whitespace.
Daniel Dunbar [Mon, 7 Sep 2009 23:07:56 +0000 (23:07 +0000)]
Remove trailing whitespace.

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

15 years agoBuildCXXConstructExpr now takes a MultiExprArg.
Anders Carlsson [Mon, 7 Sep 2009 22:23:31 +0000 (22:23 +0000)]
BuildCXXConstructExpr now takes a MultiExprArg.

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

15 years agoCheck that the destination type of a static_cast expression is a complete type.
Anders Carlsson [Mon, 7 Sep 2009 18:25:47 +0000 (18:25 +0000)]
Check that the destination type of a static_cast expression is a complete type.

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

15 years agoMore <sstream> removal.
Benjamin Kramer [Mon, 7 Sep 2009 12:33:46 +0000 (12:33 +0000)]
More <sstream> removal.

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

15 years agoRemove unnecessary #include <sstream>.
Benjamin Kramer [Mon, 7 Sep 2009 11:12:05 +0000 (11:12 +0000)]
Remove unnecessary #include <sstream>.

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

15 years agoRefine vcall offsets. Cleanups. WIP.
Mike Stump [Mon, 7 Sep 2009 04:27:52 +0000 (04:27 +0000)]
Refine vcall offsets.  Cleanups.  WIP.

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

15 years agoUse a SetVector for tracking some Obj-C metadata, to ensure deterministic
Daniel Dunbar [Mon, 7 Sep 2009 00:20:42 +0000 (00:20 +0000)]
Use a SetVector for tracking some Obj-C metadata, to ensure deterministic
output.
 - Also, cleanup code to output inline asm references.

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

15 years agoTest for generation of objc_assign_strongCast in a variety of
Fariborz Jahanian [Sun, 6 Sep 2009 19:44:57 +0000 (19:44 +0000)]
Test for generation of objc_assign_strongCast in a variety of
situations.

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

15 years agoReapply 81096, now with a fix. Spot the bug:
Anders Carlsson [Sun, 6 Sep 2009 16:54:02 +0000 (16:54 +0000)]
Reapply 81096, now with a fix. Spot the bug:

      for (unsigned i = numargs; i < NumArgs; ++i)
        Args[0] = 0;

;)

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

15 years agoRevert "Initialize default CXXConstructExpr arguments to 0. Fixes a crash when
Daniel Dunbar [Sun, 6 Sep 2009 01:31:23 +0000 (01:31 +0000)]
Revert "Initialize default CXXConstructExpr arguments to 0. Fixes a crash when
destroying the CXXConstructExpr.", this is causing test failures across the
board.

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

15 years agolit: Set requireAndAnd config variable (currently unused).
Daniel Dunbar [Sun, 6 Sep 2009 01:31:12 +0000 (01:31 +0000)]
lit: Set requireAndAnd config variable (currently unused).

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

15 years agoInitialize default CXXConstructExpr arguments to 0. Fixes a crash when destroying...
Anders Carlsson [Sat, 5 Sep 2009 22:51:06 +0000 (22:51 +0000)]
Initialize default CXXConstructExpr arguments to 0. Fixes a crash when destroying the CXXConstructExpr.

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

15 years agoFix buffer overflow reported in PR 4903.
Ted Kremenek [Sat, 5 Sep 2009 17:59:01 +0000 (17:59 +0000)]
Fix buffer overflow reported in PR 4903.

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

15 years agoRefine overrides and thunks for virtual bases. Cleanups. WIP.
Mike Stump [Sat, 5 Sep 2009 11:28:33 +0000 (11:28 +0000)]
Refine overrides and thunks for virtual bases.  Cleanups.  WIP.

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

15 years agoReplace some instances of std::string with StringRefs.
Benjamin Kramer [Sat, 5 Sep 2009 09:49:39 +0000 (09:49 +0000)]
Replace some instances of std::string with StringRefs.

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

15 years agoCleanup.
Mike Stump [Sat, 5 Sep 2009 09:24:43 +0000 (09:24 +0000)]
Cleanup.

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

15 years agoCleanups.
Mike Stump [Sat, 5 Sep 2009 09:10:58 +0000 (09:10 +0000)]
Cleanups.

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