Chris Lattner
7ed3209332
define __PASCAL_STRINGS__ whenever -fpascal-strings is enabled.
...
llvm-svn: 56824
2008-09-30 00:48:48 +00:00
Chris Lattner
006579ddb5
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ is a darwin-specific #define
...
llvm-svn: 56822
2008-09-30 00:46:39 +00:00
Steve Naroff
506e717e4f
Fix <rdar://problem/6247781> Parser rejecting properly mismatched properties.
...
llvm-svn: 56821
2008-09-30 00:24:17 +00:00
Ted Kremenek
7273d01dd4
Updated checker build.
...
llvm-svn: 56819
2008-09-29 23:33:12 +00:00
Chris Lattner
fb8b8f298c
Fix the root cause of PR2750 instead of the side effect.
...
NumericLiteral parser is not careful about overrun because
it should never be possible. It implicitly expects that its
input matched the regex for pp-constant. Because of this, it
knows it can't be pointing to a prefix of something that
looks like a number. This is all fine, except that __LINE__
does not prevent implicit concatenation from happening. Fix
__LINE__ to not do this.
llvm-svn: 56818
2008-09-29 23:12:31 +00:00
Ted Kremenek
887c49d592
Really don't add -isysroot twice.
...
llvm-svn: 56815
2008-09-29 23:06:09 +00:00
Ted Kremenek
6b2e07a292
Don't filter out -fpascal-strings.
...
llvm-svn: 56810
2008-09-29 22:45:28 +00:00
Chris Lattner
4a80a59b6e
Fix va_arg handling to do argument decaying at the correct place. This
...
fixes problems handling references of va_list, which happens on x86_64.
This fixes PR2841 and rdar://6252231
llvm-svn: 56809
2008-09-29 22:28:25 +00:00
Chris Lattner
d9a663aeb9
Make some methods const, add some helpers to FullSourceLoc,
...
and add a dump method to FullSourceLoc! Patch by Nico Weber!
llvm-svn: 56806
2008-09-29 21:46:13 +00:00
Chris Lattner
9bb37fec6a
move ExtVectorElementExpr down into the 'clang extensions' section.
...
Wrap line to 80 cols.
llvm-svn: 56805
2008-09-29 21:30:29 +00:00
Ted Kremenek
01c61b9b2a
Update checker build.
...
llvm-svn: 56804
2008-09-29 21:24:37 +00:00
Steve Naroff
38093af363
Add a random C99 comment/reference.
...
llvm-svn: 56800
2008-09-29 20:07:05 +00:00
Ted Kremenek
8715e1c859
Extend 'IsLValType' to handle BlockPointerTypes.
...
llvm-svn: 56797
2008-09-29 19:17:30 +00:00
Steve Naroff
32d072ca45
Teach Sema::CheckAssignmentConstraints() to allow assignments between id and block pointer types (^{}).
...
llvm-svn: 56793
2008-09-29 18:10:17 +00:00
Steve Naroff
03fc762a02
Fix <rdar://problem/6251012> clang: Blocks are objects too.
...
llvm-svn: 56791
2008-09-29 16:51:41 +00:00
Ted Kremenek
8b89a65136
Discard extra -isysroot options. This fixes:
...
<rdar://problem/6253141> Parser rejection occurs when command line has more than one -isysroot switch
llvm-svn: 56790
2008-09-29 16:15:20 +00:00
Daniel Dunbar
068f7f7092
Fix braindead bug, ID number was hardcoded.
...
llvm-svn: 56789
2008-09-29 16:06:43 +00:00
Steve Naroff
c2036d5da4
Fix <rdar://problem/6253149> property declaration doesn't declare getter and setter.
...
llvm-svn: 56785
2008-09-29 14:20:56 +00:00
Nico Weber
378c5539c8
whitespace and comment changes, to fix grammar and 80 col violations
...
llvm-svn: 56776
2008-09-29 00:25:48 +00:00
Steve Naroff
b6b1abb0f5
Change a NOTE to a FIXME based on feedback from clattner.
...
llvm-svn: 56775
2008-09-28 21:07:52 +00:00
Ted Kremenek
c1048153fe
Updated checker build.
...
llvm-svn: 56774
2008-09-28 17:25:56 +00:00
Steve Naroff
8edb573a79
Fix <rdar://problem/6252129> implementation of method in category doesn't effectively declare it for methods below.
...
llvm-svn: 56771
2008-09-28 14:55:53 +00:00
Steve Naroff
4831c74d40
Fix <rdar://problem/6252108> assigning to argument passed to block should not require __block.
...
llvm-svn: 56770
2008-09-28 14:02:55 +00:00
Chris Lattner
037379d767
Fix rdar://6252231 - cannot call vsnprintf with va_list on x86_64,
...
by decaying __builtin_va_list's type when forming builtins. On
x86-64 (and other targets) __builtin_va_list is a typedef for
an array.
llvm-svn: 56768
2008-09-28 06:05:35 +00:00
Chris Lattner
ff2c187e59
Replace a comparison with a static list of builtins that was wrong (it
...
wasn't covering checking builtins like __builtin___vsnprintf_chk) with
a check that won't get out of date.
llvm-svn: 56767
2008-09-28 05:54:29 +00:00
Chris Lattner
e9d291c038
Fix rdar://6251437, references to enum constant decls in a block
...
don't need a BlockDeclRefExpr.
llvm-svn: 56766
2008-09-28 05:30:26 +00:00
Ted Kremenek
7dbc92a269
Add "Path Length" back to the table of bug reports.
...
llvm-svn: 56765
2008-09-28 04:13:09 +00:00
Steve Naroff
e18f94c20d
Fix <rdar://problem/6252216> compare block to NULL.
...
llvm-svn: 56764
2008-09-28 01:11:11 +00:00
Daniel Dunbar
d3dcb4f8ed
Add support for implicit rethrows in @catch blocks.
...
Comment exception-handling code generation strategy.
llvm-svn: 56763
2008-09-28 01:03:14 +00:00
Daniel Dunbar
a2d3570fc9
Skip redundant if.
...
llvm-svn: 56762
2008-09-28 00:19:22 +00:00
Steve Naroff
edec9ba58d
Fix <rdar://problem/6252226> parser thinks block argument is undefined identifier in NSServices.m
...
llvm-svn: 56761
2008-09-28 00:13:36 +00:00
Daniel Dunbar
7f08678f7d
(Update LLVM) Clean up obj-c exception generation to be a bit more
...
readable and to generate more readable IR.
llvm-svn: 56758
2008-09-27 23:30:04 +00:00
Daniel Dunbar
86919f45cc
Bug fix, codegen @catch(id<X> ...) acceptably.
...
- This should be rejected by sema (IMHO) but that needs some
investigation.
llvm-svn: 56756
2008-09-27 22:21:14 +00:00
Ted Kremenek
21c24f1785
Revert 56735. The old bug categories were more informative.
...
llvm-svn: 56755
2008-09-27 22:02:42 +00:00
Daniel Dunbar
523208fb4a
Simplify generate code for exceptions:
...
- There is no need to branch on the rethrow variable to determine if
we need to call objc_exception_try_exit. We know whether an
exception was thrown, so just branch to a different target if we
want to skip the try_exit.
This is a slight semantic departure from gcc, but only for throwing
nil, which is undefined (and for which gcc emits broken code).
- Also fixes a bug in current code which was calling try_exit too
many times when an exception was uncaught (but there were some
handlers).
Fix bug introduced in prev. commit, the type of the @catch parameter
was uninitialized.
llvm-svn: 56754
2008-09-27 07:36:24 +00:00
Daniel Dunbar
aec553bfdb
Prefer llvm::Function::addFnAttr(...) to F->addAttribute(~0, ...).
...
llvm-svn: 56753
2008-09-27 07:16:42 +00:00
Daniel Dunbar
274ff37583
Simplify code to emit the unified return block and move it to the end
...
of the function.
llvm-svn: 56752
2008-09-27 07:15:59 +00:00
Daniel Dunbar
b22ff59750
Bug fix, make sure to initialize exception object (to rethrow) even
...
when there are no @catch blocks.
Also, eliminated unneeded alloca for the rethrow object.
Also, avoid generating code to rethrow exception if the exception will
trivially always be caught.
llvm-svn: 56751
2008-09-27 07:03:52 +00:00
Daniel Dunbar
da04d7f4ec
Easy fix for nasty bug, exception data buffer had wrong type == wrong
...
(smaller) size == garbage on stack == heisenbugs.
llvm-svn: 56750
2008-09-27 06:32:25 +00:00
Zhongxing Xu
612e0c9604
Delete trailing white space. It's over 80 columns.
...
llvm-svn: 56749
2008-09-27 03:27:29 +00:00
Daniel Dunbar
53642c0160
Remove automagic substitution of %llvmgcc
...
- Is unused and somewhat unreliable.
llvm-svn: 56737
2008-09-27 00:47:03 +00:00
Ted Kremenek
16a59fabec
Change "leaks" to have the category "Performance".
...
llvm-svn: 56735
2008-09-27 00:45:27 +00:00
Daniel Dunbar
00e36f4c5c
Fix function-attributes test case to not rely on llvm-gcc.
...
llvm-svn: 56734
2008-09-27 00:44:01 +00:00
Daniel Dunbar
23b46ca198
Fix attributes test case to not run clang umpteen times.
...
llvm-svn: 56733
2008-09-27 00:39:13 +00:00
Ted Kremenek
8bafa2cf9f
Internally store the body of a BlockExpr using a Stmt* instead of a CompoundStmt*, and use the getBody() method to do the appropriate checking. This both removes the type-punning warnings in Expr.cpp and also makes BlockExpr have more consistency checks against modifications to its body (via StmtIterator).
...
llvm-svn: 56710
2008-09-26 23:24:14 +00:00
Ted Kremenek
2e53c51914
Forgot to check in header file with last commit.
...
llvm-svn: 56709
2008-09-26 23:24:05 +00:00
Ted Kremenek
6ed79f0c13
Use a union instead of a bunch of magic casts to implement a variant. This removes the type-punning errors for DeclGroup.
...
llvm-svn: 56708
2008-09-26 23:19:04 +00:00
Ted Kremenek
f5e7e3ae26
Add more control-flow to test case.
...
llvm-svn: 56707
2008-09-26 23:05:47 +00:00
Ted Kremenek
d86d39cc9e
Add CFG support for implicit-control flow for VLA size expressions within an SizeOfAlignOfTypeExpr.
...
llvm-svn: 56706
2008-09-26 22:58:57 +00:00
Devang Patel
597e70876e
Now Attributes are divided in three groups
...
- return attributes - inreg, zext and sext
- parameter attributes
- function attributes - nounwind, readonly, readnone, noreturn
Return attributes use 0 as the index.
Function attributes use ~0U as the index.
llvm-svn: 56705
2008-09-26 22:53:57 +00:00