]> granicus.if.org Git - clang/log
clang
14 years agoMove some of SemaOverload's API to various places in Overload.h, and kill
John McCall [Tue, 24 Aug 2010 20:38:10 +0000 (20:38 +0000)]
Move some of SemaOverload's API to various places in Overload.h, and kill
some of it off completely.

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

14 years agoImplement preprocessor code completion where a macro name is expected,
Douglas Gregor [Tue, 24 Aug 2010 20:21:13 +0000 (20:21 +0000)]
Implement preprocessor code completion where a macro name is expected,
e.g., after #ifdef/#ifndef or #undef, or inside a defined <macroname>
expression in a preprocessor conditional.

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

14 years agoIntroduce basic code-completion support for preprocessor directives,
Douglas Gregor [Tue, 24 Aug 2010 19:08:16 +0000 (19:08 +0000)]
Introduce basic code-completion support for preprocessor directives,
e.g., after a "#" we'll suggest #if, #ifdef, etc.

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

14 years agoFix a bug in nonfragile-abi2 when attempting to diagnose
Fariborz Jahanian [Tue, 24 Aug 2010 18:48:05 +0000 (18:48 +0000)]
Fix a bug in nonfragile-abi2 when attempting to diagnose
previous use of a synthesized 'ivar' with property of same name
declared as @dynamic. In this case, 'ivar' is in the
inherited class and no diagnostics should be issued.

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

14 years agoFix enum size and align. Tested by setvar.exp in gdb testsuite.
Devang Patel [Tue, 24 Aug 2010 18:14:06 +0000 (18:14 +0000)]
Fix enum size and align. Tested by setvar.exp in gdb testsuite.

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

14 years agoDocument '__clang_analyzer__'.
Ted Kremenek [Tue, 24 Aug 2010 18:12:35 +0000 (18:12 +0000)]
Document '__clang_analyzer__'.

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

14 years agoDebug Info: Put full Clang version into the debug info, to make it easier to
Daniel Dunbar [Tue, 24 Aug 2010 17:41:09 +0000 (17:41 +0000)]
Debug Info: Put full Clang version into the debug info, to make it easier to
identify what version of the compiler was used to build something.

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

14 years agoSema doesn't need these STL headers.
John McCall [Tue, 24 Aug 2010 17:40:45 +0000 (17:40 +0000)]
Sema doesn't need these STL headers.

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

14 years agoDriver/Clang: Forward -Wa, and -Xassembler to clang -cc1 when using the
Daniel Dunbar [Tue, 24 Aug 2010 16:47:49 +0000 (16:47 +0000)]
Driver/Clang: Forward -Wa, and -Xassembler to clang -cc1 when using the
integrated assembler. For now this mostly just means that we will error out if
someone tries to use this mechanism to send an argument to the assembler.

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

14 years agoWhen providing completions for a function or method argument that
Douglas Gregor [Tue, 24 Aug 2010 16:15:59 +0000 (16:15 +0000)]
When providing completions for a function or method argument that
corresponds to a block pointer, provide the skeleton of a block
literal.

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

14 years agoTeach InheritingConcreteTypeLoc to play nicely with dyn_cast.
Douglas Gregor [Tue, 24 Aug 2010 15:53:44 +0000 (15:53 +0000)]
Teach InheritingConcreteTypeLoc to play nicely with dyn_cast.

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

14 years agoParse all kinds of declarations as part of a linkage-specification,
Douglas Gregor [Tue, 24 Aug 2010 14:14:45 +0000 (14:14 +0000)]
Parse all kinds of declarations as part of a linkage-specification,
from Francois Pichet! Fixes PR7754.

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

14 years agoIt turns out that this template is only instantiated at one type.
John McCall [Tue, 24 Aug 2010 09:05:15 +0000 (09:05 +0000)]
It turns out that this template is only instantiated at one type.

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

14 years agoMore header elimination. The goal of all this is to allow Parser to
John McCall [Tue, 24 Aug 2010 08:50:51 +0000 (08:50 +0000)]
More header elimination.  The goal of all this is to allow Parser to
#include Sema.h while keeping all the AST declarations opaque.  That may
not be reasonably attainable, though.

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

