Eli Friedman
09af4d9728
Update cmake build; patch by Csaba Hruska.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60418 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 16:23:30 +00:00
Steve Naroff
dd2fdf13f1
Simplify previous commit.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60416 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 16:05:55 +00:00
Eli Friedman
8de8d1d3f2
Fix for PR3150: obvious copy-paste bug in
...
ScalarExprEmitter::VisitBinLOr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60415 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 16:02:46 +00:00
Steve Naroff
eb0646c8df
More work to rewrite synthesize properties (<rdar://problem/6213955>)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60414 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 15:48:25 +00:00
Sebastian Redl
cee63fbf0e
Handle new by passing the Declaration to the Action, not a processed type.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60413 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 14:43:59 +00:00
Ted Kremenek
04f9d468f7
Add FIXME.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60390 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 01:26:07 +00:00
Eli Friedman
a385b3c9c4
Disabling this code due to regression on test/CodeGen/bitfield.c. See
...
PR3152.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60389 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 01:17:45 +00:00
Douglas Gregor
26236e8b75
A little more scaffolding for parsing templates:
...
- Template parameter scope to hold the template parameters
- Template parameter context for parsing declarators
- Actions for template type parameters and non-type template
parameters
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60387 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 00:41:28 +00:00
Fariborz Jahanian
b85cce6498
This patch corrects problem in searching for a setter/getter method for
...
a property. Previous scheme of seaching in interface's list of methods
would not work because this list is not yet constructed. This is in preparation
for doing semantic check on viability of setter/getter method declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60386 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-02 00:19:12 +00:00
Douglas Gregor
adcac8824a
Basic support for parsing templates, from Andrew Sutton
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60384 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 23:54:00 +00:00
Douglas Gregor
cb43d99952
Improve error recovery when parsing a function definition fails
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60380 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 23:03:32 +00:00
Douglas Gregor
e89b02823a
Initialize storage class even if we got an erroneous mutable
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60377 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 22:46:22 +00:00
Douglas Gregor
bec1c9d6f3
Objective-C keywords are not always identifiers. Some are also C++ keywords
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60373 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 21:46:47 +00:00
Douglas Gregor
ec0bf0500c
Fix RUN line
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60372 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 21:17:52 +00:00
Steve Naroff
d40910b581
-Add several ObjC types to Decl::getDeclKindName(), a useful debug hook.
...
-Start adding support for rewriting @synthesize.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60368 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 20:33:01 +00:00
Douglas Gregor
b65f2425e9
Test blocks in C++ mode
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 19:48:06 +00:00
Douglas Gregor
19ac6ff24e
Use EmitInt, not Emit, to emit unsigned values
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60364 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 19:45:16 +00:00
Daniel Dunbar
5bea06ad9e
Add test case for __ASSEMBLER__ definition.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60363 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 19:23:47 +00:00
Daniel Dunbar
c1571453de
Add LangOptions marker for assembler-with-cpp mode and use to define
...
__ASSEMBLER__ properly. Patch from Roman Divacky (with minor
formatting changes). Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60362 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 18:55:22 +00:00
Douglas Gregor
5fd5468af4
Enable blocks in C++
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60361 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 18:34:47 +00:00
Douglas Gregor
473e70de24
Make sure __null test runs in both 32- and 64-bit. Thanks Anders
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60360 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 18:05:11 +00:00
Douglas Gregor
a4745616eb
Parse the exception-specification throw(...), a Microsoft extension
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60359 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 18:00:20 +00:00
Douglas Gregor
ac72d40340
Add the test for __null
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60357 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 17:31:21 +00:00
Douglas Gregor
28d6cba4c4
Define NULL to __null in C++, so that it's guaranteed to have the same size as a pointer
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60355 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 17:20:57 +00:00
Anders Carlsson
4fdfb0965b
Generate the correct results for the comma expression. Fixes PR3123.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60334 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 06:44:05 +00:00
Anders Carlsson
d26527708b
Revert change that made isNullPointerConstant start emitting warnings. We don't want that :)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60333 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 06:28:23 +00:00
Anders Carlsson
4cfc6fe9ed
Fix test. (0 && (a(),1)) is a valid I-C-E according to C99.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60331 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 06:27:38 +00:00
Anders Carlsson
64712f196b
Change more code over to using the new Expr::Evaluate
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60324 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 02:46:24 +00:00
Anders Carlsson
4b3f9c06d5
Change more code over to using the new Expr::Evaluate
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60323 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 02:42:14 +00:00
Anders Carlsson
f35d35a231
Use the new Expr::Evaluate
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60321 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 02:31:41 +00:00
Anders Carlsson
07b5cc0f40
Remove dead code.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60320 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 02:25:52 +00:00
Anders Carlsson
4000ea685a
Add Sema::isNullPointerConstant which extwarns if necessary. Use it in Sema::CheckConditionalOperands.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60319 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 02:17:22 +00:00
Anders Carlsson
efa9b3877e
Add a new variant of isNullConstantExpr that returns an EvalResult.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60318 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 02:13:57 +00:00
Anders Carlsson
d3a61d5ec5
Use VerifyIntegerConstantExpression for case values.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60317 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 02:13:02 +00:00
Anders Carlsson
027f62ec18
Emit the correct diagnostic when a comma is in an ICE.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60316 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-01 02:07:06 +00:00
Anders Carlsson
e21555e666
Add Sema::VerifyIntegerConstantExpression
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60305 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 19:50:32 +00:00
Anders Carlsson
0e8acbbba7
Change the diagnostics that the evaluator reports to be of type NOTE.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60301 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 18:37:00 +00:00
Anders Carlsson
f0c1e4b679
Replace the isEvaluated bool with a ShortCircuit int, making it easier to handle recursion
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60300 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 18:26:25 +00:00
Anders Carlsson
82206e267c
Pass the expression to the Error and Extension methods.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60299 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 18:14:57 +00:00
Anders Carlsson
5b45d4ef1e
Add a new variant of Evaluate and reimplement the old Evaluate in terms of the new.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60298 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 16:58:53 +00:00
Anders Carlsson
fcb4d09531
General cleanup, evaluate the RHS of a logical op even if the LHS will give us the result.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60297 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 16:51:17 +00:00
Anders Carlsson
54da049661
EvalInfo now holds a reference to an EvalResult struct.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60296 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 16:38:33 +00:00
Anders Carlsson
94deaf675a
Add Expr::EvalResult struct. (Not used just yet)
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60295 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 16:19:46 +00:00
Zhongxing Xu
34a83474c8
remove a test case that causes compiler warning.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60282 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 05:59:27 +00:00
Zhongxing Xu
27cae9e327
Add test for initializing array with string literal.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60281 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 05:51:19 +00:00
Zhongxing Xu
6987c7b741
Add support for initializing array with string literal.
...
This fixes PR3127
http://llvm.org/bugs/show_bug.cgi?id=3127
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60280 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 05:49:49 +00:00
Eli Friedman
994ffef435
Fix for PR2969: generate a memcpy from a constant for constant
...
initializers. llvm-gcc appears to be more aggressive, but incorrect,
for constructs like "const int a[] = {1,2,3};"; that said, current
optimizers will do the appropriate optimizations when safe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60270 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 02:11:09 +00:00
Eli Friedman
4310ff6d8b
Minor update to CMake build system.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60269 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 01:46:21 +00:00
Anders Carlsson
960525cbfb
CXXFunctionalCastExpr inherits from ExplicitCastExpr.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-29 19:58:11 +00:00
Zhongxing Xu
0395b5d498
To be consistent, make the index of the ElementRegion always signed.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60248 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-29 12:05:04 +00:00