]>
granicus.if.org Git - clang/log
Daniel Dunbar [Tue, 11 Nov 2008 09:41:28 +0000 (09:41 +0000)]
Add CodeGenFunction::EmitBranch.
- Emits an unconditional branch, with extra logic to avoid generating
spurious branches out of dummy blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Nov 2008 08:29:24 +0000 (08:29 +0000)]
Fix cmake build, patch from Jjgod Jiang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59036
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Nov 2008 07:41:27 +0000 (07:41 +0000)]
short circuit && and || when possible. This substantially reduces
the size of the -O0 output on some cases. For example, on expr.c from
176.gcc, it shrinks the .ll file from 43164 to 42835 lines, and removed
references to two external symbols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59034
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Nov 2008 07:24:28 +0000 (07:24 +0000)]
Make codegen smart enough to not emit the dead side of an if whose
condition is a constant. This shrinks -O0 codegen by quite a bit
on some cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59033
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Nov 2008 07:01:36 +0000 (07:01 +0000)]
implement debug info for typeof()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59032
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Nov 2008 06:42:53 +0000 (06:42 +0000)]
merge some testcases together.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59031
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Nov 2008 06:35:39 +0000 (06:35 +0000)]
Move backend output out of destructor.
Don't free AST consumer when --disable-free is set.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59030
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Nov 2008 06:28:10 +0000 (06:28 +0000)]
remove the wrong PR # from the file name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59029
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Nov 2008 06:27:34 +0000 (06:27 +0000)]
add PR#
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59028
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Nov 2008 06:13:16 +0000 (06:13 +0000)]
Fix PR3031 by silencing follow-on errors in invalid declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59027
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Nov 2008 04:48:20 +0000 (04:48 +0000)]
Remove unused function declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59024
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Nov 2008 04:34:23 +0000 (04:34 +0000)]
Add CodeGenFunction::EmitDummyBlock for marking places where we make
"dummy" blocks (blocks just used to make sure we have a place to dump
code to).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59022
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Nov 2008 04:12:31 +0000 (04:12 +0000)]
Remove CodeGenFunction::StartBlock.
- Was confusing and only used in one small part of the code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59020
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Nov 2008 04:09:47 +0000 (04:09 +0000)]
These tests have no needed to redirect stderr to stdout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59019
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Nov 2008 02:29:29 +0000 (02:29 +0000)]
Centralize basic block creation in CodeGenFunction::createBasicBlock.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59017
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 11 Nov 2008 01:36:32 +0000 (01:36 +0000)]
Fix StringLiteral print bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59015
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 11 Nov 2008 01:25:18 +0000 (01:25 +0000)]
Add && to test command.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59014
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Nov 2008 01:16:00 +0000 (01:16 +0000)]
Fix Release-Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59013
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 10 Nov 2008 20:40:00 +0000 (20:40 +0000)]
Basic support for taking the address of an overloaded function
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59000
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 10 Nov 2008 20:02:45 +0000 (20:02 +0000)]
Update VC++ project file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58996
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 10 Nov 2008 17:01:38 +0000 (17:01 +0000)]
Remove an out-of-date FIXME
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58990
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 10 Nov 2008 16:59:40 +0000 (16:59 +0000)]
Improve parser error recovery after a constructor initializer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58989
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 10 Nov 2008 16:14:15 +0000 (16:14 +0000)]
Allow user-defined conversions during reference binding
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58988
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 10 Nov 2008 14:41:22 +0000 (14:41 +0000)]
Don't create a typedef for the injected-class-name
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58987
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 10 Nov 2008 13:38:07 +0000 (13:38 +0000)]
Some cleanups to the declaration/checking of overloaded operators in C++. Thanks to Sebastian for the review
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58986
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 10 Nov 2008 13:05:26 +0000 (13:05 +0000)]
Add pretty printing to StringRegion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58985
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 10 Nov 2008 09:43:12 +0000 (09:43 +0000)]
Add region store model to path-sensitive testing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 10 Nov 2008 09:39:04 +0000 (09:39 +0000)]
Implement RegionStoreManager::RemoveDeadBindings(). This prunes several false warning caused by removal of symbolic constraints. Currently we just mark all symbols live. Further optimization for dead binding removal needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58982
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Nov 2008 06:31:46 +0000 (06:31 +0000)]
don't preserve names on IR instructions. This matches llvm-gcc's behavior and
speeds up the compiler by ~8% at -emit-llvm -O0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58977
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Nov 2008 06:31:19 +0000 (06:31 +0000)]
sort files add a missed header to the project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58976
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Nov 2008 06:10:01 +0000 (06:10 +0000)]
Fix even more bugs in debug info support:
1. emit proper debug info for forward decls of structs.
2. emit DW_TAG_member nodes around members of a field like llvm-gcc does.
This slows down debug info generation, but is required for correctness.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58973
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Nov 2008 06:08:34 +0000 (06:08 +0000)]
reimplement debug info generation in terms of DebugInfo.h instead of
using MachineModuleInfo. This runs at about the same speed as the old
code, but fixes a bunch of bugs and is simpler and shorter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58971
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 10 Nov 2008 05:00:06 +0000 (05:00 +0000)]
Print integer value instead of raw pointer. This is a hack to be fixed by migrating the output in analyzer to llvm::raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58965
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Nov 2008 03:00:37 +0000 (03:00 +0000)]
silence a warning from gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58956
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 9 Nov 2008 23:41:00 +0000 (23:41 +0000)]
Introduce ScopedDecl::getLexicalDeclContext() which is different from ScopedDecl::getDeclContext() when there are nested-names.
e.g.:
namespace A {
void f(); // SemanticDC (getDeclContext) == LexicalDC (getLexicalDeclContext) == 'namespace A'
}
void A::f(); // SemanticDC == namespace 'A'
// LexicalDC == global namespace
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58948
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 9 Nov 2008 22:53:32 +0000 (22:53 +0000)]
When a tag has nested-name ('struct foo::bar'), use not 'CurContext' but the context of the nested-name ('foo::').
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58945
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sun, 9 Nov 2008 22:09:58 +0000 (22:09 +0000)]
Simplify handling of nested-names in tags ('struct foo::bar').
-Use more of the non nested-name code path.
-Also use the ActOnTagStruct code path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58944
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 9 Nov 2008 18:54:14 +0000 (18:54 +0000)]
Support named operands in inline asm statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58940
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 9 Nov 2008 11:32:32 +0000 (11:32 +0000)]
Update C++ status: class support improved due to nested name parsing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58932
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 8 Nov 2008 17:17:31 +0000 (17:17 +0000)]
Implement Sema support for C++ nested-name-specifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58916
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 8 Nov 2008 16:47:38 +0000 (16:47 +0000)]
Silence a GCC member initialization order warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58914
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 8 Nov 2008 16:45:02 +0000 (16:45 +0000)]
Implement support for C++ nested-name-specifiers ('foo::bar::x') in the Parser side.
No Sema functionality change, just the signatures of the Action/Sema methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58913
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 8 Nov 2008 16:17:04 +0000 (16:17 +0000)]
Introduce annotation tokens, a special kind of token, created and used only by the parser to replace a group of tokens with a single token encoding semantic information.
Will be fully utilized later for C++ nested-name-specifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58911
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 8 Nov 2008 15:40:37 +0000 (15:40 +0000)]
Update C++ status to reflect parser capabilities for chapter 9 (classes). Slightly extend the class parser test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58909
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 8 Nov 2008 14:43:13 +0000 (14:43 +0000)]
Update C++ status: dynamic_cast is sema-complete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58907
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 8 Nov 2008 13:00:26 +0000 (13:00 +0000)]
Move named cast helpers out of Sema, as Chris requested. This requirse making a few functions public that weren't before.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58906
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 8 Nov 2008 12:02:25 +0000 (12:02 +0000)]
Revert r58880, it breaks test/SemaCXX/constructor.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58904
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 8 Nov 2008 11:24:06 +0000 (11:24 +0000)]
Use only one constructor for CXXMethodDecl. Keep initialization stuff into one place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58902
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 8 Nov 2008 06:12:46 +0000 (06:12 +0000)]
Avoid redundant cast<>s / simplify type dispatch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58892
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 8 Nov 2008 05:48:37 +0000 (05:48 +0000)]
Support getTypeInfo, getTypeAlign, getTypeSize on const Type*s.
- Size/align are not effected by CVR qualifiers.
Support getCanonicalType: const Type* -> const Type*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58891
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 8 Nov 2008 04:42:29 +0000 (04:42 +0000)]
"Fix" PR3021, don't crash on generating record types when we can't
generate the type of a member.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58889
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 8 Nov 2008 04:28:37 +0000 (04:28 +0000)]
Silence a gcc warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58888
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sat, 8 Nov 2008 03:45:42 +0000 (03:45 +0000)]
Add a boilerplate for out-of-bound array checking. This has no real function currently.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58886
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 8 Nov 2008 01:09:16 +0000 (01:09 +0000)]
In a declarator, consider an identifier a constructor only if it is followed by '('.
Previously:
class C {
int C; // Declarator::SetConstructor was called here.
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58880
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 8 Nov 2008 01:02:26 +0000 (01:02 +0000)]
update post-build step
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58878
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Fri, 7 Nov 2008 23:29:29 +0000 (23:29 +0000)]
Greatly improve static_cast diagnostics
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58873
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 7 Nov 2008 22:36:19 +0000 (22:36 +0000)]
Initial, partially-baked support for implicit user-defined conversions by conversion functions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58870
91177308 -0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Fri, 7 Nov 2008 22:24:44 +0000 (22:24 +0000)]
Use css style instead of hard coded color in cxx_status. No visible change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58867
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 7 Nov 2008 22:02:30 +0000 (22:02 +0000)]
Changes in preparation for nested-name-specifiers.
-When parsing declarators, don't depend on "CurScope->isCXXClassScope() == true" for constructors/destructors
-For C++ member declarations, don't depend on "Declarator.getContext() == Declarator::MemberContext"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58866
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 7 Nov 2008 20:55:59 +0000 (20:55 +0000)]
Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58864
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 7 Nov 2008 20:16:04 +0000 (20:16 +0000)]
Update C++ status
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58862
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 7 Nov 2008 20:08:42 +0000 (20:08 +0000)]
Parsing, ASTs, and semantic analysis for the declaration of conversion
functions in C++, e.g.,
struct X {
operator bool() const;
};
Note that these conversions don't actually do anything, since we don't
yet have the ability to use them for implicit or explicit conversions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58860
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 7 Nov 2008 15:54:02 +0000 (15:54 +0000)]
Assert that Parser::MaybeParseOperatorFunctionId is called when token is kw_operator, and replace ExpectAndConsume for the 'operator' token with a ConsumeToken.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58855
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 7 Nov 2008 15:42:26 +0000 (15:42 +0000)]
Separate the parsing of type-specifiers from other declaration specifiers, so that we can parse a C++ type-specifier-seq
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58854
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 7 Nov 2008 15:41:33 +0000 (15:41 +0000)]
include alloca.h instead of malloc.h. If this doesn't work for everyone we can just declare alloca directly in the file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58853
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 7 Nov 2008 14:28:18 +0000 (14:28 +0000)]
Append the test runs with '&&'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58851
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 7 Nov 2008 14:22:23 +0000 (14:22 +0000)]
Properly deserialize ParamInfo of FunctionDecl.
When allocating an array for ParamInfo, the "decl->getNumParams()" call was used, but this will return 0 since it checks ParamInfo (which isn't yet defined and is null).
The result was that ParamInfo got an array of zero length to hold the ParmVarDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58850
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 7 Nov 2008 14:00:25 +0000 (14:00 +0000)]
Bring in 'alloca' for the Analysis/stack-addr-ps.c test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58849
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 7 Nov 2008 13:13:41 +0000 (13:13 +0000)]
Add simple get method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58848
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 7 Nov 2008 13:05:39 +0000 (13:05 +0000)]
Join two lines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58847
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 7 Nov 2008 13:01:22 +0000 (13:01 +0000)]
Fix crash caused by this:
void f() {
int +; // crash here
}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58846
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 7 Nov 2008 12:15:16 +0000 (12:15 +0000)]
Shut off an unsigned/signed comparison warning for GCC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58842
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 7 Nov 2008 10:38:33 +0000 (10:38 +0000)]
Finish the implementation of VisitCompoundLiteralExpr. As VisitInitListExpr is
available, things get much simplified.
One addition is that CompoundLiteralExpr can appear both in rvalue and lvalue
context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58837
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Fri, 7 Nov 2008 08:57:30 +0000 (08:57 +0000)]
Make the assertion real.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58833
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 7 Nov 2008 02:09:25 +0000 (02:09 +0000)]
Patch by Nikita Zhuk: Add TranslationUnitActions to AnalysisConsumer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58831
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 6 Nov 2008 23:29:22 +0000 (23:29 +0000)]
Initial, rudimentary implementation of operator overloading for binary
operators. For example, one can now write "x + y" where x or y is a
class or enumeration type, and Clang will perform overload resolution
for "+" based on the overloaded operators it finds.
The other kinds of overloadable operators in C++ will follow this same
approach.
Three major issues remain:
1) We don't find member operators
2) Since we don't have user-defined conversion operators, we can't
call any of the built-in overloaded operators in C++ [over.built].
3) Once we've done the semantic checks, we drop the overloaded
operator on the floor; it doesn't get into the AST at all.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58821
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 6 Nov 2008 22:13:31 +0000 (22:13 +0000)]
Parsing, ASTs, and semantic analysis for the declaration of overloaded
operators in C++. Overloaded operators can be called directly via
their operator-function-ids, e.g., "operator+(foo, bar)", but we don't
yet implement the semantics of operator overloading to handle, e.g.,
"foo + bar".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58817
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 6 Nov 2008 16:32:23 +0000 (16:32 +0000)]
Reclaim some bits in IdentifierInfo, for later use as overloaded operator names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58806
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Thu, 6 Nov 2008 15:59:35 +0000 (15:59 +0000)]
Sema-check virtual declarations. Complete dynamic_cast checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58804
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 6 Nov 2008 15:17:27 +0000 (15:17 +0000)]
Add the remaining C++0x keywords
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58802
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 6 Nov 2008 06:24:22 +0000 (06:24 +0000)]
Update VC++ proj.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58797
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 6 Nov 2008 04:55:21 +0000 (04:55 +0000)]
Bring back RegionExtent classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58795
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 5 Nov 2008 22:47:25 +0000 (22:47 +0000)]
Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58776
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 5 Nov 2008 22:17:39 +0000 (22:17 +0000)]
Add a test case for CFMakeCollectable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58772
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 5 Nov 2008 22:17:20 +0000 (22:17 +0000)]
Fix regression with handling of CFMakeCollectable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58771
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 5 Nov 2008 22:15:14 +0000 (22:15 +0000)]
Improve assert messages.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58770
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 5 Nov 2008 21:50:06 +0000 (21:50 +0000)]
Move named cast sema functions to their own file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58769
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 5 Nov 2008 20:51:48 +0000 (20:51 +0000)]
Parsing, representation, and preliminary semantic analysis of destructors.
Implicit declaration of destructors (when necessary).
Extended Declarator to store information about parsed constructors
and destructors; this will be extended to deal with declarators that
name overloaded operators (e.g., "operator +") and user-defined
conversion operators (e.g., "operator int").
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58767
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 5 Nov 2008 19:05:06 +0000 (19:05 +0000)]
AnalysisManager can now be used to for analyses over TranslationUnits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58766
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 5 Nov 2008 17:54:26 +0000 (17:54 +0000)]
A small error message improvement and some comment cleanup for static_cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 5 Nov 2008 16:54:44 +0000 (16:54 +0000)]
initXXX methods can return owned objects
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58758
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 5 Nov 2008 16:20:31 +0000 (16:20 +0000)]
Keep track of whether a C++ class is an aggregate. Don't allow initialization of non-aggregates with initializer lists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58757
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 5 Nov 2008 15:29:30 +0000 (15:29 +0000)]
Implement C++ copy-initialization for declarations. There is now some
duplication in the handling of copy-initialization by constructor,
which occurs both for initialization of a declaration and for
overloading. The initialization code is due for some refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58756
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 5 Nov 2008 04:29:56 +0000 (04:29 +0000)]
Initial implementation of parsing, semantic analysis, and AST-building
for constructor initializations, e.g.,
class A { };
class B : public A {
int m;
public:
B() : A(), m(17) { };
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58749
91177308 -0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Tue, 4 Nov 2008 20:31:17 +0000 (20:31 +0000)]
Update CMakeLists.txt
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58716
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 4 Nov 2008 18:44:31 +0000 (18:44 +0000)]
Remove stray character.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58713
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 4 Nov 2008 18:39:58 +0000 (18:39 +0000)]
Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58711
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 4 Nov 2008 16:57:32 +0000 (16:57 +0000)]
Make it an error if an Objective-C declaration is not in the global scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58705
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 4 Nov 2008 16:51:42 +0000 (16:51 +0000)]
LinkageSpecDecl is c++ specific, move it to DeclCXX
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58704
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 4 Nov 2008 15:59:10 +0000 (15:59 +0000)]
Some cleanup of the cast checkers. Don't canonicalize types when not needed. Use distinct diagnostics for distinct errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58700
91177308 -0d34-0410-b5e6-
96231b3b80d8