]> granicus.if.org Git - clang/log
clang
14 years agoAdd ccc-analyzer support for '-imacros'. Fixes PR 7204.
Ted Kremenek [Tue, 8 Jun 2010 18:27:55 +0000 (18:27 +0000)]
Add ccc-analyzer support for '-imacros'.  Fixes PR 7204.

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

14 years agoFixes a typo which prevented proper code gen. for
Fariborz Jahanian [Tue, 8 Jun 2010 17:52:11 +0000 (17:52 +0000)]
Fixes a typo which prevented proper code gen. for
copy-in of c++ class objects into blocks.

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

14 years agoImplement a warning when converting the literal 'false' to a
Douglas Gregor [Tue, 8 Jun 2010 17:35:15 +0000 (17:35 +0000)]
Implement a warning when converting the literal 'false' to a
pointer. Original patch by Troy D. Straszheim; fixes PR7283.

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

14 years agoWhen checking whether we can place a base subobject at an offset, we don't need to...
Anders Carlsson [Tue, 8 Jun 2010 16:20:35 +0000 (16:20 +0000)]
When checking whether we can place a base subobject at an offset, we don't need to go past the highest offset that's known to contain an empty base subobject.

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

14 years agoMinor cleanups to the empty subobject map.
Anders Carlsson [Tue, 8 Jun 2010 15:56:03 +0000 (15:56 +0000)]
Minor cleanups to the empty subobject map.

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

14 years agoUpdate LINK_COMPONENTS for examples.
Daniel Dunbar [Tue, 8 Jun 2010 15:38:01 +0000 (15:38 +0000)]
Update LINK_COMPONENTS for examples.

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

14 years agoCorrectly mangle static variables of anonymous struct/union type.
Anders Carlsson [Tue, 8 Jun 2010 14:49:03 +0000 (14:49 +0000)]
Correctly mangle static variables of anonymous struct/union type.

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

14 years agoToken is POD-like.
Benjamin Kramer [Tue, 8 Jun 2010 11:23:26 +0000 (11:23 +0000)]
Token is POD-like.

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

14 years agoAdd a checker check if a global variable holds a local variable's address after
Zhongxing Xu [Tue, 8 Jun 2010 10:00:00 +0000 (10:00 +0000)]
Add a checker check if a global variable holds a local variable's address after
the function call is left where the local variable is declared.

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

14 years agoFix NEON intrinsic argument passing, support vext. Most now successfully make it...
Nate Begeman [Tue, 8 Jun 2010 06:03:01 +0000 (06:03 +0000)]
Fix NEON intrinsic argument passing, support vext.  Most now successfully make it through codegen to the .s file

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

14 years agoImplement -fcaret-diagnostics to undo -fno-caret-diagnostics.
Jeffrey Yasskin [Tue, 8 Jun 2010 04:56:20 +0000 (04:56 +0000)]
Implement -fcaret-diagnostics to undo -fno-caret-diagnostics.

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

14 years agoAdd a test to the previous commit.
Rafael Espindola [Tue, 8 Jun 2010 03:59:28 +0000 (03:59 +0000)]
Add a test to the previous commit.

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

14 years agoFix what looks like a merge problem that broke __clear_cache.
Rafael Espindola [Tue, 8 Jun 2010 03:52:53 +0000 (03:52 +0000)]
Fix what looks like a merge problem that broke __clear_cache.

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

14 years agoAdd test for previous commit.
Rafael Espindola [Tue, 8 Jun 2010 03:29:31 +0000 (03:29 +0000)]
Add test for previous commit.

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

14 years agoSince the enum values for each arch's builtins overlap, it is not appropriate to...
Nate Begeman [Tue, 8 Jun 2010 02:47:44 +0000 (02:47 +0000)]
Since the enum values for each arch's builtins overlap, it is not appropriate to check them when compiling or other archs.  Fixes a problem where compiling for NEON would use x86 sema rules.

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