14 years agoRemove a header dependency from Sema.h at the cost of some type safety.
John McCall [Tue, 24 Aug 2010 07:32:53 +0000 (07:32 +0000)]
Remove a header dependency from Sema.h at the cost of some type safety.
If someone wants to fix this some other way....

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

14 years agoStruggle mightily against header inclusion in Sema.h.
John McCall [Tue, 24 Aug 2010 07:21:54 +0000 (07:21 +0000)]
Struggle mightily against header inclusion in Sema.h.

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

14 years agoOwningExprResult -> ExprResult. This patch brought to you by
John McCall [Tue, 24 Aug 2010 06:29:42 +0000 (06:29 +0000)]
OwningExprResult -> ExprResult.  This patch brought to you by
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result

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

14 years agoFold ASTOwningResult back into ActionResult.
John McCall [Tue, 24 Aug 2010 06:09:16 +0000 (06:09 +0000)]
Fold ASTOwningResult back into ActionResult.

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

14 years agoAbstract out passing around types and kill off ActionBase.
John McCall [Tue, 24 Aug 2010 05:47:05 +0000 (05:47 +0000)]
Abstract out passing around types and kill off ActionBase.

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

14 years agoDiagnose the presence of multiple initializations of static data
Douglas Gregor [Tue, 24 Aug 2010 05:27:49 +0000 (05:27 +0000)]
Diagnose the presence of multiple initializations of static data
members, from Faisal Vali! Fixes PR6904.

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

14 years agoPR7971: Compute the correct type for an address-of expression containing an
Eli Friedman [Tue, 24 Aug 2010 05:23:20 +0000 (05:23 +0000)]
PR7971: Compute the correct type for an address-of expression containing an
UnresolvedMemberExpr.

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

14 years agoState explicitly that we are intentionally not providing macro completions for declar...
Douglas Gregor [Tue, 24 Aug 2010 04:59:56 +0000 (04:59 +0000)]
State explicitly that we are intentionally not providing macro completions for declarator name completions

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

14 years agoImprove comments.
Zhongxing Xu [Tue, 24 Aug 2010 04:26:55 +0000 (04:26 +0000)]
Improve comments.

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

14 years agoConsistently switch on PCC_Type
Douglas Gregor [Tue, 24 Aug 2010 01:11:00 +0000 (01:11 +0000)]
Consistently switch on PCC_Type

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

14 years agoProvide code completion results for the context-sensitive Objective-C
Douglas Gregor [Tue, 24 Aug 2010 01:06:58 +0000 (01:06 +0000)]
Provide code completion results for the context-sensitive Objective-C
keywords "in", "out", "inout", "byref", "bycopy", and "oneway".

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

14 years agoAdd testcase for C++ chained PCH and fix the bugs it uncovered in name lookup.
Sebastian Redl [Tue, 24 Aug 2010 00:50:16 +0000 (00:50 +0000)]
Add testcase for C++ chained PCH and fix the bugs it uncovered in name lookup.

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

14 years agoWrite visible update blocks. No regressions in normal PCH functionality, but no tests...
Sebastian Redl [Tue, 24 Aug 2010 00:50:09 +0000 (00:50 +0000)]
Write visible update blocks. No regressions in normal PCH functionality, but no tests for the chain yet.

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

14 years agoRead the UPDATE_VISIBLE record, and add its visible decls to the lookup tables. Also...
Sebastian Redl [Tue, 24 Aug 2010 00:50:04 +0000 (00:50 +0000)]
Read the UPDATE_VISIBLE record, and add its visible decls to the lookup tables. Also, free the lookup tables when destructing the ASTReader.

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

14 years agoCorrectly initialize the visible decls pointer if there are no visible decls for...
Sebastian Redl [Tue, 24 Aug 2010 00:50:00 +0000 (00:50 +0000)]
Correctly initialize the visible decls pointer if there are no visible decls for a record.

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

14 years agoBaby step towards supporting namespaces in chained PCH.
Sebastian Redl [Tue, 24 Aug 2010 00:49:55 +0000 (00:49 +0000)]
Baby step towards supporting namespaces in chained PCH.

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

14 years agoSilence warning about C++-style comments.
Peter Collingbourne [Tue, 24 Aug 2010 00:31:37 +0000 (00:31 +0000)]
Silence warning about C++-style comments.

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

