]> granicus.if.org Git - clang/log
clang
15 years agoImplement instantiation of enums within class templates. This isn't
Douglas Gregor [Tue, 17 Mar 2009 19:05:46 +0000 (19:05 +0000)]
Implement instantiation of enums within class templates. This isn't
quite as great as it sounds, because, while we can refer to the
enumerator values outside the template, e.g.,

  adder<long, 3, 4>::value

we can't yet refer to them with dependent names, so no Fibonacci
(yet).

InstantiateClassTemplateSpecialization is getting messy; next commit
will put it into a less-ugly state.

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

15 years agoDriver: Hide HostInfo implementations.
Daniel Dunbar [Tue, 17 Mar 2009 19:00:50 +0000 (19:00 +0000)]
Driver: Hide HostInfo implementations.
 - Also, normalize arch names a tad and stub out getToolChain
   implementations.

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

15 years agoDriver: Add two option form of ArgList::getLastArg.
Daniel Dunbar [Tue, 17 Mar 2009 18:51:42 +0000 (18:51 +0000)]
Driver: Add two option form of ArgList::getLastArg.

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

15 years agoDriver: Add logic for computing where to put job outputs (pipe,
Daniel Dunbar [Tue, 17 Mar 2009 17:53:55 +0000 (17:53 +0000)]
Driver: Add logic for computing where to put job outputs (pipe,
temporary file, user provided name, derived name).

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

15 years agoDriver: Add list of temporary and result files to Compilation.
Daniel Dunbar [Tue, 17 Mar 2009 17:51:56 +0000 (17:51 +0000)]
Driver: Add list of temporary and result files to Compilation.

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

15 years agoAdd ArgList::MakeArgString and make ArgList::Make* const.
Daniel Dunbar [Tue, 17 Mar 2009 17:51:18 +0000 (17:51 +0000)]
Add ArgList::MakeArgString and make ArgList::Make* const.
 - Slightly strange, but the idea is that the ArgList data structure
   is primarily a list of arguments; we want to allow clients to still
   add argument strings to an ArgList to avoid worrying about string
   lifetimes (or unnecessary string copying).

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

15 years agotypo
Gabor Greif [Tue, 17 Mar 2009 11:39:38 +0000 (11:39 +0000)]
typo

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

15 years agoInitialize the cleanup.dst variable if necessary. Fixes PR3789.
Anders Carlsson [Tue, 17 Mar 2009 05:53:35 +0000 (05:53 +0000)]
Initialize the cleanup.dst variable if necessary. Fixes PR3789.

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

15 years agoWe want to grep the output, not the input :-)
Anders Carlsson [Tue, 17 Mar 2009 05:49:13 +0000 (05:49 +0000)]
We want to grep the output, not the input :-)

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

15 years agoFix unused variable warning in -Asserts mode.
Daniel Dunbar [Tue, 17 Mar 2009 04:12:06 +0000 (04:12 +0000)]
Fix unused variable warning in -Asserts mode.

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

15 years agoHandle ImplicitCastExprs when instantiating templates.
Anders Carlsson [Tue, 17 Mar 2009 00:28:02 +0000 (00:28 +0000)]
Handle ImplicitCastExprs when instantiating templates.

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

15 years agoFix struct field's debug info.
Devang Patel [Mon, 16 Mar 2009 23:47:53 +0000 (23:47 +0000)]
Fix struct field's debug info.

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

15 years agoFix a problem noticed by Anders, where we were creating
Douglas Gregor [Mon, 16 Mar 2009 23:35:25 +0000 (23:35 +0000)]
Fix a problem noticed by Anders, where we were creating
IntegerLiterals during instantiation when we should be creating either
a boolean literal (CXXBoolLiteralExpr) or a character literal
(CharacterLiteral).

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

15 years agoAlmost complete implementation of rvalue references. One bug, and a few unclear areas...
Sebastian Redl [Mon, 16 Mar 2009 23:22:08 +0000 (23:22 +0000)]
Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes.

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