14 years agoFix passing and returning of objects with non trivial copy constructors on
Rafael Espindola [Tue, 8 Jun 2010 02:42:08 +0000 (02:42 +0000)]
Fix passing and returning of objects with non trivial copy constructors on
ARM.

Fixes PR7310.

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

14 years agoImplement ARM NEON up through vcvt, alphabetically.
Nate Begeman [Tue, 8 Jun 2010 00:17:19 +0000 (00:17 +0000)]
Implement ARM NEON up through vcvt, alphabetically.

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

14 years agoExtend __builtin_shufflevector to expose the full power of the llvm shufflevector...
Nate Begeman [Tue, 8 Jun 2010 00:16:34 +0000 (00:16 +0000)]
Extend __builtin_shufflevector to expose the full power of the llvm shufflevector instruction.  This means it can now be used for vector truncation and concatenation.  This will be used for the ARM NEON implementation.

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

14 years agoDriver: Support invoking Clang on .ll or .bc inputs.
Daniel Dunbar [Mon, 7 Jun 2010 23:28:45 +0000 (23:28 +0000)]
Driver: Support invoking Clang on .ll or .bc inputs.
 - We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').

It is now possible to do something like:
  $ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
  $ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
  $ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.

*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.

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

14 years agoFrontend: Add CodeGenAction support for handling LLVM IR.\r - This magically enables...
Daniel Dunbar [Mon, 7 Jun 2010 23:27:59 +0000 (23:27 +0000)]
Frontend: Add CodeGenAction support for handling LLVM IR.\r - This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality.\r\rFor example, 'llvm-as' is:\r  $ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc
and 'llvm-dis' is:\r  $ clang -cc1 -emit-llvm    FOO.bc -o -
and 'opt' is, e.g.:
  $ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll
and 'llc' is, e.g.:
  $ clang -cc1 -S -o - FOO.ll

The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options).

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

14 years agoFrontend: Add FrontendAction support for handling LLVM IR inputs.
Daniel Dunbar [Mon, 7 Jun 2010 23:26:47 +0000 (23:26 +0000)]
Frontend: Add FrontendAction support for handling LLVM IR inputs.
 - These inputs follow an abbreviated execution path, but are still worth handling by FrontendAction so they reuse all the other clang -cc1 features.

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

14 years agoFrontendAction: Track active file kind.
Daniel Dunbar [Mon, 7 Jun 2010 23:25:49 +0000 (23:25 +0000)]
FrontendAction: Track active file kind.

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

14 years agoFrontend: Rename hasASTSupport to hasASTFileSupport, which is more accurate.
Daniel Dunbar [Mon, 7 Jun 2010 23:24:43 +0000 (23:24 +0000)]
Frontend: Rename hasASTSupport to hasASTFileSupport, which is more accurate.

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

14 years agoFrontend: Move some initialization from CompilerInstance to FrontendAction, to parall...
Daniel Dunbar [Mon, 7 Jun 2010 23:23:50 +0000 (23:23 +0000)]
Frontend: Move some initialization from CompilerInstance to FrontendAction, to parallel what is done for AST inputs.

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

14 years agoFrontend: Change FrontendAction::BeginSourceFile to take the input kind instead of...
Daniel Dunbar [Mon, 7 Jun 2010 23:23:06 +0000 (23:23 +0000)]
Frontend: Change FrontendAction::BeginSourceFile to take the input kind instead of an IsAST bool.

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

14 years agoFrontend: Lift InputKind enumeration to top level.
Daniel Dunbar [Mon, 7 Jun 2010 23:22:09 +0000 (23:22 +0000)]
Frontend: Lift InputKind enumeration to top level.

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

14 years agoFrontend: Drop unnecessary TargetData argument to EmitBackendOutput, we always
Daniel Dunbar [Mon, 7 Jun 2010 23:21:04 +0000 (23:21 +0000)]
Frontend: Drop unnecessary TargetData argument to EmitBackendOutput, we always
create modules which have target data strings.

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