14 years agoAdd Serialization dependency to clang-interpreter
Peter Collingbourne [Tue, 24 Aug 2010 00:31:31 +0000 (00:31 +0000)]
Add Serialization dependency to clang-interpreter

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

14 years agoMove ExecuteCompilerInvocation to a new library FrontendTool
Peter Collingbourne [Tue, 24 Aug 2010 00:31:22 +0000 (00:31 +0000)]
Move ExecuteCompilerInvocation to a new library FrontendTool

r110903 introduced a dependency from Frontend to every library that
declared an Action by introducing Action references that previously
resided in the driver in the file ExecuteCompilerInvocation.cpp.
This patch moves ExecuteCompilerInvocation to a new library named
FrontendTool which is intended to bear these dependencies.

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

14 years agoWhen calling a function or messaging a method marked "sentinel", add
Douglas Gregor [Mon, 23 Aug 2010 23:51:41 +0000 (23:51 +0000)]
When calling a function or messaging a method marked "sentinel", add
the ", nil", ", NULL", or ", (void*)0" to the end of the code
completion, since it always has to be there anyway.

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

14 years agofix PR7953 - Windows filename are case insensitive:
Chris Lattner [Mon, 23 Aug 2010 23:50:42 +0000 (23:50 +0000)]
fix PR7953 - Windows filename are case insensitive:

#pragma once wasn't working on win32 if the header file was included
using a different case.
I tracked down  the problem to the fact that clang::FileManager was
caching files using case sensitive string (UniqueFiles) on Windows.

I changed FileManager to cache filename in lower case only.
Doesn't affect UNIX because UNIX uses Inode to uniquely identify files.

unix doesn't use this codepath.

Analysis and patch by Francois Pichet!

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

14 years agoDon't call this field 'Expr', it changes lookup in illegal ways that
John McCall [Mon, 23 Aug 2010 23:46:51 +0000 (23:46 +0000)]
Don't call this field 'Expr', it changes lookup in illegal ways that
GCC diagnoses.

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

14 years agoKill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).
John McCall [Mon, 23 Aug 2010 23:25:46 +0000 (23:25 +0000)]
Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).

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

14 years agoIntroduce new libclang API functions that determine the availability
Douglas Gregor [Mon, 23 Aug 2010 23:00:57 +0000 (23:00 +0000)]
Introduce new libclang API functions that determine the availability
of a cursor or code-completion result, e.g., whether that result
refers to an unavailable, deleted, or deprecated declaration.

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

14 years agoHandling remaining rule for synthesize bitfields in
Fariborz Jahanian [Mon, 23 Aug 2010 22:46:52 +0000 (22:46 +0000)]
Handling remaining rule for synthesize bitfields in
class extensions (nonfragile-abi2).For every class @interface and class
extension @interface, if the last ivar is a bitfield of any type,
then add an implicit `char :0` ivar to the end of that interface.

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

14 years agoDriver: Move Clang "triple" computation routines to method on the
Daniel Dunbar [Mon, 23 Aug 2010 22:35:37 +0000 (22:35 +0000)]
Driver: Move Clang "triple" computation routines to method on the
ToolChain. This fixes a potenial bad cast when running Clang on PPC code, since
the tool chain in effect is not a subclass of the Darwin one, but we were
treating it like it was.
 - This introduces some gross code duplication, but the right fix for it is to
   just move the Driver to start depending on the targets in libBasic, so I am
   not planning on fixing it immediately.

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

14 years agolibclang: Print more information when recovering from crashes in
Daniel Dunbar [Mon, 23 Aug 2010 22:35:34 +0000 (22:35 +0000)]
libclang: Print more information when recovering from crashes in
clang_parseTranslationUnit.

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

14 years agoEmit debug info for enum constants.
Devang Patel [Mon, 23 Aug 2010 22:07:25 +0000 (22:07 +0000)]
Emit debug info for enum constants.

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

14 years agoInclude __FUNCTION__, __PRETTY_FUNCTION_, __func__ in code-completion
Douglas Gregor [Mon, 23 Aug 2010 21:54:33 +0000 (21:54 +0000)]
Include __FUNCTION__, __PRETTY_FUNCTION_, __func__ in code-completion
results for expression contexts within a function.

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