15 years agoBuild system changes to use TableGen to generate the various
Douglas Gregor [Mon, 16 Mar 2009 23:06:59 +0000 (23:06 +0000)]
Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:

  - We don't remove or use the current ".def" files. Instead, for now,
    we just make sure that we're building the ".inc" files.
  - Fixed CMake makefiles to run TableGen and build the ".inc" files
    when needed. Tested with both the Xcode and Makefile generators
    provided by CMake, so it should be solid.
  - Fixed normal makefiles to handle out-of-source builds that involve
    the ".inc" files.

I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.

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

15 years agosome updates, Daniel points out that this is woefully out of date.
Chris Lattner [Mon, 16 Mar 2009 20:06:22 +0000 (20:06 +0000)]
some updates, Daniel points out that this is woefully out of date.

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

15 years agosimplify this code by reading the decision from LangOptions instead
Chris Lattner [Mon, 16 Mar 2009 18:41:18 +0000 (18:41 +0000)]
simplify this code by reading the decision from LangOptions instead
of recomputing the property from command line options.

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

15 years agoCheck signedness of bitfield sizes.
Anders Carlsson [Mon, 16 Mar 2009 18:19:21 +0000 (18:19 +0000)]
Check signedness of bitfield sizes.

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

15 years agoWe support static_assert.
Anders Carlsson [Mon, 16 Mar 2009 17:28:26 +0000 (17:28 +0000)]
We support static_assert.

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

15 years agoDriver: Implement majority tool binding logic.
Daniel Dunbar [Mon, 16 Mar 2009 06:56:51 +0000 (06:56 +0000)]
Driver: Implement majority tool binding logic.
 - Still need code for determining proper output location.

 - Doesn't work yet, of course, as the host isn't providing real
   tool chains.

 - Interface still has a few warts, but has gotten a nice bit of
   polish during the rewrite.

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

15 years agoDriver: Migrate some data into the Compilation; after pipelining
Daniel Dunbar [Mon, 16 Mar 2009 06:42:30 +0000 (06:42 +0000)]
Driver: Migrate some data into the Compilation; after pipelining
access to most data should go through the current Compilation, not the
Driver (which shouldn't be specialized on variables for a single
compilation).

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

15 years agoDriver: Sketch Tool and ToolChain classes.
Daniel Dunbar [Mon, 16 Mar 2009 05:25:36 +0000 (05:25 +0000)]
Driver: Sketch Tool and ToolChain classes.

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

15 years agoDriver: Include Casting header definitions in a few places, add
Daniel Dunbar [Mon, 16 Mar 2009 05:17:44 +0000 (05:17 +0000)]
Driver: Include Casting header definitions in a few places, add
Action::getInputs.

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

15 years agoParser support for rvalue references.
Sebastian Redl [Sun, 15 Mar 2009 22:02:01 +0000 (22:02 +0000)]
Parser support for rvalue references.

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

15 years ago(Hopefully) instantiate dependent array types correctly.
Anders Carlsson [Sun, 15 Mar 2009 20:12:13 +0000 (20:12 +0000)]
(Hopefully) instantiate dependent array types correctly.

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

15 years agoHandle static_asserts when instantiating structs.
Anders Carlsson [Sun, 15 Mar 2009 18:44:04 +0000 (18:44 +0000)]
Handle static_asserts when instantiating structs.

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

15 years agoAdd the ability to clone integer and string literals. Use it when instantiating templ...
Anders Carlsson [Sun, 15 Mar 2009 18:34:13 +0000 (18:34 +0000)]
Add the ability to clone integer and string literals. Use it when instantiating template expressions.

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

15 years agoConvert a bunch of actions to smart pointers, and also bring PrintParserCallbacks...
Sebastian Redl [Sun, 15 Mar 2009 17:47:39 +0000 (17:47 +0000)]
Convert a bunch of actions to smart pointers, and also bring PrintParserCallbacks a bit more in line with reality.

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

15 years agoFix bitfield-instantiation ownership bug noticed by Anders
Douglas Gregor [Sun, 15 Mar 2009 17:43:26 +0000 (17:43 +0000)]
Fix bitfield-instantiation ownership bug noticed by Anders

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