14 years agoFrontend: Factor clang::EmitBackendOutput out of CodeGenAction.
Daniel Dunbar [Mon, 7 Jun 2010 23:20:08 +0000 (23:20 +0000)]
Frontend: Factor clang::EmitBackendOutput out of CodeGenAction.

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

14 years agoFrontend: Add CodeGenOptions::SimplifyLibCalls, and eliminate LangOptions argument...
Daniel Dunbar [Mon, 7 Jun 2010 23:19:17 +0000 (23:19 +0000)]
Frontend: Add CodeGenOptions::SimplifyLibCalls, and eliminate LangOptions argument to BackendConsumer.

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

14 years agoWhen using property-dot assignment syntax to call a setter method,
Fariborz Jahanian [Mon, 7 Jun 2010 22:02:01 +0000 (22:02 +0000)]
When using property-dot assignment syntax to call a setter method,
type of rhs need be compared to setter's argument and
not the getter type. Fixes radar 8062778

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

14 years agoFixed a block regression caused by trying to use
Fariborz Jahanian [Mon, 7 Jun 2010 19:39:39 +0000 (19:39 +0000)]
Fixed a block regression caused by trying to use
an existing ir for load of a bock variable. This cannot be
done across basic blocks.
Fixes radar 8064140.

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

14 years agoCatch free()s on non-regions and regions known to be not from malloc(), by checking...
Jordy Rose [Mon, 7 Jun 2010 19:32:37 +0000 (19:32 +0000)]
Catch free()s on non-regions and regions known to be not from malloc(), by checking the symbol type and memory space.

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

14 years agoImplement __clear_cache on ARM.
Rafael Espindola [Mon, 7 Jun 2010 17:26:50 +0000 (17:26 +0000)]
Implement __clear_cache on ARM.

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

14 years agoUse MaybeCreateCXXExprWithTemporaries for potential destruction of
Fariborz Jahanian [Mon, 7 Jun 2010 16:14:00 +0000 (16:14 +0000)]
Use MaybeCreateCXXExprWithTemporaries for potential destruction of
created temporary. Use own initialized entity for copied in block
variables.

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

14 years agoweekend checkpoint of arm neon builtins codegen.
Nate Begeman [Mon, 7 Jun 2010 16:01:56 +0000 (16:01 +0000)]
weekend checkpoint of arm neon builtins codegen.
TODO: add remainder of builtins to CGBuiltin, add code to SemaChecking to validate constants.

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

14 years agoPR7245: Make binding a reference to a temporary without a usable copy
Jeffrey Yasskin [Mon, 7 Jun 2010 15:58:05 +0000 (15:58 +0000)]
PR7245: Make binding a reference to a temporary without a usable copy
constructor into an extension warning into the error that C++98 requires.

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

14 years agoSimplify the methods for creating a pointer, reference, member-pointer,
John McCall [Sat, 5 Jun 2010 06:41:15 +0000 (06:41 +0000)]
Simplify the methods for creating a pointer, reference, member-pointer,
or block-pointer type by removing the qualifiers parameter.  Introduce a
method to perform semantic checking when adding qualifiers to a type.

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

14 years agoAdded AccessSpecDecl node.
Abramo Bagnara [Sat, 5 Jun 2010 05:09:32 +0000 (05:09 +0000)]
Added AccessSpecDecl node.

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

14 years agoAdd an extension to avoid an error when a global template has the same name as
Jeffrey Yasskin [Sat, 5 Jun 2010 01:39:57 +0000 (01:39 +0000)]
Add an extension to avoid an error when a global template has the same name as
a member template, and you try to call the member template with an explicit
template argument.  See PR7247

For example, this downgrades the error to a warning in:

template<typename T> struct set{};
struct Value {
    template<typename T>
    void set(T value) {
    }
};
void foo() {
    Value v;
    v.set<double>(3.2);  // Warning here.
}

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

