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

15 years agoRename Darwin_X86 toolchain to just Darwin, this can support all platforms.
Daniel Dunbar [Fri, 4 Sep 2009 18:34:51 +0000 (18:34 +0000)]
Rename Darwin_X86 toolchain to just Darwin, this can support all platforms.

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

15 years agoIf a destructor is referenced or a pseudo-destructor expression is
Douglas Gregor [Fri, 4 Sep 2009 18:29:40 +0000 (18:29 +0000)]
If a destructor is referenced or a pseudo-destructor expression is
formed without a trailing '(', diagnose the error (these expressions
must be immediately called), emit a fix-it hint, and fix the code.

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

15 years agoAdd overidding for methods for vtable building for the secondary
Mike Stump [Fri, 4 Sep 2009 18:27:16 +0000 (18:27 +0000)]
Add overidding for methods for vtable building for the secondary
vtables.  Add thunk generation.  WIP.

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

15 years agoUse llvm::sys::getHostTriple, not LLVM_HOSTTRIPLE.
Daniel Dunbar [Fri, 4 Sep 2009 17:43:10 +0000 (17:43 +0000)]
Use llvm::sys::getHostTriple, not LLVM_HOSTTRIPLE.

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

15 years agoMake CmpDriver less stupid.
Daniel Dunbar [Fri, 4 Sep 2009 17:41:47 +0000 (17:41 +0000)]
Make CmpDriver less stupid.

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

15 years agoSupport 'make test TESTSUITE=CodeGen', etc.
Daniel Dunbar [Fri, 4 Sep 2009 17:40:27 +0000 (17:40 +0000)]
Support 'make test TESTSUITE=CodeGen', etc.

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

15 years agoRemove unused argument.
Daniel Dunbar [Fri, 4 Sep 2009 17:39:02 +0000 (17:39 +0000)]
Remove unused argument.

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

15 years agoImplement AST, semantics, and CodeGen for C++ pseudo-destructor
Douglas Gregor [Fri, 4 Sep 2009 17:36:40 +0000 (17:36 +0000)]
Implement AST, semantics, and CodeGen for C++ pseudo-destructor
expressions, e.g.,

  p->~T()

when p is a pointer to a scalar type.

We don't currently diagnose errors when pseudo-destructor expressions
are used in any way other than by forming a call.

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

15 years agoImplement accessors clang_getCursorKind(), clang_getCursorDecl().
Steve Naroff [Fri, 4 Sep 2009 15:44:05 +0000 (15:44 +0000)]
Implement accessors clang_getCursorKind(), clang_getCursorDecl().
Implement clang_getCursor() - wired up to Argiris's work.
Implement callbacks for CXCursor_ObjCProtocolRef.

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

15 years agoWhen searching for a default constructor or copy constructor, skip constructor templates
Douglas Gregor [Fri, 4 Sep 2009 14:46:39 +0000 (14:46 +0000)]
When searching for a default constructor or copy constructor, skip constructor templates

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

15 years agoParse extern templates, pass that information all the way to Sema,
Douglas Gregor [Fri, 4 Sep 2009 06:33:52 +0000 (06:33 +0000)]
Parse extern templates, pass that information all the way to Sema,
then drop it on the floor.

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

15 years agoIntroduce an egregious hack to fix PR4828.
Douglas Gregor [Fri, 4 Sep 2009 05:53:02 +0000 (05:53 +0000)]
Introduce an egregious hack to fix PR4828.

The problem this change addresses is that we treat __is_pod and
__is_empty as keywords in C++, because they are built-in type traits
in GCC >= 4.3. However, GNU libstdc++ 4.2 (and possibly earlier
versions) define implementation-detail struct templates named __is_pod
and __is_empty.

This commit solves the problem by recognizing

  struct __is_pod

and

  struct __is_empty

as special token sequences. When one of these token sequences is
encountered, the keyword (__is_pod or __is_empty) is implicitly
downgraded to an identifier so that parsing can continue. This is an
egregious hack, but it has the virtue of "just working" whether
someone is using libstdc++ 4.2 or not, without the need for special
flags.

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

