Граф коммитов

5345 Коммитов

Автор SHA1 Сообщение Дата
Chris Lattner 6a30c1fc7f start handling 'mmacosx-version-min', this is not complete yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56828 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30 01:13:12 +00:00
Daniel Dunbar 898d508d4c Add infrastructure for proper @finally support.
- Provides a basic primitive to jump to an arbitrary basic block,
   through the finally code.

 - Only used for return statements and rethrow currently. Still need
   to handle break, continue and goto.

 - Code still needs to be shuffled around to live elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56827 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30 01:06:03 +00:00
Chris Lattner 8b30c41219 The definition of __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ follows
the target triple on darwin.  For example i386-apple-darwin9 -> 1050 because
darwin9 is "10.5".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56826 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30 01:00:25 +00:00
Chris Lattner 048dd943fc define __PASCAL_STRINGS__ whenever -fpascal-strings is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56824 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30 00:48:48 +00:00
Chris Lattner 71af229645 __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ is a darwin-specific #define
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56822 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30 00:46:39 +00:00
Steve Naroff fbbe0ac428 Fix <rdar://problem/6247781> Parser rejecting properly mismatched properties.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56821 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30 00:24:17 +00:00
Ted Kremenek 3b844483bb Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56819 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 23:33:12 +00:00
Chris Lattner 4411f46050 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56818 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 23:12:31 +00:00
Ted Kremenek 47fc25f0c1 Really don't add -isysroot twice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56815 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 23:06:09 +00:00
Ted Kremenek e4f6952831 Don't filter out -fpascal-strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56810 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 22:45:28 +00:00
Chris Lattner f77d545fe9 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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56809 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 22:28:25 +00:00
Chris Lattner 5c38b6388d Make some methods const, add some helpers to FullSourceLoc,
and add a dump method to FullSourceLoc!  Patch by Nico Weber!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56806 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 21:46:13 +00:00
Chris Lattner a09f585a7f move ExtVectorElementExpr down into the 'clang extensions' section.
Wrap line to 80 cols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56805 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 21:30:29 +00:00
Ted Kremenek 1b03c01fb1 Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56804 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 21:24:37 +00:00
Steve Naroff 1ac6fddf6f Add a random C99 comment/reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56800 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 20:07:05 +00:00
Ted Kremenek dfd296bae3 Extend 'IsLValType' to handle BlockPointerTypes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56797 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 19:17:30 +00:00
Steve Naroff b440686eee Teach Sema::CheckAssignmentConstraints() to allow assignments between id and block pointer types (^{}).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56793 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 18:10:17 +00:00
Steve Naroff 6c4088e5fc Fix <rdar://problem/6251012> clang: Blocks are objects too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56791 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 16:51:41 +00:00
Ted Kremenek a30730e5cd Discard extra -isysroot options. This fixes:
<rdar://problem/6253141> Parser rejection occurs when command line has more than one -isysroot switch


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56790 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 16:15:20 +00:00
Daniel Dunbar 58df184ef9 Fix braindead bug, ID number was hardcoded.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56789 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 16:06:43 +00:00
Steve Naroff 5e0a74fbf4 Fix <rdar://problem/6253149> property declaration doesn't declare getter and setter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56785 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 14:20:56 +00:00
Nico Weber 48002c8957 whitespace and comment changes, to fix grammar and 80 col violations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56776 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-29 00:25:48 +00:00
Steve Naroff aa5caa17ed Change a NOTE to a FIXME based on feedback from clattner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56775 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 21:07:52 +00:00
Ted Kremenek c9b2d8c809 Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56774 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 17:25:56 +00:00
Steve Naroff e84a864a78 Fix <rdar://problem/6252129> implementation of method in category doesn't effectively declare it for methods below.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56771 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 14:55:53 +00:00
Steve Naroff ae530cfaf6 Fix <rdar://problem/6252108> assigning to argument passed to block should not require __block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56770 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 14:02:55 +00:00
Chris Lattner 891ed9aa87 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56768 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 06:05:35 +00:00
Chris Lattner bd7eb1c3b2 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. 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56767 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 05:54:29 +00:00
Chris Lattner f7037b1c3b Fix rdar://6251437, references to enum constant decls in a block
don't need a BlockDeclRefExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56766 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 05:30:26 +00:00
Ted Kremenek 81983111df Add "Path Length" back to the table of bug reports.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56765 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 04:13:09 +00:00
Steve Naroff 59f5394648 Fix <rdar://problem/6252216> compare block to NULL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56764 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 01:11:11 +00:00
Daniel Dunbar 18ccc7776a Add support for implicit rethrows in @catch blocks.
Comment exception-handling code generation strategy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56763 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 01:03:14 +00:00
Daniel Dunbar ad12b6d643 Skip redundant if.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56762 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 00:19:22 +00:00
Steve Naroff 538afe30e4 Fix <rdar://problem/6252226> parser thinks block argument is undefined identifier in NSServices.m
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56761 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-28 00:13:36 +00:00
Daniel Dunbar e4b5ee0615 (Update LLVM) Clean up obj-c exception generation to be a bit more
readable and to generate more readable IR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56758 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 23:30:04 +00:00
Daniel Dunbar 97f61d14c8 Bug fix, codegen @catch(id<X> ...) acceptably.
- This should be rejected by sema (IMHO) but that needs some
   investigation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56756 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 22:21:14 +00:00
Ted Kremenek 062bae00f8 Revert 56735. The old bug categories were more informative.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56755 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 22:02:42 +00:00
Daniel Dunbar 129271a429 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56754 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 07:36:24 +00:00
Daniel Dunbar f93349f3ec Prefer llvm::Function::addFnAttr(...) to F->addAttribute(~0, ...).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56753 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 07:16:42 +00:00
Daniel Dunbar b01d191a25 Simplify code to emit the unified return block and move it to the end
of the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56752 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 07:15:59 +00:00
Daniel Dunbar 55e40721e7 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56751 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 07:03:52 +00:00
Daniel Dunbar 10004916db Easy fix for nasty bug, exception data buffer had wrong type == wrong
(smaller) size == garbage on stack == heisenbugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56750 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 06:32:25 +00:00
Zhongxing Xu c61255f630 Delete trailing white space. It's over 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56749 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 03:27:29 +00:00
Daniel Dunbar 0cb45f6ea7 Remove automagic substitution of %llvmgcc
- Is unused and somewhat unreliable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56737 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 00:47:03 +00:00
Ted Kremenek 3a7d1e9785 Change "leaks" to have the category "Performance".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56735 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 00:45:27 +00:00
Daniel Dunbar ced4fcb233 Fix function-attributes test case to not rely on llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56734 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 00:44:01 +00:00
Daniel Dunbar d58139e1d4 Fix attributes test case to not run clang umpteen times.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56733 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-27 00:39:13 +00:00
Ted Kremenek 9da13f9ddb 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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56710 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 23:24:14 +00:00
Ted Kremenek e7b8d40020 Forgot to check in header file with last commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56709 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 23:24:05 +00:00
Ted Kremenek 1377e541ea Use a union instead of a bunch of magic casts to implement a variant. This removes the type-punning errors for DeclGroup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56708 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 23:19:04 +00:00