14 years agoPreserve type info for local variables in optimized builds.
Devang Patel [Sat, 5 Jun 2010 01:14:40 +0000 (01:14 +0000)]
Preserve type info for local variables in optimized builds.
llvm-gcc enabled this couple of weeks ago.

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

14 years agoAlter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.
John McCall [Fri, 4 Jun 2010 23:28:52 +0000 (23:28 +0000)]
Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.
This is never null, but the associated type might be.

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

14 years agoCorrectly align large arrays in x86-64. This fixes PR5599.
Rafael Espindola [Fri, 4 Jun 2010 23:15:27 +0000 (23:15 +0000)]
Correctly align large arrays in x86-64. This fixes PR5599.

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

14 years agoWhen deciding whether reinterpret_cast casts away constness we need to look at array...
Anders Carlsson [Fri, 4 Jun 2010 22:47:55 +0000 (22:47 +0000)]
When deciding whether reinterpret_cast casts away constness we need to look at array qualifiers. Fixes rdar://problem/8018292.

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

14 years agoAdd indexing support for the block and @property type location information
John McCall [Fri, 4 Jun 2010 22:33:30 +0000 (22:33 +0000)]
Add indexing support for the block and @property type location information
I just implemented.

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

14 years agoInitial support for ARM NEON builtins, codegen up next
Nate Begeman [Fri, 4 Jun 2010 21:36:27 +0000 (21:36 +0000)]
Initial support for ARM NEON builtins, codegen up next

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

14 years agoBuild AST for copy-construction of copied-in
Fariborz Jahanian [Fri, 4 Jun 2010 21:35:44 +0000 (21:35 +0000)]
Build AST for copy-construction of copied-in
class object in blocks and carry it to IRGen.

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

14 years agoRemember type source information for Objective C property declarations.
John McCall [Fri, 4 Jun 2010 20:50:08 +0000 (20:50 +0000)]
Remember type source information for Objective C property declarations.

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

14 years agoAdded a field to BlockDeclRefExpr for future use.
Fariborz Jahanian [Fri, 4 Jun 2010 19:06:53 +0000 (19:06 +0000)]
Added a field to BlockDeclRefExpr for future use.
No functionality change yet.

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

14 years agoPreserve more information from a block's original function declarator, if one
John McCall [Fri, 4 Jun 2010 19:02:56 +0000 (19:02 +0000)]
Preserve more information from a block's original function declarator, if one
was given.  Remove some unnecessary accounting from BlockScopeInfo.  Handle
typedef'ed function types until such time as we decide not.

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

14 years agoDriver: Change -dwarf-debug-flags option to pass the original command line
Daniel Dunbar [Fri, 4 Jun 2010 18:47:06 +0000 (18:47 +0000)]
Driver: Change -dwarf-debug-flags option to pass the original command line
arguments after translation, instead of the -cc1 level arguments.

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

14 years agoDriver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
Daniel Dunbar [Fri, 4 Jun 2010 18:28:41 +0000 (18:28 +0000)]
Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
added as the last output step, instead of just hacking it into the link step.
 - Among other things, this fixes dSYM generation when using multiple -arch options.

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

14 years agoDriver: Add an explicit dsymutil action.
Daniel Dunbar [Fri, 4 Jun 2010 18:28:36 +0000 (18:28 +0000)]
Driver: Add an explicit dsymutil action.

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

14 years agoFor C++ copied in objects, use copy constructors in
Fariborz Jahanian [Fri, 4 Jun 2010 16:10:00 +0000 (16:10 +0000)]
For C++ copied in objects, use copy constructors in
setting up block's descriptor. This is on going work to
support c++ specific issues in setting up blocks
various APIs.

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

14 years agoAdd ARM paths for debian. Not enough to bootstrap on a beagle board, but
Rafael Espindola [Fri, 4 Jun 2010 14:28:10 +0000 (14:28 +0000)]
Add ARM paths for debian. Not enough to bootstrap on a beagle board, but
moves us further.

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