15 years agoActually initialize HasQualifier and HasExplicitTemplateArgumentList in the EmptyShel...
Douglas Gregor [Fri, 4 Sep 2009 05:04:07 +0000 (05:04 +0000)]
Actually initialize HasQualifier and HasExplicitTemplateArgumentList in the EmptyShell constructor for MemberExpr. Should clear up some valgrind failures in PCH reading

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

15 years agoAdd a valgrind suppressions file for x86_64-pc-linux-gnu and gcc-4.3.3 which
Daniel Dunbar [Fri, 4 Sep 2009 02:53:57 +0000 (02:53 +0000)]
Add a valgrind suppressions file for x86_64-pc-linux-gnu and gcc-4.3.3 which
suppresses the overlapped memcpy in stable_sort that clang triggers.

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

15 years agoAdd --vg-arg option to clang test runner.
Daniel Dunbar [Fri, 4 Sep 2009 02:53:50 +0000 (02:53 +0000)]
Add --vg-arg option to clang test runner.
 - Passes additional argument through to valgrind.

Also, don't run valgrind with --leak-check=no by default.

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

15 years agomove the check into MarkNoReturnFunction.
Zhongxing Xu [Fri, 4 Sep 2009 02:17:35 +0000 (02:17 +0000)]
move the check into MarkNoReturnFunction.

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

15 years agoExtract mark-no-return-function code into a function.
Zhongxing Xu [Fri, 4 Sep 2009 02:13:36 +0000 (02:13 +0000)]
Extract mark-no-return-function code into a function.

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

15 years agoCorrectly handle elaborated template ids. Still not handled properly for friends.
John McCall [Fri, 4 Sep 2009 01:14:41 +0000 (01:14 +0000)]
Correctly handle elaborated template ids.  Still not handled properly for friends.

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

15 years agoPatch to instantiate destructors used to destruct
Fariborz Jahanian [Thu, 3 Sep 2009 23:18:17 +0000 (23:18 +0000)]
Patch to instantiate destructors used to destruct
base and data members when they are needed.

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

15 years agoIf the alignment of the chosen field in a union is greater than the alignment of...
Anders Carlsson [Thu, 3 Sep 2009 22:56:02 +0000 (22:56 +0000)]
If the alignment of the chosen field in a union is greater than the alignment of the union, we need to use a packed LLVM struct. Fixes <rdar://problem/7184250>.

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

15 years agoImplement tree transformations for DeclarationNames. Among other
Douglas Gregor [Thu, 3 Sep 2009 22:13:48 +0000 (22:13 +0000)]
Implement tree transformations for DeclarationNames. Among other
things, this means that we can properly cope with member access
expressions such as

  t->operator T()

where T is a template parameter (or other dependent type).

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

15 years agoUpdate C++ status, since a bunch of the comments were out-of-date
Douglas Gregor [Thu, 3 Sep 2009 21:51:43 +0000 (21:51 +0000)]
Update C++ status, since a bunch of the comments were out-of-date

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

15 years agoImprove template instantiation for member access expressions that
Douglas Gregor [Thu, 3 Sep 2009 21:38:09 +0000 (21:38 +0000)]
Improve template instantiation for member access expressions that
involve qualified names, e.g., x->Base::f. We now maintain enough
information in the AST to compare the results of the name lookup of
"Base" in the scope of the postfix-expression (determined at template
definition time) and in the type of the object expression.

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

15 years agoMark constructors used in initialization of base(s) and fields
Fariborz Jahanian [Thu, 3 Sep 2009 21:32:41 +0000 (21:32 +0000)]
Mark constructors used in initialization of base(s) and fields
as referecned with location where they are used. Still
need to look at destructor aspects of them.

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

15 years agoIssue diagnostics in variety of situations involving
Fariborz Jahanian [Thu, 3 Sep 2009 19:36:46 +0000 (19:36 +0000)]
Issue diagnostics in variety of situations involving
reference/const data members when user has declared
the constructor. This necessitated some non-minor
refactoring.

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

15 years agoDon't use '%ll', this doesn't workin on Win32.
Daniel Dunbar [Thu, 3 Sep 2009 19:23:49 +0000 (19:23 +0000)]
Don't use '%ll', this doesn't workin on Win32.

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

