]> granicus.if.org Git - clang/log
clang
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

16 years agoscan-view: Update for "button" class change, drop magic resolution of
Daniel Dunbar [Mon, 22 Sep 2008 18:05:49 +0000 (18:05 +0000)]
scan-view: Update for "button" class change, drop magic resolution of
"scanview.css", start action for opening files.

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

16 years agoReintegrate Daniel's changes.
Ted Kremenek [Mon, 22 Sep 2008 18:05:05 +0000 (18:05 +0000)]
Reintegrate Daniel's changes.

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

16 years agoRemoved scan-view's version of scanview.css.
Ted Kremenek [Mon, 22 Sep 2008 17:55:14 +0000 (17:55 +0000)]
Removed scan-view's version of scanview.css.

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

16 years agoAdd "SUMMARYENDHEAD" tag.
Ted Kremenek [Mon, 22 Sep 2008 17:52:58 +0000 (17:52 +0000)]
Add "SUMMARYENDHEAD" tag.

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

16 years agoDon't embed CSS inside scan-build script; use external scanview.css.
Ted Kremenek [Mon, 22 Sep 2008 17:50:47 +0000 (17:50 +0000)]
Don't embed CSS inside scan-build script; use external scanview.css.

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

16 years agoDon't emit link to source file.
Ted Kremenek [Mon, 22 Sep 2008 17:42:31 +0000 (17:42 +0000)]
Don't emit link to source file.

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

16 years agoMake "View Report" just a normal link again.
Ted Kremenek [Mon, 22 Sep 2008 17:39:18 +0000 (17:39 +0000)]
Make "View Report" just a normal link again.

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

16 years agoDon't print out the path length.
Ted Kremenek [Mon, 22 Sep 2008 17:38:23 +0000 (17:38 +0000)]
Don't print out the path length.

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

16 years agoOutput "REPORTHEADER" and "REPORTSUMMARYEXTRA" tags for use with scan-view.
Ted Kremenek [Mon, 22 Sep 2008 17:33:32 +0000 (17:33 +0000)]
Output "REPORTHEADER" and "REPORTSUMMARYEXTRA" tags for use with scan-view.

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

16 years agonot executable
Nuno Lopes [Mon, 22 Sep 2008 17:26:14 +0000 (17:26 +0000)]
not executable

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

16 years agoRemove unused slot/reference and update Sema::ActOnIdentifierExpr().
Steve Naroff [Mon, 22 Sep 2008 15:31:56 +0000 (15:31 +0000)]
Remove unused slot/reference and update Sema::ActOnIdentifierExpr().

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

16 years agoFix http://llvm.org/bugs/show_bug.cgi?id=2816.
Steve Naroff [Mon, 22 Sep 2008 10:28:57 +0000 (10:28 +0000)]
Fix http://llvm.org/bugs/show_bug.cgi?id=2816.

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

16 years agoUse scan-view to view reports. Opening index.html is deprecated.
Ted Kremenek [Mon, 22 Sep 2008 06:47:01 +0000 (06:47 +0000)]
Use scan-view to view reports.  Opening index.html is deprecated.

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

16 years agoUpdated checker build
Ted Kremenek [Mon, 22 Sep 2008 06:11:08 +0000 (06:11 +0000)]
Updated checker build

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

16 years agoscan-view: Add links from bug reporting forms to report & summary pages.
Daniel Dunbar [Mon, 22 Sep 2008 03:08:32 +0000 (03:08 +0000)]
scan-view: Add links from bug reporting forms to report & summary pages.

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

16 years agoscan-view: Search for available port if default is unavailable.
Daniel Dunbar [Mon, 22 Sep 2008 02:53:12 +0000 (02:53 +0000)]
scan-view: Search for available port if default is unavailable.

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

16 years agoscan-view: Store bug reporter defaults in ~/.scanview.cfg
Daniel Dunbar [Mon, 22 Sep 2008 02:27:45 +0000 (02:27 +0000)]
scan-view: Store bug reporter defaults in ~/.scanview.cfg

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

16 years agoscan-view tweak
Daniel Dunbar [Mon, 22 Sep 2008 01:42:08 +0000 (01:42 +0000)]
scan-view tweak
 - Require index.html in provided results directory.

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

16 years agoscan-view tweaks
Daniel Dunbar [Mon, 22 Sep 2008 01:40:14 +0000 (01:40 +0000)]
scan-view tweaks
 - Use more correct HTTP error codes on (unexpected) errors.

 - Use onLoad to set ensure bug submission method gets set correctly.

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

16 years agoPatch from Richard Godbee:
Ted Kremenek [Mon, 22 Sep 2008 01:35:58 +0000 (01:35 +0000)]
Patch from Richard Godbee:

Improve scan-build results to include the user's host name, the working
directory of the analyzed project, and the date the analysis run took place.

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

16 years agoImprove scan-view report bug (submitted) interface.
Daniel Dunbar [Mon, 22 Sep 2008 01:21:30 +0000 (01:21 +0000)]
Improve scan-view report bug (submitted) interface.

Give more meaningful error messages / fail gracefully on bad form
input or SMTP errors.

Use button for Report Bug link (where available).

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

16 years agoImprove scan-view report bug interface.
Daniel Dunbar [Mon, 22 Sep 2008 00:11:51 +0000 (00:11 +0000)]
Improve scan-view report bug interface.
 - Pulled css out into Resources/scanview.css

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

16 years agoscan-view tweaks:
Daniel Dunbar [Sun, 21 Sep 2008 23:02:25 +0000 (23:02 +0000)]
scan-view tweaks:
 - Add simple favicon
 - Allow resolving source file paths (should be rethought)

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

16 years agoscan-view tweaks:
Daniel Dunbar [Sun, 21 Sep 2008 20:34:58 +0000 (20:34 +0000)]
scan-view tweaks:
 - Update for scan-build table change.
 - Add --auto-reload option (for development, avoids need to restart
   server).
 - Always send Last-Modified, with a reasonable value for dynamic content.

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