14 years agoRestructure how we interpret block-literal declarators. Correctly handle
John McCall [Fri, 4 Jun 2010 11:21:44 +0000 (11:21 +0000)]
Restructure how we interpret block-literal declarators.  Correctly handle
the case where we pick up block arguments from a typedef.  Save the block
signature as it was written, and preserve same through PCH.

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

14 years agoDon't insert in lexical context implicit definitions of static member instances.
Abramo Bagnara [Fri, 4 Jun 2010 09:35:39 +0000 (09:35 +0000)]
Don't insert in lexical context implicit definitions of static member instances.

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

14 years agoWhen checking for equality of template parameter lists, a template
Douglas Gregor [Fri, 4 Jun 2010 08:34:32 +0000 (08:34 +0000)]
When checking for equality of template parameter lists, a template
type parameter pack is distinct from a template type parameter.

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

14 years agoDelay checking for mutable const fields until we're checking the field.
John McCall [Fri, 4 Jun 2010 08:34:12 +0000 (08:34 +0000)]
Delay checking for mutable const fields until we're checking the field.
Allows this check to work properly for instantiated fields and removes
an unnecessary GetTypeForDeclarator call.

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

14 years agoProperly disambiguate between an elaborated-type-specifier and a
Douglas Gregor [Fri, 4 Jun 2010 07:30:15 +0000 (07:30 +0000)]
Properly disambiguate between an elaborated-type-specifier and a
type-parameter within a template parameter list. Found by inspection.

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

14 years agoMore refactoring.
John McCall [Fri, 4 Jun 2010 02:29:22 +0000 (02:29 +0000)]
More refactoring.

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

14 years agoAdd a short circuit in isVirtuallyDerivedFrom.
Anders Carlsson [Fri, 4 Jun 2010 01:40:08 +0000 (01:40 +0000)]
Add a short circuit in isVirtuallyDerivedFrom.

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

14 years agoAssignments to reference variables shouldn't kill the variable.
Jordy Rose [Fri, 4 Jun 2010 01:14:56 +0000 (01:14 +0000)]
Assignments to reference variables shouldn't kill the variable.

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

14 years agoFixed Objective-C type encoding for bitfields for the GNU runtime to match the encodi...
David Chisnall [Fri, 4 Jun 2010 01:10:52 +0000 (01:10 +0000)]
Fixed Objective-C type encoding for bitfields for the GNU runtime to match the encoding used by GCC.

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

14 years agoRemove now unused code.
Anders Carlsson [Fri, 4 Jun 2010 00:59:37 +0000 (00:59 +0000)]
Remove now unused code.

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

14 years agoUse CXXRecordDecl::getFinalOverriders to get final overriders. This speeds up vtable...
Anders Carlsson [Fri, 4 Jun 2010 00:54:04 +0000 (00:54 +0000)]
Use CXXRecordDecl::getFinalOverriders to get final overriders. This speeds up vtable layout by moving away from the old final overrider computation code that had O(N^2) complexity in some cases.

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

14 years agoRemove a couple of unnecessary uses of IsStandardConversion.
John McCall [Fri, 4 Jun 2010 00:29:51 +0000 (00:29 +0000)]
Remove a couple of unnecessary uses of IsStandardConversion.

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

14 years agoCheck the output of this test.
Eli Friedman [Thu, 3 Jun 2010 23:34:11 +0000 (23:34 +0000)]
Check the output of this test.

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

14 years agoThink through my commit this time.
Eli Friedman [Thu, 3 Jun 2010 23:31:53 +0000 (23:31 +0000)]
Think through my commit this time.

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

14 years agoMake sure this test doesn't break when we disallow throwing an exception
Eli Friedman [Thu, 3 Jun 2010 23:22:25 +0000 (23:22 +0000)]
Make sure this test doesn't break when we disallow throwing an exception
in -fno-exceptions mode.

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

