Chris Lattner
f30f2896f6
alphabetize files
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56673 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 18:49:39 +00:00
Ted Kremenek
00c0a30acd
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
2008-09-26 18:17:07 +00:00
Chris Lattner
22e6dd79ec
testcase for my previous patch.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56670 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 18:07:51 +00:00
Chris Lattner
7a73940198
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
2008-09-26 17:46:45 +00:00
Ted Kremenek
3527b59f24
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
2008-09-26 17:32:47 +00:00
Ted Kremenek
640c14c1f7
Updated checker build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56666 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 17:04:34 +00:00
Ted Kremenek
fcd06f77be
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
2008-09-26 16:26:36 +00:00
Steve Naroff
4f6a7d7ead
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
2008-09-26 14:41:28 +00:00
Ted Kremenek
84fa6b90ab
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
2008-09-26 05:52:45 +00:00
Daniel Dunbar
15d671902d
Change Radar reproducibility to "Always".
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56644 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 05:00:28 +00:00
Daniel Dunbar
246e70f69c
Parser support for prefix __attribute__ on @protocol.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56642 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 04:48:09 +00:00
Daniel Dunbar
3568249c2d
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
2008-09-26 04:12:28 +00:00
Daniel Dunbar
085e8f7da3
Add support for CFString in format attribute.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56639 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 03:32:58 +00:00
Daniel Dunbar
248e1c01d3
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
2008-09-26 03:23:00 +00:00
Daniel Dunbar
fd96684034
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
2008-09-26 01:13:35 +00:00
Daniel Dunbar
38a67c9dfb
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
2008-09-26 01:13:13 +00:00
Daniel Dunbar
e9eb3f88b8
Comment fix.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56634 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 01:11:51 +00:00
Ted Kremenek
ed736be188
Updated checker build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56633 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 00:50:00 +00:00
Ted Kremenek
aefc36656d
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
2008-09-26 00:31:16 +00:00
Devang Patel
761d7f78e2
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
2008-09-25 21:02:23 +00:00
Ted Kremenek
27783eb8a0
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
2008-09-25 20:17:57 +00:00
Daniel Dunbar
b5f9a4ea17
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
2008-09-25 19:59:17 +00:00
Ted Kremenek
bb83ad2b5e
Update Xcode project.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56612 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 17:13:59 +00:00
Ted Kremenek
d17062cc23
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
2008-09-25 17:13:40 +00:00
Daniel Dunbar
7ebe0ed444
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
2008-09-25 06:05:31 +00:00
Daniel Dunbar
ce723ce234
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
2008-09-25 01:10:50 +00:00
Ted Kremenek
c3998fa64e
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
2008-09-25 00:51:44 +00:00
Ted Kremenek
82a1253077
Use .txt extension for info files.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56598 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-25 00:25:16 +00:00
Steve Naroff
ba80c9abcc
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
2008-09-24 23:31:10 +00:00
Steve Naroff
cc2ece2e36
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
2008-09-24 22:46:45 +00:00
Steve Naroff
16564420ff
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
2008-09-24 22:26:48 +00:00
Daniel Dunbar
739a36be30
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
2008-09-24 18:00:13 +00:00
Daniel Dunbar
f6a415fe47
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
2008-09-24 17:59:41 +00:00
Ted Kremenek
3b38e45779
Update checker build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56562 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 17:45:52 +00:00
Steve Naroff
1f6c3aebff
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
2008-09-24 17:22:34 +00:00
Steve Naroff
485eeff9ba
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
2008-09-24 15:05:44 +00:00
Ted Kremenek
cafd9089a4
Updated test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56548 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 06:40:03 +00:00
Daniel Dunbar
86957eb200
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
2008-09-24 06:32:09 +00:00
Daniel Dunbar
c1cf4a579f
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
2008-09-24 04:04:31 +00:00
Daniel Dunbar
29e0bccf2b
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
2008-09-24 04:00:38 +00:00
Daniel Dunbar
49f6602707
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
2008-09-24 03:38:44 +00:00
Devang Patel
0fb1d15c37
Adjust whitespaces.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56538 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 01:03:00 +00:00
Devang Patel
d0646bd7c1
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
2008-09-24 01:01:36 +00:00
Ted Kremenek
f143545ce5
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
2008-09-23 22:34:51 +00:00
Daniel Dunbar
95e61fb7cd
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
2008-09-23 21:53:23 +00:00
Steve Naroff
dca6d6e8b0
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
2008-09-23 21:28:24 +00:00
Steve Naroff
ca3bb4f14f
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
2008-09-23 21:15:53 +00:00
Steve Naroff
eab5f63207
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
2008-09-23 19:24:41 +00:00
Ted Kremenek
d1f5ff717d
Added test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56493 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-23 18:05:01 +00:00
Ted Kremenek
fa708259cb
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
2008-09-23 18:02:10 +00:00