14 years agoIntroduce a code-completion hook for the Objective-C collection
Douglas Gregor [Mon, 23 Aug 2010 21:17:50 +0000 (21:17 +0000)]
Introduce a code-completion hook for the Objective-C collection
argument in a for-each statement (e.g., "for (id x in <blah>)"), which
restricts the expression completions provided to Objective-C types (or
class types in C++).

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

14 years agoReinstate the code for emitting an initial debug type for a struct,
Dan Gohman [Mon, 23 Aug 2010 21:15:56 +0000 (21:15 +0000)]
Reinstate the code for emitting an initial debug type for a struct,
to handle the case where the struct is only forward-declared. In
this case, a temporary MDNode is not needed and not desired.

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

14 years agoDriver/Darwin: Switch to using simplified tool chain by default -- what better
Daniel Dunbar [Mon, 23 Aug 2010 20:58:55 +0000 (20:58 +0000)]
Driver/Darwin: Switch to using simplified tool chain by default -- what better
way to see what will break! :)

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

14 years agoDriver/Darwin: When using the simplified Clang toolchain, make sure to also pass
Daniel Dunbar [Mon, 23 Aug 2010 20:58:52 +0000 (20:58 +0000)]
Driver/Darwin: When using the simplified Clang toolchain, make sure to also pass
the arch specific gcc lib path.

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

14 years agoDriver: Update -ccc-install-dir to also set the installed dir. Totally
Daniel Dunbar [Mon, 23 Aug 2010 20:58:50 +0000 (20:58 +0000)]
Driver: Update -ccc-install-dir to also set the installed dir. Totally
non-obvious.

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

14 years agoModified pseudoconstant test case to make it a bit clearer and fix a missing line
Tom Care [Mon, 23 Aug 2010 19:57:25 +0000 (19:57 +0000)]
Modified pseudoconstant test case to make it a bit clearer and fix a missing line

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

14 years agoSeveral small changes to PseudoConstantAnalysis and the way IdempotentOperationChecke...
Tom Care [Mon, 23 Aug 2010 19:51:57 +0000 (19:51 +0000)]
Several small changes to PseudoConstantAnalysis and the way IdempotentOperationChecker uses it.
- Psuedo -> Pseudo (doh...)
- C++ reference support
- Added pseudoconstant test case for __block vars
- Separated out static local checking from pseudoconstant analysis and generalized to non-local checking
- Added missing test cases for storage false positives

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

14 years agoDon't include macro results when we're completing a declarator.
Douglas Gregor [Mon, 23 Aug 2010 19:33:40 +0000 (19:33 +0000)]
Don't include macro results when we're completing a declarator.

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

14 years agoSupport for IRGen of synthesize bitfield ivars in
Fariborz Jahanian [Mon, 23 Aug 2010 18:51:39 +0000 (18:51 +0000)]
Support for IRGen of synthesize bitfield ivars in
objc-nonfragile-abi2 (radar 7824380).

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

14 years agotest case for PR7920.
Devang Patel [Mon, 23 Aug 2010 18:26:10 +0000 (18:26 +0000)]
test case for PR7920.

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

14 years agoIntroduce a new code-completion point when we're parsing a
Douglas Gregor [Mon, 23 Aug 2010 18:23:48 +0000 (18:23 +0000)]
Introduce a new code-completion point when we're parsing a
declarator. Here, we can only see a few things (e.g., cvr-qualifiers,
nested name specifiers) and we do not want to provide other non-macro
completions. Previously, we would end up in recovery mode and would
provide a large number of non-relevant completions.

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

14 years agoEmit an error noting that Clang does not support code generation for
Douglas Gregor [Mon, 23 Aug 2010 14:50:27 +0000 (14:50 +0000)]
Emit an error noting that Clang does not support code generation for
the ternary operator without a left-hand side in C++ (PR7726), from
Jean-Daniel Dupas!

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

14 years agoAdd XML for CXXConstructExpr, from Benoit Belley!
Douglas Gregor [Mon, 23 Aug 2010 14:44:46 +0000 (14:44 +0000)]
Add XML for CXXConstructExpr, from Benoit Belley!

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