14 years agoRemoving commit access test file.
Tom Care [Thu, 3 Jun 2010 22:31:09 +0000 (22:31 +0000)]
Removing commit access test file.

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

14 years agoTesting commit access.
Tom Care [Thu, 3 Jun 2010 22:30:22 +0000 (22:30 +0000)]
Testing commit access.

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

14 years agoClassify NEON intrinsics by overloading-type for codegen
Nate Begeman [Thu, 3 Jun 2010 21:36:23 +0000 (21:36 +0000)]
Classify NEON intrinsics by overloading-type for codegen
Add a few missing instructions

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

14 years agoMake sure to check the accessibility of and mark the destructor for the
Eli Friedman [Thu, 3 Jun 2010 20:39:03 +0000 (20:39 +0000)]
Make sure to check the accessibility of and mark the destructor for the
operand of a throw expression.  Fixes PR7281.

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

14 years agoDon't intentionally try to ignore the value of a scalar expression when we
Eli Friedman [Thu, 3 Jun 2010 19:58:07 +0000 (19:58 +0000)]
Don't intentionally try to ignore the value of a scalar expression when we
actually care about it. Fixes PR7291.

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

14 years agoHack in some really terrible C++ record PCH support that I need right now.
John McCall [Thu, 3 Jun 2010 19:28:45 +0000 (19:28 +0000)]
Hack in some really terrible C++ record PCH support that I need right now.
This is required in order to test:

The ASTImporter should set base classes after formally entering the definition.

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

14 years agoReturn a proper null CXSourceLocation from clang_getLocation() when the SourceLocatio...
Ted Kremenek [Thu, 3 Jun 2010 15:52:32 +0000 (15:52 +0000)]
Return a proper null CXSourceLocation from clang_getLocation() when the SourceLocation is invalid.  Fixes <rdar://problem/8056640>.

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

14 years agoDon't try to explicitly zero out bit-fields.
Anders Carlsson [Thu, 3 Jun 2010 15:36:07 +0000 (15:36 +0000)]
Don't try to explicitly zero out bit-fields.

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

14 years agoTest commit: fix method summary comment
Jordy Rose [Thu, 3 Jun 2010 06:52:32 +0000 (06:52 +0000)]
Test commit: fix method summary comment

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

14 years agoMake addStmt always add stmt. Delegate other cases to Visit() directly.
Zhongxing Xu [Thu, 3 Jun 2010 06:43:23 +0000 (06:43 +0000)]
Make addStmt always add stmt. Delegate other cases to Visit() directly.

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

14 years agoCFG: add all LHS of assingments as lvalue. This improves support for C++ reference...
Zhongxing Xu [Thu, 3 Jun 2010 06:23:18 +0000 (06:23 +0000)]
CFG: add all LHS of assingments as lvalue. This improves support for C++ reference. Patch by Jordy.

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

14 years agoAdd comments.
Zhongxing Xu [Thu, 3 Jun 2010 06:19:01 +0000 (06:19 +0000)]
Add comments.

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

14 years agoAdd all final overriders to the map.
Anders Carlsson [Thu, 3 Jun 2010 01:00:02 +0000 (01:00 +0000)]
Add all final overriders to the map.

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

14 years agoThere is no dcl.init.ref p16. This test deals with p5.
Jeffrey Yasskin [Wed, 2 Jun 2010 22:01:22 +0000 (22:01 +0000)]
There is no dcl.init.ref p16. This test deals with p5.

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

14 years agoBlock C++ code gen. Adds support for block reference argument
Fariborz Jahanian [Wed, 2 Jun 2010 21:35:17 +0000 (21:35 +0000)]
Block C++ code gen. Adds support for block reference argument
types. Executable test will be added to LLVM test suite.
(radar 8041962).

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

14 years agoDon't try to emit the vtable for a class just because we're emitting a
John McCall [Wed, 2 Jun 2010 21:22:02 +0000 (21:22 +0000)]
Don't try to emit the vtable for a class just because we're emitting a
virtual function from it.

