]> granicus.if.org Git - clang/log
clang
16 years agoUpdate checker build.
Ted Kremenek [Mon, 29 Sep 2008 21:24:37 +0000 (21:24 +0000)]
Update checker build.

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

16 years agoAdd a random C99 comment/reference.
Steve Naroff [Mon, 29 Sep 2008 20:07:05 +0000 (20:07 +0000)]
Add a random C99 comment/reference.

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

16 years agoExtend 'IsLValType' to handle BlockPointerTypes.
Ted Kremenek [Mon, 29 Sep 2008 19:17:30 +0000 (19:17 +0000)]
Extend 'IsLValType' to handle BlockPointerTypes.

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

16 years agoTeach Sema::CheckAssignmentConstraints() to allow assignments between id and block...
Steve Naroff [Mon, 29 Sep 2008 18:10:17 +0000 (18:10 +0000)]
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

16 years agoFix <rdar://problem/6251012> clang: Blocks are objects too.
Steve Naroff [Mon, 29 Sep 2008 16:51:41 +0000 (16:51 +0000)]
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

16 years agoDiscard extra -isysroot options. This fixes:
Ted Kremenek [Mon, 29 Sep 2008 16:15:20 +0000 (16:15 +0000)]
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

16 years agoFix braindead bug, ID number was hardcoded.
Daniel Dunbar [Mon, 29 Sep 2008 16:06:43 +0000 (16:06 +0000)]
Fix braindead bug, ID number was hardcoded.

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

16 years agoFix <rdar://problem/6253149> property declaration doesn't declare getter and setter.
Steve Naroff [Mon, 29 Sep 2008 14:20:56 +0000 (14:20 +0000)]
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

16 years agowhitespace and comment changes, to fix grammar and 80 col violations
Nico Weber [Mon, 29 Sep 2008 00:25:48 +0000 (00:25 +0000)]
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

16 years agoChange a NOTE to a FIXME based on feedback from clattner.
Steve Naroff [Sun, 28 Sep 2008 21:07:52 +0000 (21:07 +0000)]
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

16 years agoUpdated checker build.
Ted Kremenek [Sun, 28 Sep 2008 17:25:56 +0000 (17:25 +0000)]
Updated checker build.

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

16 years agoFix <rdar://problem/6252129> implementation of method in category doesn't effectively...
Steve Naroff [Sun, 28 Sep 2008 14:55:53 +0000 (14:55 +0000)]
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

16 years agoFix <rdar://problem/6252108> assigning to argument passed to block should not require...
Steve Naroff [Sun, 28 Sep 2008 14:02:55 +0000 (14:02 +0000)]
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

16 years agoFix rdar://6252231 - cannot call vsnprintf with va_list on x86_64,
Chris Lattner [Sun, 28 Sep 2008 06:05:35 +0000 (06:05 +0000)]
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