14 years agoWhen complaining about a duplicate declspec, provide a Fix-It that
Douglas Gregor [Mon, 23 Aug 2010 14:34:43 +0000 (14:34 +0000)]
When complaining about a duplicate declspec, provide a Fix-It that
removes the copy. Patch from Eelis van der Weegen, tweaked/updated by
me.

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

14 years agoClarify documentation of escaping for backslash
Douglas Gregor [Mon, 23 Aug 2010 14:03:03 +0000 (14:03 +0000)]
Clarify documentation of escaping for backslash

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

14 years agoAdd a virtual destructor to the base of another class hierarchy with virtual
Chandler Carruth [Mon, 23 Aug 2010 08:37:21 +0000 (08:37 +0000)]
Add a virtual destructor to the base of another class hierarchy with virtual
methods.

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

14 years agoRelax the construction of a definition for implicit, trivial default
Chandler Carruth [Mon, 23 Aug 2010 07:55:51 +0000 (07:55 +0000)]
Relax the construction of a definition for implicit, trivial default
constructors. We perform semantic checking when creating the definition, and
this isn't needed in certain contexts (value initialization) but is in others
(default initialization). This fixes PR7948.

We add explicit code to the default initialization path to ensure the
definition is both present and valid.

Doug, please review. I think this follows your latest suggestion, and it ended
up remarkably cleaner than I anticipated. Also let me know if similar logic
should be followed for destructors and copy-constructors.

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

14 years agoPush DeclGroupRefs and TemplateNames in an opaque but type-safe way
John McCall [Mon, 23 Aug 2010 07:28:44 +0000 (07:28 +0000)]
Push DeclGroupRefs and TemplateNames in an opaque but type-safe way
through the parser.

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

14 years agoIn Sema::AddBuiltinOperatorCandidates, candidate pointer types set can also contain...
Argyrios Kyrtzidis [Mon, 23 Aug 2010 07:12:16 +0000 (07:12 +0000)]
In Sema::AddBuiltinOperatorCandidates, candidate pointer types set can also contain a ObjCObjectPointerType since r111699.

Don't assume that they are only PointerTypes or we will crash.

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

14 years agochandlerc pointed out that ending a line with /\ is not very friendly. :)
John McCall [Mon, 23 Aug 2010 06:56:36 +0000 (06:56 +0000)]
chandlerc pointed out that ending a line with /\ is not very friendly. :)

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

14 years agoKill off Parser::TemplateParameterList to avoid misparses.
John McCall [Mon, 23 Aug 2010 06:53:58 +0000 (06:53 +0000)]
Kill off Parser::TemplateParameterList to avoid misparses.

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

14 years agoSundry incremental steps towards killing off Action.
John McCall [Mon, 23 Aug 2010 06:44:23 +0000 (06:44 +0000)]
Sundry incremental steps towards killing off Action.

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

14 years agofix rdar://8340348, a miscompile of boost that was exposed by r109848.
Chris Lattner [Mon, 23 Aug 2010 05:26:13 +0000 (05:26 +0000)]
fix rdar://8340348, a miscompile of boost that was exposed by r109848.
That revision started classifying truly empty structs like "Y" and "X"
as being NoClass/NoClass and turning them into 'ignore'.  The call code
turns around and allocates space for the ignored argument with
GetUndefRValue.  The bug is that GetUndefRValue would return the address
as undef, instead of returning an object with a defined address but
undefined contents.

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

14 years agoAdjust code placement.
Zhongxing Xu [Mon, 23 Aug 2010 01:37:32 +0000 (01:37 +0000)]
Adjust code placement.

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

14 years agoAbstract out everything having to do with member pointers into the ABI
John McCall [Mon, 23 Aug 2010 01:21:21 +0000 (01:21 +0000)]
Abstract out everything having to do with member pointers into the ABI
class;  they should just be completely opaque throughout IR gen now,
although I haven't really audited that.

Fix a bug apparently inherited from gcc-4.2 where we failed to null-check
member data pointers when performing derived-to-base or base-to-derived
conversions on them.

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

14 years agoExtract a method to check whether a function is the global placement
John McCall [Mon, 23 Aug 2010 01:17:59 +0000 (01:17 +0000)]
Extract a method to check whether a function is the global placement
operator new[].

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