15 years agoAdd ASTUnit::getOriginalSourceFileName() and use in clang_getTranslationUnitSpelling().
Steve Naroff [Thu, 3 Sep 2009 18:19:54 +0000 (18:19 +0000)]
Add ASTUnit::getOriginalSourceFileName() and use in clang_getTranslationUnitSpelling().

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

15 years agoImproved handling for dependent, qualified member access expressions, e.g.,
Douglas Gregor [Thu, 3 Sep 2009 16:14:30 +0000 (16:14 +0000)]
Improved handling for dependent, qualified member access expressions, e.g.,

  t->Base::f

where t has a dependent type. We save the nested-name-specifier in the
CXXUnresolvedMemberExpr then, during instantiation, substitute into
the nested-name-specifier with the (transformed) object type of t, so
that we get name lookup into the type of the object expression.

Note that we do not yet retain information about name lookup into the
lexical scope of the member access expression, so several regression
tests are still disabled.

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

15 years ago- Add back some harmless code that part of a reverted commit (r80859). I'll investiga...
Steve Naroff [Thu, 3 Sep 2009 15:49:00 +0000 (15:49 +0000)]
- Add back some harmless code that part of a reverted commit (r80859). I'll investigate the lifetime snafu (with ASTUnit) separately.
- Traverse category methods, add a "class ref" and make the little test harness a bit more flexible.

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

15 years agoSave/load POSIXThreads flag for PCH
Douglas Gregor [Thu, 3 Sep 2009 14:36:33 +0000 (14:36 +0000)]
Save/load POSIXThreads flag for PCH

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

15 years agoRevert "Visit function/method bodies and issue callback for parameters and local
Daniel Dunbar [Thu, 3 Sep 2009 05:59:50 +0000 (05:59 +0000)]
Revert "Visit function/method bodies and issue callback for parameters and local
variables.", this is breaking x86_64-apple-darwin10 and Linux tests.

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

15 years agoRevert "Remove redundant local variable (use newly created instance data).", the
Daniel Dunbar [Thu, 3 Sep 2009 05:59:35 +0000 (05:59 +0000)]
Revert "Remove redundant local variable (use newly created instance data).", the
previous commit this depends on is breaking x86_64-apple-darwin10 and Linux tests.

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

15 years agoAdd basic support for -pthread.
Daniel Dunbar [Thu, 3 Sep 2009 04:54:28 +0000 (04:54 +0000)]
Add basic support for -pthread.
 - Patch by David Chisnall, with PCH and Darwin support mixed in.

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

15 years agoTweak comment.
Daniel Dunbar [Thu, 3 Sep 2009 04:54:12 +0000 (04:54 +0000)]
Tweak comment.

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

15 years agoFix 80 column violations.
Ted Kremenek [Thu, 3 Sep 2009 03:02:58 +0000 (03:02 +0000)]
Fix 80 column violations.

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

15 years agoFixed bug introduced in r79900 where FreeBSD was turned into NetBSD, transposing...
David Chisnall [Thu, 3 Sep 2009 01:48:05 +0000 (01:48 +0000)]
Fixed bug introduced in r79900 where FreeBSD was turned into NetBSD, transposing the ABIs and breaking both platforms.

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

15 years agoFix regression introduced in r80786 and reported in PR 4867. We should use
Ted Kremenek [Thu, 3 Sep 2009 01:48:03 +0000 (01:48 +0000)]
Fix regression introduced in r80786 and reported in PR 4867. We should use
'dyn_cast' instead of 'cast' as the denominator value could be UnknownVal (and
is not guaranteed to be a DefinedVal).

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

15 years agoremove a debug output I introduced in the last commit.
Zhongxing Xu [Thu, 3 Sep 2009 01:31:59 +0000 (01:31 +0000)]
remove a debug output I introduced in the last commit.

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

15 years agoUpdate.
Mike Stump [Thu, 3 Sep 2009 01:30:36 +0000 (01:30 +0000)]
Update.

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

15 years agoAdd CastExpr::getCastKindName and use it in the StmtDumper.
Anders Carlsson [Thu, 3 Sep 2009 00:59:21 +0000 (00:59 +0000)]
Add CastExpr::getCastKindName and use it in the StmtDumper.

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