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

15 years agoCleanups.
Mike Stump [Sat, 5 Sep 2009 08:47:24 +0000 (08:47 +0000)]
Cleanups.

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

15 years agoCleanups.
Mike Stump [Sat, 5 Sep 2009 08:45:02 +0000 (08:45 +0000)]
Cleanups.

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

15 years agoCleanups.
Mike Stump [Sat, 5 Sep 2009 08:40:18 +0000 (08:40 +0000)]
Cleanups.

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

15 years agoCleanups.
Mike Stump [Sat, 5 Sep 2009 08:37:03 +0000 (08:37 +0000)]
Cleanups.

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

15 years agoCleanups.
Mike Stump [Sat, 5 Sep 2009 08:07:32 +0000 (08:07 +0000)]
Cleanups.

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

15 years agoOverhaul the mangler to use a visitor pattern, at least for types. We can safely
John McCall [Sat, 5 Sep 2009 07:56:18 +0000 (07:56 +0000)]
Overhaul the mangler to use a visitor pattern, at least for types.  We can safely
ignore non-canonical type classes, but apparently we need to know how to mangle
dependent names.

The missing cases are much more obvious now.

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

15 years agoCleanups. WIP.
Mike Stump [Sat, 5 Sep 2009 07:49:12 +0000 (07:49 +0000)]
Cleanups.  WIP.

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

15 years agoPass the ConstructLoc to BuildCXXConstructExpr.
Anders Carlsson [Sat, 5 Sep 2009 07:40:38 +0000 (07:40 +0000)]
Pass the ConstructLoc to BuildCXXConstructExpr.

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

15 years agoInstall thunks later to fixup overrides. Track space taken by vbase
Mike Stump [Sat, 5 Sep 2009 07:20:32 +0000 (07:20 +0000)]
Install thunks later to fixup overrides.  Track space taken by vbase
offsets better for thunk refinements.  Cleanups.  WIP.

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

15 years agopass the correct predecessor node.
Zhongxing Xu [Sat, 5 Sep 2009 06:46:12 +0000 (06:46 +0000)]
pass the correct predecessor node.

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

15 years agoStart emitting ElaboratedTypes in C++ mode. Support the effort in various
John McCall [Sat, 5 Sep 2009 06:31:47 +0000 (06:31 +0000)]
Start emitting ElaboratedTypes in C++ mode.  Support the effort in various
ways:  remove elab types during desugaring, enhance pretty-printing to allow
tags to be suppressed without suppressing scopes, look through elab types
when associating a typedef name with an anonymous record type.

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

15 years agoDo not call FlushReports() in GRBugReporter's dtor. We already call it in
Zhongxing Xu [Sat, 5 Sep 2009 06:06:49 +0000 (06:06 +0000)]
Do not call FlushReports() in GRBugReporter's dtor. We already call it in
ActionGRExprEngine().

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

15 years agoReport errors for member functions correctly.
Anders Carlsson [Sat, 5 Sep 2009 05:38:54 +0000 (05:38 +0000)]
Report errors for member functions correctly.

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

15 years agoUse a separate diagnostic for default function argument expressions.
Anders Carlsson [Sat, 5 Sep 2009 05:14:19 +0000 (05:14 +0000)]
Use a separate diagnostic for default function argument expressions.

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

15 years agoRefactor builtin function evaluation code into its own function.
Zhongxing Xu [Sat, 5 Sep 2009 05:00:57 +0000 (05:00 +0000)]
Refactor builtin function evaluation code into its own function.

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

15 years agoAdd missing include.
Daniel Dunbar [Sat, 5 Sep 2009 00:48:32 +0000 (00:48 +0000)]
Add missing include.

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

15 years agoBasic support for representing elaborated type specifiers
John McCall [Sat, 5 Sep 2009 00:15:47 +0000 (00:15 +0000)]
Basic support for representing elaborated type specifiers
directly in the AST.  The current thinking is to create these
only in C++ mode for efficiency.  But for now, they're not being
created at all; patch to follow.

This will let us do things like verify that tags match during
template instantation, as well as signal that an elaborated type
specifier was used for clients that actually care.

Optimally, the TypeLoc hierarchy should be adjusted to carry tag
location information as well.

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

15 years agoImprove the AST representation and semantic analysis for extern
Douglas Gregor [Fri, 4 Sep 2009 22:48:11 +0000 (22:48 +0000)]
Improve the AST representation and semantic analysis for extern
templates. We now distinguish between an explicit instantiation
declaration and an explicit instantiation definition, and know not to
instantiate explicit instantiation declarations. Unfortunately, there
is some remaining confusion w.r.t. instantiation of out-of-line member
function definitions that causes trouble here.

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

15 years agoDon't generate any code for an explicit call to a trivial destructor.
Douglas Gregor [Fri, 4 Sep 2009 19:04:08 +0000 (19:04 +0000)]
Don't generate any code for an explicit call to a trivial destructor.

Now that parsing, semantic analysis, and (I think) code generation of
pseudo-destructor expressions and explicit destructor calls works,
update the example-dynarray.cpp test to destroy the objects it
allocates and update the test to actually compile + link.
The code seems correct, but the Clang-compiled version dies with a
malloc error. Time to debug!

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

15 years agoCleanup.
Mike Stump [Fri, 4 Sep 2009 18:54:10 +0000 (18:54 +0000)]
Cleanup.

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

15 years agoMerge libgcc spec changes for darwin::Link::ConstructJob.
Daniel Dunbar [Fri, 4 Sep 2009 18:35:47 +0000 (18:35 +0000)]
Merge libgcc spec changes for darwin::Link::ConstructJob.

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

15 years agoTweak darwin::Link::AddLinkArgs.
Daniel Dunbar [Fri, 4 Sep 2009 18:35:41 +0000 (18:35 +0000)]
Tweak darwin::Link::AddLinkArgs.

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

15 years agoImplement darwin::Link::AddDarwinArch for ARM.
Daniel Dunbar [Fri, 4 Sep 2009 18:35:31 +0000 (18:35 +0000)]
Implement darwin::Link::AddDarwinArch for ARM.

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

15 years agoDarwin: Pass -iphoneos-version-min to ld when building for ARM.
Daniel Dunbar [Fri, 4 Sep 2009 18:35:21 +0000 (18:35 +0000)]
Darwin: Pass -iphoneos-version-min to ld when building for ARM.

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

15 years agoAlso compare stdout and stderr lines.
Daniel Dunbar [Fri, 4 Sep 2009 18:35:09 +0000 (18:35 +0000)]
Also compare stdout and stderr lines.

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

15 years agoAdd -ccc-install-dir option for faking installation path.
Daniel Dunbar [Fri, 4 Sep 2009 18:35:03 +0000 (18:35 +0000)]
Add -ccc-install-dir option for faking installation path.

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