14 years agoGo back to asking CodeGenTypes whether a type is zero-initializable.
John McCall [Sun, 22 Aug 2010 21:01:12 +0000 (21:01 +0000)]
Go back to asking CodeGenTypes whether a type is zero-initializable.
Make CGT defer to the ABI on all member pointer types.
This requires giving CGT a handle to the ABI.
It's way easier to make that work if we avoid lazily creating the ABI.
Make it so.

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

14 years agoAdd x86intrin.h which is generic x86 intrinsics for more than just Intel. Thus
Nick Lewycky [Sun, 22 Aug 2010 20:38:05 +0000 (20:38 +0000)]
Add x86intrin.h which is generic x86 intrinsics for more than just Intel. Thus
far, this just #include's immintrin.h for compatibility.

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

14 years agoDo not elide copy construction when we're performing base-class initialization
Douglas Gregor [Sun, 22 Aug 2010 18:27:02 +0000 (18:27 +0000)]
Do not elide copy construction when we're performing base-class initialization

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

14 years agoEliminate a stale assertion. Fixes Clang self-host.
Douglas Gregor [Sun, 22 Aug 2010 18:26:35 +0000 (18:26 +0000)]
Eliminate a stale assertion. Fixes Clang self-host.

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

14 years agoPreserve the zero-initialization and construction-kind settings when
Douglas Gregor [Sun, 22 Aug 2010 17:20:18 +0000 (17:20 +0000)]
Preserve the zero-initialization and construction-kind settings when
instantiating CXXConstructExpr expressions.

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

14 years agoWhen performing value-initialization for a class with a non-trivial,
Douglas Gregor [Sun, 22 Aug 2010 16:15:35 +0000 (16:15 +0000)]
When performing value-initialization for a class with a non-trivial,
implicitly-defined default constructor, zero-initialize the memory
before calling the default constructor. Previously, we would only
zero-initialize in the case of a trivial default constructor.

Also, simplify the hideous logic that determines when we have a
trivial default constructor and, therefore, don't need to emit any
call at all.

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

14 years agoClean up a very silly use of first-class aggregates.
John McCall [Sun, 22 Aug 2010 11:04:31 +0000 (11:04 +0000)]
Clean up a very silly use of first-class aggregates.

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

14 years agoExperiment with using first-class aggregates to represent member function
John McCall [Sun, 22 Aug 2010 10:59:02 +0000 (10:59 +0000)]
Experiment with using first-class aggregates to represent member function
pointers.  I find the resulting code to be substantially cleaner, and it
makes it very easy to use the same APIs for data member pointers (which I have
conscientiously avoided here), and it avoids a plethora of potential
inefficiencies due to excessive memory copying, but we'll have to see if it
actually works.

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

14 years agoExtract member function pointer comparison and null comparison into
John McCall [Sun, 22 Aug 2010 08:30:07 +0000 (08:30 +0000)]
Extract member function pointer comparison and null comparison into
the ABI code.  Implement correct semantics for these on ARM.

I believe this completes the implementation of member function pointers
on ARM.

I think I'm going to switch member function pointers over to be
non-aggregates while I have all this in mind.

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

14 years agoAdd two new enumerations to the unsupported list for Windows so that all cases
Chandler Carruth [Sun, 22 Aug 2010 06:56:37 +0000 (06:56 +0000)]
Add two new enumerations to the unsupported list for Windows so that all cases
are handled.

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

14 years agoAbstract out member-pointer creation. I'm really unhappy about the current
John McCall [Sun, 22 Aug 2010 06:43:33 +0000 (06:43 +0000)]
Abstract out member-pointer creation.  I'm really unhappy about the current
duplication between the constant and non-constant paths in all of this.

Implement ARM ABI semantics for member pointer constants and conversion.

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

14 years agoAbstract more member-pointerness out.
John McCall [Sun, 22 Aug 2010 04:16:24 +0000 (04:16 +0000)]
Abstract more member-pointerness out.

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

14 years agoAbstract out member-pointer conversions.
John McCall [Sun, 22 Aug 2010 03:04:22 +0000 (03:04 +0000)]
Abstract out member-pointer conversions.

Pretty much everything having to do with member pointers is ABI-specific.

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

14 years agoDetabify.
Eli Friedman [Sun, 22 Aug 2010 01:00:03 +0000 (01:00 +0000)]
Detabify.

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