16 years agoReplace a comparison with a static list of builtins that was wrong (it
Chris Lattner [Sun, 28 Sep 2008 05:54:29 +0000 (05:54 +0000)]
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

16 years agoFix rdar://6251437, references to enum constant decls in a block
Chris Lattner [Sun, 28 Sep 2008 05:30:26 +0000 (05:30 +0000)]
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

16 years agoAdd "Path Length" back to the table of bug reports.
Ted Kremenek [Sun, 28 Sep 2008 04:13:09 +0000 (04:13 +0000)]
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

16 years agoFix <rdar://problem/6252216> compare block to NULL.
Steve Naroff [Sun, 28 Sep 2008 01:11:11 +0000 (01:11 +0000)]
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

16 years agoAdd support for implicit rethrows in @catch blocks.
Daniel Dunbar [Sun, 28 Sep 2008 01:03:14 +0000 (01:03 +0000)]
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

16 years agoSkip redundant if.
Daniel Dunbar [Sun, 28 Sep 2008 00:19:22 +0000 (00:19 +0000)]
Skip redundant if.

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

16 years agoFix <rdar://problem/6252226> parser thinks block argument is undefined identifier...
Steve Naroff [Sun, 28 Sep 2008 00:13:36 +0000 (00:13 +0000)]
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

16 years ago(Update LLVM) Clean up obj-c exception generation to be a bit more
Daniel Dunbar [Sat, 27 Sep 2008 23:30:04 +0000 (23:30 +0000)]
(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

16 years agoBug fix, codegen @catch(id<X> ...) acceptably.
Daniel Dunbar [Sat, 27 Sep 2008 22:21:14 +0000 (22:21 +0000)]
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

16 years agoRevert 56735. The old bug categories were more informative.
Ted Kremenek [Sat, 27 Sep 2008 22:02:42 +0000 (22:02 +0000)]
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

16 years agoSimplify generate code for exceptions:
Daniel Dunbar [Sat, 27 Sep 2008 07:36:24 +0000 (07:36 +0000)]
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

16 years agoPrefer llvm::Function::addFnAttr(...) to F->addAttribute(~0, ...).
Daniel Dunbar [Sat, 27 Sep 2008 07:16:42 +0000 (07:16 +0000)]
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

16 years agoSimplify code to emit the unified return block and move it to the end
Daniel Dunbar [Sat, 27 Sep 2008 07:15:59 +0000 (07:15 +0000)]
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

16 years agoBug fix, make sure to initialize exception object (to rethrow) even
Daniel Dunbar [Sat, 27 Sep 2008 07:03:52 +0000 (07:03 +0000)]
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

16 years agoEasy fix for nasty bug, exception data buffer had wrong type == wrong
Daniel Dunbar [Sat, 27 Sep 2008 06:32:25 +0000 (06:32 +0000)]
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

16 years agoDelete trailing white space. It's over 80 columns.
Zhongxing Xu [Sat, 27 Sep 2008 03:27:29 +0000 (03:27 +0000)]
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

16 years agoRemove automagic substitution of %llvmgcc
Daniel Dunbar [Sat, 27 Sep 2008 00:47:03 +0000 (00:47 +0000)]
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

16 years agoChange "leaks" to have the category "Performance".
Ted Kremenek [Sat, 27 Sep 2008 00:45:27 +0000 (00:45 +0000)]
Change "leaks" to have the category "Performance".

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

16 years agoFix function-attributes test case to not rely on llvm-gcc.
Daniel Dunbar [Sat, 27 Sep 2008 00:44:01 +0000 (00:44 +0000)]
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

16 years agoFix attributes test case to not run clang umpteen times.
Daniel Dunbar [Sat, 27 Sep 2008 00:39:13 +0000 (00:39 +0000)]
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

16 years agoInternally store the body of a BlockExpr using a Stmt* instead of a CompoundStmt...
Ted Kremenek [Fri, 26 Sep 2008 23:24:14 +0000 (23:24 +0000)]
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

16 years agoForgot to check in header file with last commit.
Ted Kremenek [Fri, 26 Sep 2008 23:24:05 +0000 (23:24 +0000)]
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

16 years agoUse a union instead of a bunch of magic casts to implement a variant. This removes...
Ted Kremenek [Fri, 26 Sep 2008 23:19:04 +0000 (23:19 +0000)]
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

16 years agoAdd more control-flow to test case.
Ted Kremenek [Fri, 26 Sep 2008 23:05:47 +0000 (23:05 +0000)]
Add more control-flow to test case.

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

16 years agoAdd CFG support for implicit-control flow for VLA size expressions within an SizeOfAl...
Ted Kremenek [Fri, 26 Sep 2008 22:58:57 +0000 (22:58 +0000)]
Add CFG support for implicit-control flow for VLA size expressions within an SizeOfAlignOfTypeExpr.

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

16 years agoNow Attributes are divided in three groups
Devang Patel [Fri, 26 Sep 2008 22:53:57 +0000 (22:53 +0000)]
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.

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

16 years agoUpdated checker build.
Ted Kremenek [Fri, 26 Sep 2008 22:00:01 +0000 (22:00 +0000)]
Updated checker build.

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

16 years agoclean up a bunch of fixme's I added, by moving
Chris Lattner [Fri, 26 Sep 2008 21:18:42 +0000 (21:18 +0000)]
clean up a bunch of fixme's I added, by moving
DirectoryLookup::DirType into SourceManager.h

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

16 years agoFix the rest of rdar://6243860 hopefully. This requires changing FileIDInfo
Chris Lattner [Fri, 26 Sep 2008 20:12:23 +0000 (20:12 +0000)]
Fix the rest of rdar://6243860 hopefully.  This requires changing FileIDInfo
to whether the fileid is a 'extern c system header' in addition to whether it
is a system header, most of this is spreading plumbing around.  Once we have that,
PPLexerChange bases its "file enter/exit" notifications to PPCallbacks to
base the system header state on FileIDInfo instead of HeaderSearch.  Finally,
in Preprocessor::HandleIncludeDirective, mirror logic in GCC: the system headerness
of a file being entered can be set due to the #includer or the #includee.

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

16 years agofit in 80 cols.
Chris Lattner [Fri, 26 Sep 2008 20:05:14 +0000 (20:05 +0000)]
fit in 80 cols.

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

16 years agoalphabetize files
Chris Lattner [Fri, 26 Sep 2008 18:49:39 +0000 (18:49 +0000)]
alphabetize files

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

16 years agoDo not create CFGs for functions/methods using blocks (need to add control-flow).
Ted Kremenek [Fri, 26 Sep 2008 18:17:07 +0000 (18:17 +0000)]
Do not create CFGs for functions/methods using blocks (need to add control-flow).

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

16 years agotestcase for my previous patch.
Chris Lattner [Fri, 26 Sep 2008 18:07:51 +0000 (18:07 +0000)]
testcase for my previous patch.

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

16 years agoemulate a bit of GCC path lookup weirdness: if a system
Chris Lattner [Fri, 26 Sep 2008 17:46:45 +0000 (17:46 +0000)]
emulate a bit of GCC path lookup weirdness: if a system
directory is shadowed by a user directory in the lookup
path, ignore the user directory not the system one.  Not
doing this can affect file lookup and the "is a system
header" bit on locations.  For example:
  clang -v -I/usr/include inc.c -E | & grep /usr/inc
now prints:

# 1 "/usr/include/i386/_types.h" 1 3 4
# 37 "/usr/include/i386/_types.h" 3 4
# 70 "/usr/include/i386/_types.h" 3 4

instead of:

# 1 "/usr/include/i386/_types.h" 1
# 37 "/usr/include/i386/_types.h"
# 70 "/usr/include/i386/_types.h"

This is part of rdar://6243860.

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

16 years agoEnter a new scope for a @try block.
Ted Kremenek [Fri, 26 Sep 2008 17:32:47 +0000 (17:32 +0000)]
Enter a new scope for a @try block.

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

16 years agoUpdated checker build.
Ted Kremenek [Fri, 26 Sep 2008 17:04:34 +0000 (17:04 +0000)]
Updated checker build.

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

16 years agoMove VLA processing logic from LiveVariables to CFG construction. This way all dataf...
Ted Kremenek [Fri, 26 Sep 2008 16:26:36 +0000 (16:26 +0000)]
Move VLA processing logic from LiveVariables to CFG construction.  This way all dataflow analyses "see" the VLA size expressions.

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

16 years agoTweak Expr::isModifiableLvalue() and Expr::isLvalue() to better deal with BlockDeclRe...
Steve Naroff [Fri, 26 Sep 2008 14:41:28 +0000 (14:41 +0000)]
Tweak Expr::isModifiableLvalue() and Expr::isLvalue() to better deal with BlockDeclRef exprs.

This fixes <rdar://problem/6248392> clang: Error when using address of stack variable inside block.

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

16 years agoExamine VLA size expressions when computing liveness information.
Ted Kremenek [Fri, 26 Sep 2008 05:52:45 +0000 (05:52 +0000)]
Examine VLA size expressions when computing liveness information.
Fixes <rdar://problem/6248086>

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

16 years agoChange Radar reproducibility to "Always".
Daniel Dunbar [Fri, 26 Sep 2008 05:00:28 +0000 (05:00 +0000)]
Change Radar reproducibility to "Always".

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

16 years agoParser support for prefix __attribute__ on @protocol.
Daniel Dunbar [Fri, 26 Sep 2008 04:48:09 +0000 (04:48 +0000)]
Parser support for prefix __attribute__ on @protocol.

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

16 years agoSema support for format and noreturn attributes on Objective-C methods.
Daniel Dunbar [Fri, 26 Sep 2008 04:12:28 +0000 (04:12 +0000)]
Sema support for format and noreturn attributes on Objective-C methods.

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

16 years agoAdd support for CFString in format attribute.
Daniel Dunbar [Fri, 26 Sep 2008 03:32:58 +0000 (03:32 +0000)]
Add support for CFString in format attribute.

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

16 years agoAdd # of block pointer types to -print-stats.
Daniel Dunbar [Fri, 26 Sep 2008 03:23:00 +0000 (03:23 +0000)]
Add # of block pointer types to -print-stats.

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

16 years agoMake clang preprocessed output a bit more like gcc output.
Daniel Dunbar [Fri, 26 Sep 2008 01:13:35 +0000 (01:13 +0000)]
Make clang preprocessed output a bit more like gcc output.

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

16 years agoUpdate clang to pretend to be gcc-4.2.
Daniel Dunbar [Fri, 26 Sep 2008 01:13:13 +0000 (01:13 +0000)]
Update clang to pretend to be gcc-4.2.
 - This really needs to be automated and configurable.

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

16 years agoComment fix.
Daniel Dunbar [Fri, 26 Sep 2008 01:11:51 +0000 (01:11 +0000)]
Comment fix.

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

16 years agoUpdated checker build.
Ted Kremenek [Fri, 26 Sep 2008 00:50:00 +0000 (00:50 +0000)]
Updated checker build.

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

16 years agoHave @finally introduce a new scope.
Ted Kremenek [Fri, 26 Sep 2008 00:31:16 +0000 (00:31 +0000)]
Have @finally introduce a new scope.
Fixes: <rdar://problem/6248119> @finally doesn't introduce a new scope
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56629 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago Large mechanical patch.
Devang Patel [Thu, 25 Sep 2008 21:02:23 +0000 (21:02 +0000)]
 Large mechanical patch.

s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g

This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.

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

16 years agoEmulate gcc driver-driver functionality: run analyzer separately for each separate...
Ted Kremenek [Thu, 25 Sep 2008 20:17:57 +0000 (20:17 +0000)]
Emulate gcc driver-driver functionality: run analyzer separately for each separate -arch option.

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

16 years agoDisable report crashes link for the time being.
Daniel Dunbar [Thu, 25 Sep 2008 19:59:17 +0000 (19:59 +0000)]
Disable report crashes link for the time being.

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

16 years agoUpdate Xcode project.
Ted Kremenek [Thu, 25 Sep 2008 17:13:59 +0000 (17:13 +0000)]
Update Xcode project.

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

16 years agoAdded prototype implementation of the DeclGroup, DeclGroupRef, and DeclGroupOwningRef...
Ted Kremenek [Thu, 25 Sep 2008 17:13:40 +0000 (17:13 +0000)]
Added prototype implementation of the DeclGroup, DeclGroupRef, and DeclGroupOwningRef classes.
Documentation and testing are pending.

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

16 years agoAdd link to report analyzer failures (parse errors, asserts, etc).
Daniel Dunbar [Thu, 25 Sep 2008 06:05:31 +0000 (06:05 +0000)]
Add link to report analyzer failures (parse errors, asserts, etc).

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

16 years agoUpdate scan-build to add markers about crashes.
Daniel Dunbar [Thu, 25 Sep 2008 01:10:50 +0000 (01:10 +0000)]
Update scan-build to add markers about crashes.

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

16 years agoInclude clang preprocessed sources as well with "crashes" output.
Ted Kremenek [Thu, 25 Sep 2008 00:51:44 +0000 (00:51 +0000)]
Include clang preprocessed sources as well with "crashes" output.

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

16 years agoUse .txt extension for info files.
Ted Kremenek [Thu, 25 Sep 2008 00:25:16 +0000 (00:25 +0000)]
Use .txt extension for info files.

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

16 years agoDowngrade incompatible block pointer error to a warning (to be consistent with incomp...
Steve Naroff [Wed, 24 Sep 2008 23:31:10 +0000 (23:31 +0000)]
Downgrade incompatible block pointer error to a warning (to be consistent with incompatible pointer warnings in general).

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

16 years agoFix a couple harmless warnings when compiling optimized with gcc (reported by mrs...
Steve Naroff [Wed, 24 Sep 2008 22:46:45 +0000 (22:46 +0000)]
Fix a couple harmless warnings when compiling optimized with gcc (reported by mrs@apple.com).

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

16 years agoFix <rdar://problem/6243788> clang: Incorrect return statement for Blocks?
Steve Naroff [Wed, 24 Sep 2008 22:26:48 +0000 (22:26 +0000)]
Fix <rdar://problem/6243788> clang: Incorrect return statement for Blocks?

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

16 years agoAdd more testing of Obj-C property synthesis.
Daniel Dunbar [Wed, 24 Sep 2008 18:00:13 +0000 (18:00 +0000)]
Add more testing of Obj-C property synthesis.

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

16 years agoAdd scan-view '--allow-all-hosts' option, by default access is now
Daniel Dunbar [Wed, 24 Sep 2008 17:59:41 +0000 (17:59 +0000)]
Add scan-view '--allow-all-hosts' option, by default access is now
restricted to 127.0.0.1.

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

16 years agoUpdate checker build.
Ted Kremenek [Wed, 24 Sep 2008 17:45:52 +0000 (17:45 +0000)]
Update checker build.

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

16 years agoFix some const-ness to keep the VisualStudio C++ compiler happy.
Steve Naroff [Wed, 24 Sep 2008 17:22:34 +0000 (17:22 +0000)]
Fix some const-ness to keep the VisualStudio C++ compiler happy.

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

16 years agoExtend ASTContext::getTypeInfo() and ASTContext::getObjCEncodingForType() for BlockTypes.
Steve Naroff [Wed, 24 Sep 2008 15:05:44 +0000 (15:05 +0000)]
Extend ASTContext::getTypeInfo() and ASTContext::getObjCEncodingForType() for BlockTypes.

This fixes <rdar://problem/6240616> clang: Assertion failed when using typedef and Blocks.

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

16 years agoUpdated test case.
Ted Kremenek [Wed, 24 Sep 2008 06:40:03 +0000 (06:40 +0000)]
Updated test case.

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

16 years agoImplement Obj-C synthesized setters for copy / retain.
Daniel Dunbar [Wed, 24 Sep 2008 06:32:09 +0000 (06:32 +0000)]
Implement Obj-C synthesized setters for copy / retain.

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

16 years agoImplement Obj-C getter synthesis for copy and retain.
Daniel Dunbar [Wed, 24 Sep 2008 04:04:31 +0000 (04:04 +0000)]
Implement Obj-C getter synthesis for copy and retain.

Also, "simple" getter synthesis no longer uses temporary AST objects.

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

16 years agoRefactor some CodeGen functionality:
Daniel Dunbar [Wed, 24 Sep 2008 04:00:38 +0000 (04:00 +0000)]
Refactor some CodeGen functionality:
 - Add CodeGenFunction::{EmitReturnOfRValue, EmitIvarOffset}
 - Factor EmitLValueForIvar out of EmitObjCIvarRefLValue.

No non-error functionality change (some unsupported errors are
degraded to asserts for the time being).

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

16 years agoAdd Obj-C runtime methods to get runtime specific functions for
Daniel Dunbar [Wed, 24 Sep 2008 03:38:44 +0000 (03:38 +0000)]
Add Obj-C runtime methods to get runtime specific functions for
implementing property access.

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

16 years agoAdjust whitespaces.
Devang Patel [Wed, 24 Sep 2008 01:03:00 +0000 (01:03 +0000)]
Adjust whitespaces.

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

16 years agos/ParamAttrsWithIndex/FnAttributeWithIndex/g
Devang Patel [Wed, 24 Sep 2008 01:01:36 +0000 (01:01 +0000)]
s/ParamAttrsWithIndex/FnAttributeWithIndex/g

Rename to match changes done on llvm side.

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

16 years agoFor generated index.html, look for "scan-view.css", not "/scan-view.css"
Ted Kremenek [Tue, 23 Sep 2008 22:34:51 +0000 (22:34 +0000)]
For generated index.html, look for "scan-view.css", not "/scan-view.css"

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

16 years agoImplement type checking of Objective-C property attributes.
Daniel Dunbar [Tue, 23 Sep 2008 21:53:23 +0000 (21:53 +0000)]
Implement type checking of Objective-C property attributes.
 - readonly and readwrite are mutually exclusive.
 - assign, copy, and retain are mutually exclusive.
 - copy and retain are invalid on non-object types.
 - Warn about using default 'assign' property on object types
   (attempting to follow gcc behavior).

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

16 years agoFix <rdar://problem/6240065> clang: __BLOCKS__ should be defined.
Steve Naroff [Tue, 23 Sep 2008 21:28:24 +0000 (21:28 +0000)]
Fix <rdar://problem/6240065> clang: __BLOCKS__ should be defined.

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

16 years agoRewriteBlocks::RewriteBlockPointerDecl(): Handle TypedefDecl's and VarDecl's uniformly.
Steve Naroff [Tue, 23 Sep 2008 21:15:53 +0000 (21:15 +0000)]
RewriteBlocks::RewriteBlockPointerDecl(): Handle TypedefDecl's and VarDecl's uniformly.

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

16 years agoTeach block rewriter to replace '^' with '*' in VarDecls.
Steve Naroff [Tue, 23 Sep 2008 19:24:41 +0000 (19:24 +0000)]
Teach block rewriter to replace '^' with '*' in VarDecls.

Since we don't have DeclGroup's and location information for types, there is some fancy footwork to do this fairly reliably.

O.K...it's a kludge. One day, we can use this as motivation to do this more gracefully:-)

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

16 years agoAdded test case.
Ted Kremenek [Tue, 23 Sep 2008 18:05:01 +0000 (18:05 +0000)]
Added test case.

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

16 years agoFix PR 2819: Compute dataflow values for all CFG blocks by not relying on having...
Ted Kremenek [Tue, 23 Sep 2008 18:02:10 +0000 (18:02 +0000)]
Fix PR 2819: Compute dataflow values for all CFG blocks by not relying on having the "Exit" block being reachable by all (or any) of the blocks in the CFG.

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

16 years agoAdd x86_64 Linux target.
Daniel Dunbar [Tue, 23 Sep 2008 17:37:57 +0000 (17:37 +0000)]
Add x86_64 Linux target.
  - PR2824

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

16 years agoUpdated checker build.
Ted Kremenek [Tue, 23 Sep 2008 00:30:34 +0000 (00:30 +0000)]
Updated checker build.

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

16 years agoBug fix, result of isIntegerConstantExpr could be of incorrect width
Daniel Dunbar [Mon, 22 Sep 2008 23:53:24 +0000 (23:53 +0000)]
Bug fix, result of isIntegerConstantExpr could be of incorrect width
for type.
  - PR2817

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

16 years agoscan-view: Add header and "report bug" links to report pages.
Daniel Dunbar [Mon, 22 Sep 2008 21:43:43 +0000 (21:43 +0000)]
scan-view: Add header and "report bug" links to report pages.

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

16 years agoscan-view: Add links to open files using default file handler.
Daniel Dunbar [Mon, 22 Sep 2008 18:44:46 +0000 (18:44 +0000)]
scan-view: Add links to open files using default file handler.

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

16 years agoYank out special CSS for button rendering (not very portable or well tested, and...
Ted Kremenek [Mon, 22 Sep 2008 18:14:23 +0000 (18:14 +0000)]
Yank out special CSS for button rendering (not very portable or well tested, and we were encountering race conditions with CSS loading).

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