15 years agoMake sure to release the expressions.
Anders Carlsson [Sun, 15 Mar 2009 17:35:16 +0000 (17:35 +0000)]
Make sure to release the expressions.

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

15 years agoKeep diagnostic td in sync with r67015.
Sebastian Redl [Sun, 15 Mar 2009 10:42:31 +0000 (10:42 +0000)]
Keep diagnostic td in sync with r67015.

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

15 years agoAdd note on theoretical IRgen improvement.
Daniel Dunbar [Sun, 15 Mar 2009 06:39:56 +0000 (06:39 +0000)]
Add note on theoretical IRgen improvement.

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

15 years agoRemove a FIXME.
Daniel Dunbar [Sun, 15 Mar 2009 06:05:20 +0000 (06:05 +0000)]
Remove a FIXME.

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

15 years agoFix comment typo.
Daniel Dunbar [Sun, 15 Mar 2009 05:58:43 +0000 (05:58 +0000)]
Fix comment typo.

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

15 years agoOnly intptr_t is protected by __intptr_t_defined.
Daniel Dunbar [Sun, 15 Mar 2009 03:16:47 +0000 (03:16 +0000)]
Only intptr_t is protected by __intptr_t_defined.

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

15 years agoDriver: Typo fix.
Daniel Dunbar [Sun, 15 Mar 2009 01:46:37 +0000 (01:46 +0000)]
Driver: Typo fix.

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

15 years agoDriver: claim input arguments when building phases.
Daniel Dunbar [Sun, 15 Mar 2009 01:40:22 +0000 (01:40 +0000)]
Driver: claim input arguments when building phases.

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

15 years agoDriver: Start warning about unused arguments.
Daniel Dunbar [Sun, 15 Mar 2009 01:38:15 +0000 (01:38 +0000)]
Driver: Start warning about unused arguments.
 - This has a number of current flaws, enabling now to flush out
   problems while bringing up other parts.

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

15 years agoDriver: Update ArgList::{hasArg,getLastArg} to optionally claim the
Daniel Dunbar [Sun, 15 Mar 2009 00:48:16 +0000 (00:48 +0000)]
Driver: Update ArgList::{hasArg,getLastArg} to optionally claim the
arguments if they exist.

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

15 years agoDon't accept '$' in identifiers in assembler-with-cpp mode.
Daniel Dunbar [Sun, 15 Mar 2009 00:11:28 +0000 (00:11 +0000)]
Don't accept '$' in identifiers in assembler-with-cpp mode.

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

15 years agoRevert the switch to the tablegen diags. It fails for seperate objdir builds and...
Sebastian Redl [Sat, 14 Mar 2009 15:58:54 +0000 (15:58 +0000)]
Revert the switch to the tablegen diags. It fails for seperate objdir builds and cmake builds, and I have no clue what to do about it. Revisit this after someone with a clue about the build systems has looked at it.

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

15 years agoSwitch diagnostics from .def to tablegen files. Please validate the Windows build.
Sebastian Redl [Sat, 14 Mar 2009 12:00:12 +0000 (12:00 +0000)]
Switch diagnostics from .def to tablegen files. Please validate the Windows build.

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

15 years agoUpdate tablegen diagnostic files to be in sync with the def files.
Sebastian Redl [Sat, 14 Mar 2009 10:09:49 +0000 (10:09 +0000)]
Update tablegen diagnostic files to be in sync with the def files.

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

15 years agoUpdate checker build.
Ted Kremenek [Sat, 14 Mar 2009 00:46:46 +0000 (00:46 +0000)]
Update checker build.

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

15 years agoHandle dependent types/exprs in static_assert expressions.
Anders Carlsson [Sat, 14 Mar 2009 00:33:21 +0000 (00:33 +0000)]
Handle dependent types/exprs in static_assert expressions.

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

15 years agoRemove dead DeclarationName constructors that involving knowing about the
Ted Kremenek [Sat, 14 Mar 2009 00:27:40 +0000 (00:27 +0000)]
Remove dead DeclarationName constructors that involving knowing about the
internal implementation of Selector.

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