14 years agoImplement the call parts of the member-function-pointer ARM C++ ABI.
John McCall [Sun, 22 Aug 2010 00:59:17 +0000 (00:59 +0000)]
Implement the call parts of the member-function-pointer ARM C++ ABI.

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

14 years agoExtract calls to method pointers out as an ABI routine.
John McCall [Sun, 22 Aug 2010 00:05:51 +0000 (00:05 +0000)]
Extract calls to method pointers out as an ABI routine.
No functionality change.

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

14 years agoThe ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
John McCall [Sat, 21 Aug 2010 22:46:04 +0000 (22:46 +0000)]
The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
it deserves its own enumerator.  Obviously the implementations should
closely follow the Itanium ABI except in cases of divergence.

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

14 years agoVisual Studio tools used on win32 hosts when targeting win32.
Michael J. Spencer [Sat, 21 Aug 2010 21:55:07 +0000 (21:55 +0000)]
Visual Studio tools used on win32 hosts when targeting win32.

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

14 years agotwik to my previous patch for pr7936.
Fariborz Jahanian [Sat, 21 Aug 2010 17:11:09 +0000 (17:11 +0000)]
twik to my previous patch for pr7936.
Build qualified version of ObjC pointers (not pointers) when
doing overload resolution.

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

14 years agoAvoid including mm_malloc.h in a cc1 test, it pulls in system headers.
Benjamin Kramer [Sat, 21 Aug 2010 13:39:38 +0000 (13:39 +0000)]
Avoid including mm_malloc.h in a cc1 test, it pulls in system headers.

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

14 years agoPlace method near its class.
Zhongxing Xu [Sat, 21 Aug 2010 12:24:38 +0000 (12:24 +0000)]
Place method near its class.

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

14 years agoRemove dead code.
Zhongxing Xu [Sat, 21 Aug 2010 11:05:46 +0000 (11:05 +0000)]
Remove dead code.

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

14 years agoImprove comments.
Zhongxing Xu [Sat, 21 Aug 2010 11:03:37 +0000 (11:03 +0000)]
Improve comments.

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

14 years agoRemove a special case for OSAtomic functions. We can already bind and retrieve
Zhongxing Xu [Sat, 21 Aug 2010 11:00:26 +0000 (11:00 +0000)]
Remove a special case for OSAtomic functions. We can already bind and retrieve
with the same binding key. The only trick here is that sometimes the Symbolic
region is stored in with an LocAsInteger wrapper. We unwrap that in
SVal::getAsLocSymbol().

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

14 years agoDeclPtrTy -> Decl *
John McCall [Sat, 21 Aug 2010 09:40:31 +0000 (09:40 +0000)]
DeclPtrTy -> Decl *

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

14 years agoRemove dead code. We no longer need it because now we treat the first element
Zhongxing Xu [Sat, 21 Aug 2010 08:55:42 +0000 (08:55 +0000)]
Remove dead code. We no longer need it because now we treat the first element
region and its base region as the same binding key.

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

14 years agoremove unused variable.
Zhongxing Xu [Sat, 21 Aug 2010 06:51:45 +0000 (06:51 +0000)]
remove unused variable.

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

14 years agoWhen invalidating a struct region, whether its type definition exists is not
Zhongxing Xu [Sat, 21 Aug 2010 06:26:59 +0000 (06:26 +0000)]
When invalidating a struct region, whether its type definition exists is not
relavant any more, because we set its default value to a symbol, and the type of
default symbolic value is irrelavant.

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

14 years agoFix typo in comment.
Michael J. Spencer [Sat, 21 Aug 2010 06:05:06 +0000 (06:05 +0000)]
Fix typo in comment.

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

14 years agoThis test needs a triple: it's checking the alignment of a pointer in bytes.
John McCall [Sat, 21 Aug 2010 04:58:16 +0000 (04:58 +0000)]
This test needs a triple: it's checking the alignment of a pointer in bytes.

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

14 years agoIRgen: Set the alignment correctly when creating LValue for a decls.
Daniel Dunbar [Sat, 21 Aug 2010 04:20:22 +0000 (04:20 +0000)]
IRgen: Set the alignment correctly when creating LValue for a decls.
 - Fixes PR5598.
 - Review appreciated.

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