Steve Naroff
3d38a68b06
Fix <rdar://problem/7490212> clang rewriter: return of the mixed line endings, which is
...
related to <rdar://problem/6596843> clang ObjC rewriter: Line endings still mixed in rewrite output
This fix was dropped when I integrated the 'objective-rewrite' branch.
llvm-svn: 92737
2010-01-05 17:33:23 +00:00
Zhongxing Xu
f22afe32f9
Move test case to a more appropriate file.
...
llvm-svn: 92725
2010-01-05 11:49:21 +00:00
Zhongxing Xu
e6a238b1df
Add test case.
...
llvm-svn: 92724
2010-01-05 11:47:58 +00:00
Zhongxing Xu
662ba69a15
Revert r92318. Instead fix the analyzer: do not call
...
ASTContext::hasSameUnqualifiedType() when one of the type is VariableArrayType.
llvm-svn: 92723
2010-01-05 09:27:03 +00:00
Zhongxing Xu
cd321a3544
if an arraytype is canonical, then its element is guaranteed to be canonical.
...
llvm-svn: 92715
2010-01-05 08:15:06 +00:00
Nate Begeman
0e1a625fe4
Allow clang to pass -x cl through to compiler driver.
...
llvm-svn: 92686
2010-01-05 06:00:15 +00:00
Anders Carlsson
a0b025e40f
When emitting member function pointers, use the canonical decl if the member function is virtual. Fixes PR5940.
...
llvm-svn: 92680
2010-01-05 05:04:05 +00:00
Mike Stump
d4c4fc4440
Add a radar reference.
...
llvm-svn: 92678
2010-01-05 03:16:33 +00:00
Mike Stump
8971a86538
Disallow captured arrays in blocks as well. Radar 7438948.
...
llvm-svn: 92677
2010-01-05 03:10:36 +00:00
Mike Stump
7dafa0d048
Disallow capturing vlas inside blocks.
...
llvm-svn: 92676
2010-01-05 02:56:35 +00:00
Ted Kremenek
acd71a4562
Make static analysis support for C++ 'this' expression context-sensitive. Essentially treat 'this' as a implicit parameter to the method call, and associate a region with it.
...
llvm-svn: 92675
2010-01-05 02:18:06 +00:00
Chris Lattner
579b551058
fix a bug mike noticed.
...
llvm-svn: 92559
2010-01-05 01:23:25 +00:00
Fariborz Jahanian
8c07e75a61
More rewriting of __block objective-c pointer variables. wip.
...
llvm-svn: 92558
2010-01-05 01:16:51 +00:00
Ted Kremenek
68872c9e26
Remove stale comment. We already do format string checking for functions with the format attribute.
...
llvm-svn: 92553
2010-01-05 00:37:42 +00:00
Mike Stump
f86bf4abfa
Fix warnings.
...
llvm-svn: 92551
2010-01-05 00:29:29 +00:00
Ted Kremenek
de8e7447b6
Remove references to 'Checker' and 'GRTransferFuncs' from
...
GRStateManager. Having these references was an abstraction violation,
as they really should only be known about GRExprEngine.
This change required adding a new 'ProcessAssume' callback in
GRSubEngine. GRExprEngine implements this callback by calling
'EvalAssume' on all registered Checker objects as well as the
registered GRTransferFunc object.
llvm-svn: 92549
2010-01-05 00:15:18 +00:00
John McCall
263a48b781
Move the -Wconversion logic into SemaChecking.cpp. There's a fair amount of
...
overlap between this and -Wsign-compare, which is why I want them in the same
place.
llvm-svn: 92543
2010-01-04 23:31:57 +00:00
John McCall
ca01b22ed6
Move the -Wsign-compare logic into SemaChecking.cpp.
...
llvm-svn: 92541
2010-01-04 23:21:16 +00:00
Mike Stump
28d89bd652
Avoid warnings for functions that return a value using MS-style inline
...
assembly code. This avoids changing the bahvior when normal asm("")
statements are used.
The type of code affected would be:
void* t4(void) { __asm mov eax, fs:[0x10] }
I hope people like this version, if not, let me know.
llvm-svn: 92531
2010-01-04 23:01:10 +00:00
Mike Stump
90be58afce
Remember if the AsmStmt came from Microsoft-style inline assembly code.
...
llvm-svn: 92526
2010-01-04 22:37:17 +00:00
John McCall
b8e66c3b14
-Wsign-compare shouldn't warn when the signed operand is a conditional operator
...
whose operands are non-negative integer constant expressions. This comes up
in LLVM in a few places.
llvm-svn: 92525
2010-01-04 22:35:07 +00:00
Douglas Gregor
936dc5638c
Make sure to use ASTContext::getAs*ArrayType() when decomposing array
...
types. Fixes APFloat.cpp compilation failure.
llvm-svn: 92523
2010-01-04 22:11:45 +00:00
Daniel Dunbar
699e014588
Add missing newline (which breaks MSVC build???)
...
llvm-svn: 92522
2010-01-04 22:04:01 +00:00
Fariborz Jahanian
d6cba5065f
More rewriting of __block declared objective-c/block pointers.
...
This is wip.
llvm-svn: 92501
2010-01-04 19:50:07 +00:00
Douglas Gregor
51af7f628c
Turn on code-completion for macros within CIndex
...
llvm-svn: 92500
2010-01-04 19:45:17 +00:00
Douglas Gregor
9882a5aac6
Teach Preprocessor::macro_begin/macro_end to lazily load all macro
...
definitions from a precompiled header. This ensures that
code-completion with macro names behaves the same with or without
precompiled headers.
llvm-svn: 92497
2010-01-04 19:18:44 +00:00
Daniel Dunbar
d443c0a02a
Revert r92431, this code isn't dead and broke the ntfs build.
...
llvm-svn: 92493
2010-01-04 18:47:06 +00:00
Daniel Dunbar
5b9019515a
Fix -Asserts warning.
...
llvm-svn: 92491
2010-01-04 18:02:28 +00:00
Douglas Gregor
40f7a007e9
When declaring an Objective-C implementation without a corresponding
...
interface, suggest correction of typos. For example, given:
@interface NSString
@end
@implementation NSstring
@end
we'll warn with:
t.m:4:19: warning: cannot find interface declaration for 'NSstring';
did you mean 'NSString'?
@implementation NSstring
^
However, since this is just a warning, we don't provide a fix-it
hint. Good idea, Ted!
llvm-svn: 92488
2010-01-04 17:27:12 +00:00
Benjamin Kramer
0128f668a9
__builtin_object_size(ptr, type) returns -1 for type = {0,1} if there are any side-effects.
...
llvm-svn: 92453
2010-01-03 18:18:37 +00:00
Douglas Gregor
35b0bac8c5
Implement typo correction for a variety of Objective-C-specific
...
constructs:
- Instance variable lookup ("foo->ivar" and, in instance methods, "ivar")
- Property name lookup ("foo.prop")
- Superclasses
- Various places where a class name is required
- Protocol names (e.g., id<proto>)
This seems to cover many of the common places where typos could occur.
llvm-svn: 92449
2010-01-03 18:01:57 +00:00
Eli Friedman
c6f59b1c49
Better coverage for -dump-record-layouts and -print-decl-contexts.
...
llvm-svn: 92441
2010-01-03 02:01:11 +00:00
Eli Friedman
50f6aa11cf
Improve coverage for test.
...
llvm-svn: 92440
2010-01-03 01:20:41 +00:00
Eli Friedman
6257e08a3d
Get rid of more dead code.
...
llvm-svn: 92439
2010-01-03 01:11:47 +00:00
Eli Friedman
906be1b580
Add test for annotate attribute for coverage.
...
llvm-svn: 92435
2010-01-03 00:51:58 +00:00
Eli Friedman
090adddf15
Fix minor oversight for increment/decrement of complex int. Add tests for
...
coverage.
llvm-svn: 92433
2010-01-03 00:20:48 +00:00
Eli Friedman
c52a9367b3
Get rid of some unnecessary code.
...
llvm-svn: 92432
2010-01-02 23:43:59 +00:00
Eli Friedman
14e4005851
Delete impossible case.
...
llvm-svn: 92431
2010-01-02 23:28:56 +00:00
Eli Friedman
bb333722c1
Add a couple more tests for coverage.
...
llvm-svn: 92430
2010-01-02 23:21:40 +00:00
Eli Friedman
81390dfcfd
Get rid of more unnecessary code.
...
llvm-svn: 92429
2010-01-02 22:56:07 +00:00
Eli Friedman
5906ea4f76
Get rid of some unnecessary code.
...
llvm-svn: 92428
2010-01-02 22:43:56 +00:00
Eli Friedman
d423dcc9bd
Eliminate dead code.
...
llvm-svn: 92424
2010-01-02 21:44:36 +00:00
Anders Carlsson
c92a37e917
Speculative MSVC fix.
...
llvm-svn: 92421
2010-01-02 18:46:23 +00:00
Anders Carlsson
93a1884fde
Move address points to CGVtableInfo, no functionality change.
...
llvm-svn: 92420
2010-01-02 18:02:32 +00:00
Anders Carlsson
e36a6b3e44
Correctly pass VTT parameters to constructors and destructors. The VTTs aren't yet used in the ctors/dtors, but that will follow.
...
llvm-svn: 92409
2010-01-02 01:01:18 +00:00
Anders Carlsson
27da15ba8e
Move a few more functions away from CGCXX and to CGClass and CGExprCXX.
...
llvm-svn: 92399
2010-01-01 20:29:01 +00:00
Douglas Gregor
4f2486353a
Make sure that the search for visible declarations looks into the semantic parents of out-of-line function contexts
...
llvm-svn: 92397
2010-01-01 17:44:25 +00:00
Douglas Gregor
3f8f44757f
Fix typo test RUN lines
...
llvm-svn: 92396
2010-01-01 17:23:17 +00:00
Mike Stump
9d44fdb397
Fix last patch, catch of reference to non-pointer.
...
llvm-svn: 92386
2010-01-01 03:20:32 +00:00
Mike Stump
5ee041873b
Fix catching a reference to a pointer.
...
llvm-svn: 92385
2010-01-01 02:51:52 +00:00