15 years agoMore static_assert work. Check that the assert expr is valid and show an error if...
Anders Carlsson [Sat, 14 Mar 2009 00:25:26 +0000 (00:25 +0000)]
More static_assert work. Check that the assert expr is valid and show an error if it's false. Create the declaration and add it to the current context.

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

15 years agoCheck for overflow and signedness problems with template
Douglas Gregor [Sat, 14 Mar 2009 00:20:21 +0000 (00:20 +0000)]
Check for overflow and signedness problems with template
arguments. Eliminates a FIXME.

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

15 years agoMake Selector::getIdentifierInfo() private. I took a first attempt at this last
Ted Kremenek [Sat, 14 Mar 2009 00:20:08 +0000 (00:20 +0000)]
Make Selector::getIdentifierInfo() private. I took a first attempt at this last
week in:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090302/013580.html

That patch caused the output of the diagnostics to change. Since
'DeclarationName' can already reason about Selectors and the Diagnostics logic
reasons about DeclarationName, there is no additional code needed to get the
diagnostics working by making Selector::getIdentifierInfo() private.

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

15 years agoDon't run simplify lib calls with -ffreestanding (fix for already
Daniel Dunbar [Sat, 14 Mar 2009 00:15:04 +0000 (00:15 +0000)]
Don't run simplify lib calls with -ffreestanding (fix for already
failing test case).

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

15 years agoMake sure that the canonical representation of integral template arguments uses the...
Douglas Gregor [Sat, 14 Mar 2009 00:03:48 +0000 (00:03 +0000)]
Make sure that the canonical representation of integral template arguments uses the bitwidth and signedness of the template parameter

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

15 years agoImplement template instantiation for the prefix unary operators. As
Douglas Gregor [Fri, 13 Mar 2009 23:49:33 +0000 (23:49 +0000)]
Implement template instantiation for the prefix unary operators. As
always, refactored the existing logic to tease apart the parser action
and the semantic analysis shared by the parser and template
instantiation.

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

15 years agoDriver: Add types::{isAcceptedByClang,isCXX} predicates.
Daniel Dunbar [Fri, 13 Mar 2009 23:46:19 +0000 (23:46 +0000)]
Driver: Add types::{isAcceptedByClang,isCXX} predicates.

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

15 years agoDriver: Add simple Job classes, simple wrappers for information about
Daniel Dunbar [Fri, 13 Mar 2009 23:36:33 +0000 (23:36 +0000)]
Driver: Add simple Job classes, simple wrappers for information about
what processes to execute during a compilation.

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

15 years agoDo up codegen for function static data and externs in functions in block
Mike Stump [Fri, 13 Mar 2009 23:34:28 +0000 (23:34 +0000)]
Do up codegen for function static data and externs in functions in block
literals.

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

15 years agoPass more sane arguments to ActOnStaticAssertDeclaration
Anders Carlsson [Fri, 13 Mar 2009 23:29:20 +0000 (23:29 +0000)]
Pass more sane arguments to ActOnStaticAssertDeclaration

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

15 years agoDriver: Action vtables were still hungry.
Daniel Dunbar [Fri, 13 Mar 2009 23:17:57 +0000 (23:17 +0000)]
Driver: Action vtables were still hungry.

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

15 years agoBlockDecl::Destroy now deallocates BlockDecl's array of ParmVarDecl*.
Ted Kremenek [Fri, 13 Mar 2009 23:17:24 +0000 (23:17 +0000)]
BlockDecl::Destroy now deallocates BlockDecl's array of ParmVarDecl*.

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

15 years agoDriver: Provide food and shelter for Action vtables.
Daniel Dunbar [Fri, 13 Mar 2009 23:08:03 +0000 (23:08 +0000)]
Driver: Provide food and shelter for Action vtables.

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

15 years agoForce triple for a couple test cases.
Daniel Dunbar [Fri, 13 Mar 2009 22:48:51 +0000 (22:48 +0000)]
Force triple for a couple test cases.

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

