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
Ted Kremenek
928f484c2d
Updated checker build.
...
llvm-svn: 56701
2008-09-26 22:00:01 +00:00
Chris Lattner
b03dc76499
clean up a bunch of fixme's I added, by moving
...
DirectoryLookup::DirType into SourceManager.h
llvm-svn: 56692
2008-09-26 21:18:42 +00:00
Chris Lattner
c88a23e8d7
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.
llvm-svn: 56688
2008-09-26 20:12:23 +00:00
Chris Lattner
71efd8159e
fit in 80 cols.
...
llvm-svn: 56687
2008-09-26 20:05:14 +00:00
Chris Lattner
9627d6720a
alphabetize files
...
llvm-svn: 56673
2008-09-26 18:49:39 +00:00
Ted Kremenek
ac49ea63c6
Do not create CFGs for functions/methods using blocks (need to add control-flow).
...
llvm-svn: 56672
2008-09-26 18:17:07 +00:00
Chris Lattner
6bea488c79
testcase for my previous patch.
...
llvm-svn: 56670
2008-09-26 18:07:51 +00:00
Chris Lattner
e744d32b72
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.
llvm-svn: 56669
2008-09-26 17:46:45 +00:00
Ted Kremenek
68d2190226
Enter a new scope for a @try block.
...
llvm-svn: 56668
2008-09-26 17:32:47 +00:00
Ted Kremenek
a69637ba6d
Updated checker build.
...
llvm-svn: 56666
2008-09-26 17:04:34 +00:00
Ted Kremenek
61a625ff70
Move VLA processing logic from LiveVariables to CFG construction. This way all dataflow analyses "see" the VLA size expressions.
...
llvm-svn: 56655
2008-09-26 16:26:36 +00:00
Steve Naroff
ba756cb3fc
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.
llvm-svn: 56652
2008-09-26 14:41:28 +00:00
Ted Kremenek
2ece64bbc4
Examine VLA size expressions when computing liveness information.
...
Fixes <rdar://problem/6248086>
llvm-svn: 56645
2008-09-26 05:52:45 +00:00
Daniel Dunbar
08971bf2c4
Change Radar reproducibility to "Always".
...
llvm-svn: 56644
2008-09-26 05:00:28 +00:00
Daniel Dunbar
26e2ab4a37
Parser support for prefix __attribute__ on @protocol.
...
llvm-svn: 56642
2008-09-26 04:48:09 +00:00