Fixes PR7241.

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

14 years agoHeaders: Fix quoting of macro arguments in a couple more places.
Daniel Dunbar [Wed, 2 Jun 2010 16:35:01 +0000 (16:35 +0000)]
Headers: Fix quoting of macro arguments in a couple more places.

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

14 years agoDon't substitute 'St' for 'std' when the namespace is nested inside another namespace.
Anders Carlsson [Wed, 2 Jun 2010 15:58:27 +0000 (15:58 +0000)]
Don't substitute 'St' for 'std' when the namespace is nested inside another namespace.

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

14 years agoFix undefined behavior, noticed by GCC 4.5. Patch by Dimitry Andric!
Daniel Dunbar [Wed, 2 Jun 2010 15:47:10 +0000 (15:47 +0000)]
Fix undefined behavior, noticed by GCC 4.5. Patch by Dimitry Andric!

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

14 years agoFix compiler warning about to false -> pointer conversion; patch by Dimitry Andric!
Daniel Dunbar [Wed, 2 Jun 2010 15:47:03 +0000 (15:47 +0000)]
Fix compiler warning about to false -> pointer conversion; patch by Dimitry Andric!

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

14 years agoFix unintentional method call due to false -> pointer conversion; patch by Dimitry...
Daniel Dunbar [Wed, 2 Jun 2010 15:46:52 +0000 (15:46 +0000)]
Fix unintentional method call due to false -> pointer conversion; patch by Dimitry Andric!

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

14 years agoWhen building RTTI descriptors for pointer types, we need to get the unqualified...
Anders Carlsson [Wed, 2 Jun 2010 15:44:35 +0000 (15:44 +0000)]
When building RTTI descriptors for pointer types, we need to get the unqualified array type and the qualifiers from it.

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

14 years agoFix vget_lane/vset_lane
Nate Begeman [Wed, 2 Jun 2010 07:15:01 +0000 (07:15 +0000)]
Fix vget_lane/vset_lane

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

14 years agotypeid() produces type information for the cv-unqualified version of
Douglas Gregor [Wed, 2 Jun 2010 06:16:02 +0000 (06:16 +0000)]
typeid() produces type information for the cv-unqualified version of
the type. Thanks to Anders for the bug report!

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

14 years agoclang++ is now a different greek letter.
Chris Lattner [Wed, 2 Jun 2010 05:27:21 +0000 (05:27 +0000)]
clang++ is now a different greek letter.

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

14 years agoCorrectly mangle unsigned integer literals where the high bit is set.
Anders Carlsson [Wed, 2 Jun 2010 05:07:26 +0000 (05:07 +0000)]
Correctly mangle unsigned integer literals where the high bit is set.

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

14 years agoCorrectly mangle variadic functions that don't have any other parameters.
Anders Carlsson [Wed, 2 Jun 2010 04:40:13 +0000 (04:40 +0000)]
Correctly mangle variadic functions that don't have any other parameters.

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

14 years agoWhen mangling member function pointers, fake adding a substitution corresponding...
Anders Carlsson [Wed, 2 Jun 2010 04:29:50 +0000 (04:29 +0000)]
When mangling member function pointers, fake adding a substitution corresponding to the function type.

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

14 years agoAdd a compatibility note about incomplete types in templates.
John McCall [Wed, 2 Jun 2010 01:26:32 +0000 (01:26 +0000)]
Add a compatibility note about incomplete types in templates.

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

14 years agoCheckpoint arm_neon.h generation with tablegen
Nate Begeman [Wed, 2 Jun 2010 00:34:41 +0000 (00:34 +0000)]
Checkpoint arm_neon.h generation with tablegen

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

14 years agoMore cleanup.
Anders Carlsson [Tue, 1 Jun 2010 23:52:26 +0000 (23:52 +0000)]
More cleanup.

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