15 years agowire up a new -fno-builtin option, make it control things like simplifylibcalls,
Chris Lattner [Fri, 13 Mar 2009 22:38:49 +0000 (22:38 +0000)]
wire up a new -fno-builtin option, make it control things like simplifylibcalls,
etc and make freestanding imply it.

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

15 years agoInclude component warning TableGen files in Diagnostic.td.
Ted Kremenek [Fri, 13 Mar 2009 22:19:07 +0000 (22:19 +0000)]
Include component warning TableGen files in Diagnostic.td.

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

15 years agoDriver: Sprinkle some consts in, stub out BuildJobs method.
Daniel Dunbar [Fri, 13 Mar 2009 22:12:33 +0000 (22:12 +0000)]
Driver: Sprinkle some consts in, stub out BuildJobs method.

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

15 years agoUpdate test.
Daniel Dunbar [Fri, 13 Mar 2009 22:11:42 +0000 (22:11 +0000)]
Update test.

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

15 years agoadd a testcase for recursion through blocks pointers, rdar://6676764.
Chris Lattner [Fri, 13 Mar 2009 22:00:25 +0000 (22:00 +0000)]
add a testcase for recursion through blocks pointers, rdar://6676764.

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

15 years agofix PR3798 by ignoring all diagnostics generated while repreprocessing a file in...
Chris Lattner [Fri, 13 Mar 2009 21:44:46 +0000 (21:44 +0000)]
fix PR3798 by ignoring all diagnostics generated while repreprocessing a file in rewrite macros.

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

15 years agomake Preprocessor::Diags be a pointer instead of a reference.
Chris Lattner [Fri, 13 Mar 2009 21:17:43 +0000 (21:17 +0000)]
make Preprocessor::Diags be a pointer instead of a reference.

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

15 years agouse accessor instead of poking ivar directly
Chris Lattner [Fri, 13 Mar 2009 21:17:23 +0000 (21:17 +0000)]
use accessor instead of poking ivar directly

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

15 years agoDevious test-case involved overload resolution and ADL during template instantiation.
Douglas Gregor [Fri, 13 Mar 2009 21:04:12 +0000 (21:04 +0000)]
Devious test-case involved overload resolution and ADL during template instantiation.

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

15 years agoDriver: Desensitize test to location of input.
Daniel Dunbar [Fri, 13 Mar 2009 21:03:35 +0000 (21:03 +0000)]
Driver: Desensitize test to location of input.

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

15 years agoImplement template instantiation for several more kinds of expressions:
Douglas Gregor [Fri, 13 Mar 2009 21:01:28 +0000 (21:01 +0000)]
Implement template instantiation for several more kinds of expressions:
  - C++ function casts, e.g., T(foo)
  - sizeof(), alignof()

More importantly, this allows us to verify that we're performing
overload resolution during template instantiation, with
argument-dependent lookup and the "cached" results of name lookup from
the template definition.

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

15 years agoFix typo.
Ted Kremenek [Fri, 13 Mar 2009 20:47:27 +0000 (20:47 +0000)]
Fix typo.

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

15 years agoAdd missing ';'.
Ted Kremenek [Fri, 13 Mar 2009 20:45:13 +0000 (20:45 +0000)]
Add missing ';'.

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

15 years agoDriver: Test pipelining for universal builds.
Daniel Dunbar [Fri, 13 Mar 2009 20:45:03 +0000 (20:45 +0000)]
Driver: Test pipelining for universal builds.

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

15 years agoFix a bug in building function pointer type
Fariborz Jahanian [Fri, 13 Mar 2009 20:36:41 +0000 (20:36 +0000)]
Fix a bug in building function pointer type
corresponding to block pointer.

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

15 years agoDriver: For universal builds, handle archs in the order they were seen.
Daniel Dunbar [Fri, 13 Mar 2009 20:33:35 +0000 (20:33 +0000)]
Driver: For universal builds, handle archs in the order they were seen.

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

15 years agoccc: Handle limited forms of -ccc-host-triple for testing
Daniel Dunbar [Fri, 13 Mar 2009 20:33:09 +0000 (20:33 +0000)]
ccc: Handle limited forms of -ccc-host-triple for testing
compatibility with C++ rewrite.

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

15 years agoFix PR 3677 [retain checker]: custom 'allocWithZone' methods should be allowed
Ted Kremenek [Fri, 13 Mar 2009 20:27:06 +0000 (20:27 +0000)]
Fix PR 3677 [retain checker]: custom 'allocWithZone' methods should be allowed
to return an owning pointer.

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

15 years agoRemove FIXME, issue has been resolved.
Mike Stump [Fri, 13 Mar 2009 19:38:54 +0000 (19:38 +0000)]
Remove FIXME, issue has been resolved.

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

15 years agoUpdate checker build.
Ted Kremenek [Fri, 13 Mar 2009 18:48:36 +0000 (18:48 +0000)]
Update checker build.

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

15 years agoRemove an already-fixed FIXME
Douglas Gregor [Fri, 13 Mar 2009 18:41:07 +0000 (18:41 +0000)]
Remove an already-fixed FIXME

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

15 years agoRefactor the way we handle operator overloading and template
Douglas Gregor [Fri, 13 Mar 2009 18:40:31 +0000 (18:40 +0000)]
Refactor the way we handle operator overloading and template
instantiation for binary operators. This change moves most of the
operator-overloading code from the parser action ActOnBinOp to a new,
parser-independent semantic checking routine CreateOverloadedBinOp.

Of particular importance is the fact that CreateOverloadedBinOp does
*not* perform any name lookup based on the current parsing context (it
doesn't take a Scope*), since it has to be usable during template
instantiation, when there is no scope information. Rather, it takes a
pre-computed set of functions that are visible from the context or via
argument-dependent lookup, and adds to that set any member operators
and built-in operator candidates. The set of functions is computed in
the parser action ActOnBinOp based on the current context (both
operator name lookup and argument-dependent lookup). Within a
template, the set computed by ActOnBinOp is saved within the
type-dependent AST node and is augmented with the results of
argument-dependent name lookup at instantiation time (see
TemplateExprInstantiator::VisitCXXOperatorCallExpr).

Sadly, we can't fully test this yet. I'll follow up with template
instantiation for sizeof so that the real fun can begin.

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

15 years agoccc/Driver: Forward -fheinous-gnu-extensions to clang.
Daniel Dunbar [Fri, 13 Mar 2009 18:12:01 +0000 (18:12 +0000)]
ccc/Driver: Forward -fheinous-gnu-extensions to clang.

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

15 years agoDriver: Fix '-x none' handling.
Daniel Dunbar [Fri, 13 Mar 2009 17:57:10 +0000 (17:57 +0000)]
Driver: Fix '-x none' handling.
 - Enough stuff works now we can test argument parsing & pipelining.

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

15 years agoccc/Driver: Normalize phase spelling in -ccc-print-phases.
Daniel Dunbar [Fri, 13 Mar 2009 17:52:07 +0000 (17:52 +0000)]
ccc/Driver: Normalize phase spelling in -ccc-print-phases.

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

15 years agoDriver: Some minor bug fixes.
Daniel Dunbar [Fri, 13 Mar 2009 17:46:02 +0000 (17:46 +0000)]
Driver: Some minor bug fixes.
 - language recognition was recognizing prefixes incorrectly.
 - -x none wasn't working.
 - test for "can lipo" was backwords.
 - missed a '"' in -ccc-print-phases

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

15 years agointroduce a new -fheinous-gnu-extensions flag that enables really
Chris Lattner [Fri, 13 Mar 2009 17:38:01 +0000 (17:38 +0000)]
introduce a new -fheinous-gnu-extensions flag that enables really
really horrible extensions that are disabled by default but that can
be accepted by -fheinous-gnu-extensions (but which always emit a
warning when enabled).

As our first instance of this, implement PR3788/PR3794, which allows
non-lvalues in inline asms in contexts where lvalues are required. bleh.

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

15 years agoadd a helper function to strip noop casts.
Chris Lattner [Fri, 13 Mar 2009 17:28:01 +0000 (17:28 +0000)]
add a helper function to strip noop casts.

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

15 years agoDriver: Fix think in ArgList::MakeIndex.
Daniel Dunbar [Fri, 13 Mar 2009 17:25:24 +0000 (17:25 +0000)]
Driver: Fix think in ArgList::MakeIndex.

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

15 years agoDriver: Return 0 from BuildCompilation on -ccc-print-phases,
Daniel Dunbar [Fri, 13 Mar 2009 17:24:34 +0000 (17:24 +0000)]
Driver: Return 0 from BuildCompilation on -ccc-print-phases,
-ccc-print-options.

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

15 years agoDriver: Print -ccc-print-phases on stderr.
Daniel Dunbar [Fri, 13 Mar 2009 17:20:20 +0000 (17:20 +0000)]
Driver: Print -ccc-print-phases on stderr.

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

15 years agoFix typo.
Ted Kremenek [Fri, 13 Mar 2009 17:02:59 +0000 (17:02 +0000)]
Fix typo.

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

15 years agoFix <rdar://problem/6675489> BlockDecl should not use llvm::smallvector.
Steve Naroff [Fri, 13 Mar 2009 16:56:44 +0000 (16:56 +0000)]
Fix <rdar://problem/6675489> BlockDecl should not use llvm::smallvector.

Also changed BlockDecl API to be more consistent (wrt FunctionDecl).

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

15 years agoAdd a hack in the analyzer to recover some path-sensitivity at branch
Ted Kremenek [Fri, 13 Mar 2009 16:32:54 +0000 (16:32 +0000)]
Add a hack in the analyzer to recover some path-sensitivity at branch
conditions. Currently the analyzer does not reason well about
promotions/truncations of symbolic values, so at branch conditions when we see:

  if (condition)

and condition is something like a 'short' or 'char', essentially ignore the
promotion to 'int' so that we track constraints on the original symbolic value.
We only ignore the casts if the underlying type has the same or fewer bits as
the converted type.

This fixes:

<rdar://problem/6619921>

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

15 years agoReimplement fix for <rdar://problem/6451399> problems with labels and blocks.
Steve Naroff [Fri, 13 Mar 2009 16:03:38 +0000 (16:03 +0000)]
Reimplement fix for <rdar://problem/6451399> problems with labels and blocks.

This solution is much simpler (and doesn't add any per-scope overhead, which concerned Chris).

The only downside is the LabelMap is now declared in two places (Sema and BlockSemaInfo). My original fix tried to unify the LabelMap in "Scope" (which would support nested functions in general). In any event, this fixes the bug given the current language definition. If/when we decide to support GCC style nested functions, this will need to be tweaked.

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

15 years agoUpdated comment.
Ted Kremenek [Fri, 13 Mar 2009 15:39:16 +0000 (15:39 +0000)]
Updated comment.

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

15 years agoRemove ActiveScope (revert http://llvm.org/viewvc/llvm-project?view=rev&revision...
Steve Naroff [Fri, 13 Mar 2009 15:38:40 +0000 (15:38 +0000)]
Remove ActiveScope (revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65694 and http://llvm.org/viewvc/llvm-project?view=rev&revision=66741).

Will replace with something better today...

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

15 years agoFix failure reported by Sebastian of test/Analysis/ptr-arith.c when the target
Ted Kremenek [Fri, 13 Mar 2009 15:35:24 +0000 (15:35 +0000)]
Fix failure reported by Sebastian of test/Analysis/ptr-arith.c when the target
is 64-bit. I used his suggestion of doing a direct bitwidth/signedness
conversion of the 'offset' instead of just changing the sign. For more
information, see:

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-March/004587.html

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

15 years agoSplit get_involved into Get Involved and Open Projects pages
Douglas Gregor [Fri, 13 Mar 2009 15:06:27 +0000 (15:06 +0000)]
Split get_involved into Get Involved and Open Projects pages

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

15 years agoDriver: Fix thinko in Darwin host identification.
Daniel Dunbar [Fri, 13 Mar 2009 12:23:29 +0000 (12:23 +0000)]
Driver: Fix thinko in Darwin host identification.

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