Daniel Dunbar
b5586dad97
Fix long double test case
...
- Had wrong sizeof(long double) encoded into test case
- Results now agree with llvm-gcc
llvm-svn: 54059
2008-07-25 20:54:30 +00:00
Chris Lattner
f6e1e309c7
In c99 mode, comma does do function/array promotion even though
...
it does not do unary promotions (like short->int).
llvm-svn: 54058
2008-07-25 20:54:07 +00:00
Ted Kremenek
04350ebe4a
Refine ObjCPropertyImplDecl:
...
- Remove a bunch of setXXX methods until we actually need them. This cleans up the
interface, and makes the object immutable until we have a reason to be mutable.
- Remove enum value OBJC_PR_IMPL_None since it was never used.
- Remove instance variable 'PropertyImplKind PropertyImplementation;'. This is
not needed because we can tell if ObjCPropertyImplDecl represents @synthesize
if 'ObjCPropertyDecl *PropertyDecl' is not null.
llvm-svn: 54055
2008-07-25 20:43:38 +00:00
Ted Kremenek
7fb92dbf47
Enabled 'unused ivars' check by default.
...
llvm-svn: 54052
2008-07-25 20:35:01 +00:00
Ted Kremenek
e17c037f4f
Remove '.' in expected warning
...
llvm-svn: 54051
2008-07-25 20:30:34 +00:00
Ted Kremenek
d074ce47b6
Have the UnusedIvar check skip ivars with setters/getters created by @synthesize.
...
llvm-svn: 54050
2008-07-25 20:28:02 +00:00
Nate Begeman
448b0cb033
X86 builtin fixes
...
llvm-svn: 54049
2008-07-25 20:17:24 +00:00
Nate Begeman
fe79ca2ab9
Generate vector compares in codegen
...
llvm-svn: 54048
2008-07-25 20:16:05 +00:00
Nate Begeman
e7f45b2977
Move comment to match style
...
llvm-svn: 54047
2008-07-25 20:15:41 +00:00
Nate Begeman
8d161830d1
De-tabify
...
llvm-svn: 54046
2008-07-25 20:15:14 +00:00
Chris Lattner
e174acc910
Comma does not perform unary promotions, rdar://6095180
...
llvm-svn: 54045
2008-07-25 20:02:29 +00:00
Chris Lattner
e08e47ab2f
gcc requires a semicolon at the end of an interface, unlike its extension for structs.
...
rdar://6095245.
llvm-svn: 54044
2008-07-25 19:54:55 +00:00
Steve Naroff
e2177fbfdc
Cleaunup Sema::ActOnClassMessage(). This commit:
...
(a) removes a bogus warning.
(b) removes an undesirable usage of the ObjCMessageExpr constructor that takes an IdentifierInfo * (which I will abolish).
llvm-svn: 54042
2008-07-25 19:39:00 +00:00
Chris Lattner
f9c49e5d27
Reject typedef redefinitions when the underlying types are not identical,
...
even if in a system header etc. rdar://6079937
llvm-svn: 54038
2008-07-25 18:44:27 +00:00
Chris Lattner
31614aeb0a
update this testcase.
...
llvm-svn: 54037
2008-07-25 18:42:46 +00:00
Daniel Dunbar
c481f72857
Add test case for hex floating point constants in < C99 mode
...
- For: rdar://6096838
llvm-svn: 54036
2008-07-25 18:41:57 +00:00
Chris Lattner
c94ad4abcb
In c89 mode accept hex fp constants as an extension:
...
t2.c:1:17: warning: hexadecimal floating constants are a C99 feature
long double d = 0x0.0000003ffffffff00000p-16357L;
^
instead of emitting a weird error message that doesn't make sense:
t2.c:1:41: error: hexadecimal floating constants require an exponent
long double d = 0x0.0000003ffffffff00000p-16357L;
^
rdar://6096838
llvm-svn: 54035
2008-07-25 18:18:34 +00:00
Ted Kremenek
83ec24501e
Remove call to isSEL and isSEL itself since the call is dead (isObjCObjectPointerType() will never return true for selectors).
...
llvm-svn: 54034
2008-07-25 18:17:35 +00:00
Chris Lattner
ec8996d771
Add support for __extension__ as an lvalue. rdar://6097308
...
llvm-svn: 54033
2008-07-25 18:07:19 +00:00
Steve Naroff
542cd5d3f9
Move fix in r54013 from the parser to sema.
...
llvm-svn: 54032
2008-07-25 17:57:26 +00:00
Ted Kremenek
2483730e3f
Only warn about missing/incomplete -dealloc implementations when a class contains a non-SEL, non-IBOutlet ivar that references an ObjC object.
...
llvm-svn: 54024
2008-07-25 17:04:49 +00:00
Chris Lattner
f08932928c
comment out #pragma mark and #warning directives.
...
llvm-svn: 54020
2008-07-25 16:37:06 +00:00
Chris Lattner
b9c34de5c4
rewrite handling of the raw token stream in -rewrite-macros to lex
...
everything up front into a vector. This makes it easier to scan around
the stream when needed.
llvm-svn: 54019
2008-07-25 16:29:12 +00:00
Chris Lattner
3e3ff3e538
alphabeticalize
...
llvm-svn: 54018
2008-07-25 16:06:51 +00:00
Steve Naroff
29788347b2
Fix RewriteObjC::RewriteObjCThrowStmt() to respect whitespace between the @ and throw.
...
This fixes <rdar://problem/5988388> clang ObjC rewriter: mystery 'w' inserted in exception throw.
llvm-svn: 54017
2008-07-25 15:41:30 +00:00
Steve Naroff
ce5206b4f2
Fix Parser::ParseObjCMethodDefinition(). Only call the actions module for valid MDecl's.
...
llvm-svn: 54013
2008-07-25 14:30:25 +00:00
Ted Kremenek
177bc93165
Updated checker build.
...
llvm-svn: 54012
2008-07-25 05:21:03 +00:00
Ted Kremenek
092ec76923
Don't emit 'dead initialization' warnings for variables marked 'unused'.
...
This fixes PR 2573: http://llvm.org/bugs/show_bug.cgi?id=2573
llvm-svn: 54009
2008-07-25 04:47:34 +00:00
Ted Kremenek
39c59a8887
Implemented Sema support for attribute "unused".
...
llvm-svn: 54008
2008-07-25 04:39:19 +00:00
Daniel Dunbar
0e5845c13a
Rework codegen of case ranges
...
- Fix multiple issues with the way case ranges were emitted, see test
cases details about the specific issues.
- The root issue was not being careful about how basic blocks were
emitted which led to them being chained together incorrectly,
resulting in improper control flow.
- Fixes <rdar://problem/6098585>
llvm-svn: 54006
2008-07-25 01:11:38 +00:00
Daniel Dunbar
dd49a04d18
Allow CLANG env variable to override "clang" command in TestRunner.sh
...
llvm-svn: 54005
2008-07-25 01:05:44 +00:00
Ted Kremenek
5eb536b74c
Use ASTContext::isObjCObjectPointerType() to check if an ivar is a reference to an Objective-C object.
...
llvm-svn: 53999
2008-07-24 23:59:07 +00:00
Ted Kremenek
77c51b2aa3
Move isObjCObjectPointerType() from Sema to ASTContext.
...
llvm-svn: 53998
2008-07-24 23:58:27 +00:00
Ted Kremenek
a23b9f0e90
Update VS project.
...
llvm-svn: 53995
2008-07-24 22:20:01 +00:00
Steve Naroff
6c79f97037
Fix Sema::ActOnClassMessage() to pass through the identifier for "super".
...
This fixes a critical rewriter bug (<rdar://problem/6096760> clang ObjC rewriter: 'self' not expected value in class method called with 'super').
Also added a couple FIXME's since I'm not happy with my fix to Sema. It would be nicer if the super handling for class/instance messages was the same (based on PreDefinedExpr).
llvm-svn: 53994
2008-07-24 19:44:33 +00:00
Ted Kremenek
9e9afb552c
Correctly handle NSAssertionHandle -handleFailureInMethod:object:file:lineNumber:description:
...
This fixes: http://llvm.org/bugs/show_bug.cgi?id=2593
llvm-svn: 53993
2008-07-24 18:47:16 +00:00
Ted Kremenek
365f21c8db
Updated checker build.
...
llvm-svn: 53992
2008-07-24 18:15:01 +00:00
Ted Kremenek
0e60b7588a
Don't issue a missing +dealloc warning for classes that just contain SEL ivars.
...
This fixes PR 2592: http://llvm.org/bugs/show_bug.cgi?id=2592
llvm-svn: 53987
2008-07-24 17:45:56 +00:00
Daniel Dunbar
66cd9a32d2
Fix comment
...
llvm-svn: 53986
2008-07-24 17:38:50 +00:00
Ted Kremenek
53b29025f1
Rename test case file.
...
llvm-svn: 53984
2008-07-24 17:02:18 +00:00
Ted Kremenek
87b16f4258
Issue dead store warnings for preincrements involved in a subexpression.
...
llvm-svn: 53983
2008-07-24 17:01:17 +00:00
Ted Kremenek
4a154b2857
Ignore -MT and -MF.
...
llvm-svn: 53977
2008-07-24 03:52:21 +00:00
Ted Kremenek
1c0c06bb9c
"This patch adds paths for Fedora 9 in clang.cpp and support for two preprocessor options in ccc."
...
Patch by Zhongxing Xu!
llvm-svn: 53976
2008-07-24 03:49:15 +00:00
Daniel Dunbar
2e0f1cd00c
Fix EmitCaseStmtRange to ignore empty ranges
...
- Also cleaned up emission slightly
- Inspection of the code revealed several other bugs, however. Case
ranges are not properly wired and can result in switch cases being
dropped or even infinite loops. See: <rdar://problem/6098585>
Completes: <rdar://problem/6094119>
llvm-svn: 53975
2008-07-24 01:18:41 +00:00
Daniel Dunbar
908fccc6ea
Add Expr::getIntegerConstantExprValue helper method
...
- For getting an APSInt from a known integer constant Expr.
- TODO: Many users of Expr::isIntegerConstantExpr in codegen should
probably be using this instead...
llvm-svn: 53974
2008-07-24 01:08:37 +00:00
Ted Kremenek
25177f5e53
Updated checker build.
...
llvm-svn: 53969
2008-07-23 23:39:06 +00:00
Ted Kremenek
0b5eb1ac87
Added dead stores test case.
...
llvm-svn: 53966
2008-07-23 23:18:43 +00:00
Ted Kremenek
c99332c5a6
Modified HTMLDiagnostics to also perform syntax highlighting for errors in header files.
...
llvm-svn: 53965
2008-07-23 23:18:15 +00:00
Ted Kremenek
9572cae92b
Don't flag dead stores when the result of a preincrement/predecrement is used in an enclosing expression.
...
llvm-svn: 53964
2008-07-23 22:19:56 +00:00
Ted Kremenek
1692342e58
Added UnaryOperator::isPrefix().
...
llvm-svn: 53963
2008-07-23 22:18:43 +00:00
Ted Kremenek
b9e10c02d2
Use typedef range_iterator instead of SourceRange* in PathDiagnosticPiece.
...
llvm-svn: 53962
2008-07-23 21:51:42 +00:00
Ted Kremenek
ecc851bb6e
Further refine dead store checking to distinguish between dead stores and dead increments.
...
llvm-svn: 53960
2008-07-23 21:16:38 +00:00
Ted Kremenek
46abc7db6b
Properly skip IBOutlets when checking for unused ivars.
...
Refine the error message of unused ivars.
Added test case.
llvm-svn: 53957
2008-07-23 18:21:36 +00:00
Ted Kremenek
0cdba6b43e
Initialize instance variable DeclAccess in ctor for ObjCIvarDecl.
...
llvm-svn: 53956
2008-07-23 18:12:25 +00:00
Ted Kremenek
73295fab89
When constructing an ObjCIvarDecl object in Sema, provide its visibility up front instead of setting it afterwards.
...
This change also fixes a subtle bug where the access control of an ivar would be initialized to garbage if we didn't have an explicit visibility specifier (e.g., @private ).
llvm-svn: 53955
2008-07-23 18:04:17 +00:00
Ted Kremenek
7de7fd0305
Updated comment for class ObjCIvarDecl: it turns out the default access control
...
is protected, not private.
Added ObjCIvarDecl::getCanonicalAccessControl() to report the visible access
control of an ivar, whereas getAccessControl() returns the access control
relating to how the ivar was actually declared.
llvm-svn: 53954
2008-07-23 17:44:44 +00:00
Ted Kremenek
6b6a4b6446
Ivar access mode ObjCIvarDecl::None == ObjCIvarDecl::Protected, not private.
...
llvm-svn: 53953
2008-07-23 17:14:39 +00:00
Ted Kremenek
19f4e16f3e
Update Xcode project.
...
llvm-svn: 53952
2008-07-23 17:13:09 +00:00
Chris Lattner
28ee5b3d29
don't depend on the result of CreateNeg to be a binop
...
llvm-svn: 53948
2008-07-23 06:53:34 +00:00
Chris Lattner
070968957e
Fix rdar://6094010 various asserts happening with wide strings in inline asm.
...
llvm-svn: 53947
2008-07-23 06:46:56 +00:00
Chris Lattner
d258325c2b
Fix a codegen crash on:
...
int foo(void) {
float x[2];
return x;
}
rdar://6093986
llvm-svn: 53946
2008-07-23 06:31:27 +00:00
Ted Kremenek
3b28f4911c
Add prototype implementation of unused ivar check.
...
llvm-svn: 53942
2008-07-23 00:45:26 +00:00
Ted Kremenek
0b39845f93
Updated checker build.
...
llvm-svn: 53936
2008-07-22 22:45:52 +00:00
Argyrios Kyrtzidis
cbece36b22
Fix compilation error on GCC 4.3.0 ('memcpy' was not declared in this scope).
...
llvm-svn: 53934
2008-07-22 21:56:45 +00:00
Daniel Dunbar
a2fbefc159
Add note to check what __alignof__ a function type should be.
...
llvm-svn: 53928
2008-07-22 19:44:18 +00:00
Anders Carlsson
35a56368be
Always define __SIZE_TYPE__ as long unsigned int.
...
llvm-svn: 53922
2008-07-22 17:16:13 +00:00
Ted Kremenek
5dd9c0eaf6
Update VS project.
...
llvm-svn: 53921
2008-07-22 17:13:59 +00:00
Ted Kremenek
85b898e1de
Use llvm::utostr_32 instead of ostringstream.
...
llvm-svn: 53914
2008-07-22 16:56:21 +00:00
Ted Kremenek
59a4d909e1
Update VS project.
...
llvm-svn: 53913
2008-07-22 16:47:06 +00:00
Ted Kremenek
a8efcf58a2
Update Xcode project.
...
llvm-svn: 53910
2008-07-22 16:22:19 +00:00
Ted Kremenek
1f352db96a
Moved registration of basic path-sensitive checks from GRSimpleVals.cpp to GRExprEngineInternalChecks.cpp.
...
llvm-svn: 53909
2008-07-22 16:21:24 +00:00
Ted Kremenek
6bb53303e1
Rename file.
...
llvm-svn: 53906
2008-07-22 14:41:47 +00:00
Daniel Dunbar
ee8bbb3ccc
Prevent codegen crash on sizeof(<function type>), a gcc extension.
...
llvm-svn: 53899
2008-07-22 01:35:47 +00:00
Ted Kremenek
98f6e582f2
Added path-sensitive checking for null pointer values passed to function arguments marked nonnull.
...
This implements <rdar://problem/6069935>
llvm-svn: 53891
2008-07-22 00:46:16 +00:00
Daniel Dunbar
327acd7a6c
Implement bzero, memset, memmove builtins.
...
This subsumes Nico Weber's patch and implements bzero in terms
of llvm.memset to match llvm-gcc.
llvm-svn: 53888
2008-07-22 00:26:45 +00:00
Daniel Dunbar
b725726c29
Implement nans, prefetch, and trap builtins.
...
This closes <rdar://problem/6080720>, support for __builtin_constant_p
has been filed separately.
llvm-svn: 53885
2008-07-21 22:59:13 +00:00
Chris Lattner
d7352d6801
minor cleanup to the actions interface to pass around SmallVectorImpl instead
...
of a specific smallvector size.
Fix protocol lists to pass down proper location info, so we get diagnostics
like this:
t.m:3:35: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^
instead of this:
t.m:3:44: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^
Add a new IdentifierLocPair typedef which is just a pair<IdentifierInfo*, SourceLocation>
llvm-svn: 53883
2008-07-21 22:17:28 +00:00
Ted Kremenek
5224e6a81d
Add test case for nonnull attribute.
...
Fix indexing bug.
llvm-svn: 53882
2008-07-21 22:09:15 +00:00
Ted Kremenek
2d63bc1e99
Added sema support for the nonnull attribute. Will add test cases soon.
...
llvm-svn: 53881
2008-07-21 21:53:04 +00:00
Daniel Dunbar
7ed03c4cdd
Kill an unused variable warning
...
llvm-svn: 53878
2008-07-21 21:43:28 +00:00
Chris Lattner
388f6e97e1
unindent this function by using an early exit, not functionality change.
...
llvm-svn: 53877
2008-07-21 21:33:21 +00:00
Chris Lattner
390d39ac7e
move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>,
...
simplifying code along the way and fixing a problem and memory leak or two.
llvm-svn: 53876
2008-07-21 21:32:27 +00:00
Daniel Dunbar
c2f67966f4
Add __builtin_powi[fl] support
...
llvm-svn: 53866
2008-07-21 18:44:41 +00:00
Daniel Dunbar
5b288788b3
Fix a test RUN line to not generate '=-' in test directory
...
llvm-svn: 53865
2008-07-21 18:42:27 +00:00
Chris Lattner
102ccc4f8c
add forward definition protocols to the protocol list for a class.
...
llvm-svn: 53864
2008-07-21 18:35:17 +00:00
Chris Lattner
461d3f8eb8
references to completely undeclared protocols should be errors.
...
References to forward definitions should be warnings.
llvm-svn: 53863
2008-07-21 18:34:02 +00:00
Steve Naroff
f0ff879881
RewriteObjC::RewriteObjCForCollectionStmt() needs to handle bodies with a single statement.
...
Fixes <rdar://problem/6084870> clang ObjC rewriter: for-in enumeration in 1 line produces output with error.
llvm-svn: 53858
2008-07-21 18:26:02 +00:00
Chris Lattner
d004505b74
introduce a new ObjCList templated class and start moving
...
various objc lists over to it. First up, the protocol list
on ObjCInterfaceDecl.
llvm-svn: 53856
2008-07-21 18:19:38 +00:00
Ted Kremenek
b47772535b
Update checker build.
...
llvm-svn: 53855
2008-07-21 17:53:09 +00:00
Chris Lattner
65056c48a7
rename setReferencedProtocolList -> addReferencedProtocols to
...
be consistent with ObjCInterfaceDecl.
llvm-svn: 53852
2008-07-21 17:23:15 +00:00
Daniel Dunbar
d93abc3bb0
Implement ffs, parity, and popcount builtins.
...
+ test case
llvm-svn: 53851
2008-07-21 17:19:41 +00:00
Argyrios Kyrtzidis
b3fa8639e1
Change 'MDecl' to 'MD' to fix redefinition compiler error in MSVC++.
...
llvm-svn: 53849
2008-07-21 09:18:38 +00:00
Chris Lattner
046485640d
fix typo
...
llvm-svn: 53848
2008-07-21 07:13:18 +00:00
Chris Lattner
ca1e848588
Switch initialization of the protocol list for an interface decl to use
...
the standard "set these as the list of protocols" interface instead of a
strange "set this as the size and then set each one to the value" interface.
The problem with the later is that it a) is completely different from
everything else, b) is awkward, and c) doesn't handle the case when a
referenced protocol is invalid: it set it to null.
This meant that all clients downstream would have to handle null protocols
in the protocol list, and empirically they didn't. Fix this by not setting
invalid protocols in the referenced protocol list, fixing the crash on
test/Sema/objc-interface-1.m
While I'm at it, clean up some locations so that we produce:
t.m:1:25: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
~~~~~~~~~~~~~~~~~~~~~ ^
instead of:
t.m:1:1: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^
llvm-svn: 53846
2008-07-21 07:06:49 +00:00
Chris Lattner
87899be4cc
when in the context of an @implementation, look for private methods in the
...
@implementation to resolve nullary selector references.
llvm-svn: 53845
2008-07-21 06:44:27 +00:00
Chris Lattner
f1c149db9f
don't pass in null as the Name for GenerateClassStructure,
...
it goes and makes std::strings out of them, which is not
defined.
llvm-svn: 53843
2008-07-21 06:31:05 +00:00
Chris Lattner
12bf571fa8
improve diagnostics about problems with receivers to highlight the receiver.
...
llvm-svn: 53842
2008-07-21 06:16:07 +00:00
Chris Lattner
bd2d634424
continue cleaning up code, and disable sending a message directly to an
...
interface. This fixes a bug where we used to accept:
void test2(NSNumber x) {
[x METH];
}
which doesn't make sense and GCC rejects.
llvm-svn: 53841
2008-07-21 06:12:56 +00:00
Chris Lattner
6b946cc788
simplify control flow a bit, reducing indentation. No functionality change.
...
llvm-svn: 53837
2008-07-21 05:57:44 +00:00
Chris Lattner
79f14789d8
tighten up some checks, don't allow sending a message to NSString****
...
llvm-svn: 53836
2008-07-21 05:54:02 +00:00
Chris Lattner
393f4ae047
update diagnostic to include string
...
llvm-svn: 53835
2008-07-21 05:38:58 +00:00
Chris Lattner
0c373078e2
improve invalid member reference diagnostics to print the type and
...
have better source ranges. Before:
t.m:11:53: error: member reference is not to a structure or union
CGFloat maxOffsetY = [_outlineLayer contentSize].height - [_outlineLayer frame].size.height;
^~~~~~~
after:
t.m:11:54: error: member reference base type ('id') is not a structure or union
CGFloat maxOffsetY = [_outlineLayer contentSize].height - [_outlineLayer frame].size.height;
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
llvm-svn: 53834
2008-07-21 05:35:34 +00:00
Chris Lattner
3f44d70771
merge a bunch of code that is now common between qual interfaces and interfaces.
...
llvm-svn: 53833
2008-07-21 05:27:51 +00:00
Chris Lattner
d7983b472e
rename getProtocols -> getProtocol, as it only returns a single
...
protocol. Simplify some code to use unconditional form of the
protocol access list.
llvm-svn: 53832
2008-07-21 05:20:01 +00:00
Chris Lattner
419f699b55
use iterators instead of direct access to protocol list.
...
llvm-svn: 53831
2008-07-21 05:19:23 +00:00
Chris Lattner
13b2ace8df
improve documentation of ObjCInterfaceType significantly. Also,
...
make the qual_* iterators and getNumProtocols() lists be accessible through
ObjCInterfaceType (returning an empty range if not a
ObjCQualifiedInterfaceType). This eliminates special checks in clients.
llvm-svn: 53830
2008-07-21 05:13:51 +00:00
Chris Lattner
dc420f4866
Fix a bunch of crashes that occur in (attempted) handling of objc properties.
...
This code would previously crash on x.y where x is 'id'.
llvm-svn: 53827
2008-07-21 04:59:05 +00:00
Chris Lattner
f8f5682998
right, the error is when the itf *doesn't* have the member.
...
llvm-svn: 53826
2008-07-21 04:54:33 +00:00
Chris Lattner
bf58ba78df
use the simplified form of lookupInstanceVariable for callers who
...
don't care which class actually defines it.
llvm-svn: 53825
2008-07-21 04:44:44 +00:00
Chris Lattner
8bb52cb5a2
improve the diagnostic for an erroneous objc ivar reference
...
from:
t.m:8:7: error: member reference is not to a structure or union
pool->farm = 0;
^ ~~~~
to:
t.m:8:7: error: 'NSAutoreleasePool' has member named 'farm'
pool->farm = 0;
~~~~^ ~~~~
llvm-svn: 53824
2008-07-21 04:42:08 +00:00
Chris Lattner
4befd736b2
simplify a bunch of code, no functionality change.
...
llvm-svn: 53823
2008-07-21 04:36:39 +00:00
Chris Lattner
b63a745331
rearrange some code, no functionality change.
...
llvm-svn: 53822
2008-07-21 04:28:12 +00:00
Chris Lattner
530315fe89
improve comments yet again, now I know what this does :)
...
llvm-svn: 53821
2008-07-21 04:16:33 +00:00
Chris Lattner
6886f38369
minor rename, also, reject pointer to qualified id.
...
id<NSCopyable>* is not an "objc pointer type", id<NSCopyable> is.
llvm-svn: 53820
2008-07-21 04:13:58 +00:00
Chris Lattner
c47d930448
Fix a crash that can happen when you have typedefs for pointers to
...
interfaces. Just because they x->isPointerType() doesn't mean it is
valid to just cast to a pointertype. We have to handle typedefs etc
as well.
llvm-svn: 53819
2008-07-21 04:09:54 +00:00
Chris Lattner
15727f69fa
improve comments.
...
llvm-svn: 53818
2008-07-21 04:07:11 +00:00
Chris Lattner
2a47fa7372
simplify this predicate, only checking isObjCQualifiedIdType once.
...
llvm-svn: 53817
2008-07-21 04:03:34 +00:00
Chris Lattner
9099474130
Add a space, ted apparently has philosophical problems with spaces ;-)
...
llvm-svn: 53808
2008-07-20 04:22:06 +00:00
Nuno Lopes
8a48c2f7d9
fix test
...
llvm-svn: 53802
2008-07-19 22:11:43 +00:00
Ted Kremenek
4f2fb96d18
Updated latest checker build.
...
llvm-svn: 53800
2008-07-19 19:50:00 +00:00
Ted Kremenek
f487548c17
Patch by Kovarththanan Rajaratnam:
...
"When dumping the tokens (-dumptokens output type), the column numbers are not
correctly shown. This patch fixes that issue."
llvm-svn: 53797
2008-07-19 19:10:40 +00:00
Ted Kremenek
0fff6d3c06
Patch by
...
"When dumping the tokens (-dumptokens output type), the column numbers are not
correctly shown. This patch fixes that issue."
llvm-svn: 53796
2008-07-19 19:10:04 +00:00
Ted Kremenek
f7ffd66551
Reimplement ccc-analyzer in a language I actually know, and implement some obvious optimizations when processing command line arguments.
...
llvm-svn: 53783
2008-07-19 06:11:04 +00:00
Ted Kremenek
d2d122961d
Remove typo.
...
llvm-svn: 53776
2008-07-18 23:13:03 +00:00
Ted Kremenek
2a6b0b5d5e
Quote invocation of clang in pipe to handle paths with spaces.
...
llvm-svn: 53775
2008-07-18 23:11:33 +00:00
Ted Kremenek
8857703b57
Added test case.
...
llvm-svn: 53770
2008-07-18 20:48:10 +00:00
Ted Kremenek
6f2c46a275
Update checker build.
...
llvm-svn: 53769
2008-07-18 20:22:22 +00:00
Ted Kremenek
f41b1c45fa
"currentHandler" is a nullary selector
...
llvm-svn: 53763
2008-07-18 18:14:26 +00:00
Ted Kremenek
f7faa42c6c
Fix caching bug.
...
llvm-svn: 53759
2008-07-18 17:39:56 +00:00
Ted Kremenek
3b2294c7e6
Add panic support for NSAssertionHandler.
...
llvm-svn: 53758
2008-07-18 17:24:20 +00:00
Daniel Dunbar
155ed24359
Prevent clang from emitting output when input has errors
...
+ test case
<rdar://problem/6080040>
http://llvm.org/bugs/show_bug.cgi?id=2280
llvm-svn: 53756
2008-07-18 16:38:05 +00:00
Ted Kremenek
d785465167
Add panic function.
...
llvm-svn: 53755
2008-07-18 16:28:33 +00:00
Ted Kremenek
36f6b04295
Fix 80 col violation
...
llvm-svn: 53754
2008-07-18 15:59:33 +00:00
Ted Kremenek
b1c91bfc45
Fix regression by explicitly checking if we are negating a SymIntConstantVal.
...
llvm-svn: 53753
2008-07-18 15:54:51 +00:00
Ted Kremenek
6a62d908c3
Improve path-sensitivity when using the logical not operator.
...
llvm-svn: 53752
2008-07-18 15:46:06 +00:00
Ted Kremenek
91614e6fe6
Renamed deterministic EvalBinOp to DetermEvalBinOpNN. This name mangling is unfortunately needed because virtual methods with the same name can be hidden by subclasses.
...
llvm-svn: 53751
2008-07-18 15:27:58 +00:00
Ted Kremenek
8d6b42e096
Created ValueStateSet class to manage the creation of multiple states by a method.
...
Modified the new EvalBinOpNN to generate states instead of nodes. This is a much simpler interface and is what clients will want to do.
llvm-svn: 53750
2008-07-18 05:53:58 +00:00
Ted Kremenek
072429320a
Remove dead method.
...
llvm-svn: 53748
2008-07-18 04:55:41 +00:00
Mon P Wang
194c58f56d
Add support shufpd
...
llvm-svn: 53747
2008-07-18 00:14:09 +00:00
Ted Kremenek
e330aacbed
Update signature of EvalAssume.
...
llvm-svn: 53745
2008-07-17 23:33:10 +00:00
Ted Kremenek
2fe3afca04
Provide static methods in BinaryOperator to determine if an opcode is an equality opcode, a relational opcode, or a logical opcode.
...
llvm-svn: 53744
2008-07-17 23:24:36 +00:00
Ted Kremenek
9c32a1ecf5
Move GRTransferFunc* into ValueStateManager, and move the assumption logic there as well.
...
llvm-svn: 53743
2008-07-17 23:15:45 +00:00
Ted Kremenek
9976888190
Added headers
...
llvm-svn: 53742
2008-07-17 22:41:39 +00:00
Ted Kremenek
a79d9a9c79
Remove redundant logic.
...
llvm-svn: 53740
2008-07-17 21:36:43 +00:00
Ted Kremenek
bc9118b165
Begin major changes to EvalXXX methods in GRTransferFuncs. Currently some of the methods only return an RVal; we want them to be able to create an arbitrary number of states.
...
llvm-svn: 53739
2008-07-17 21:27:31 +00:00
Daniel Dunbar
1f32c759dc
Fix for codegen crash on multibit bool bitfield initialization
...
<rdar://problem/6078606>
llvm-svn: 53737
2008-07-17 21:07:48 +00:00
Ted Kremenek
88a6b7fa80
Moved RemoveDeadBindings logic for the contents of 'Store' to a virtual RemoveDeadBindings method in StoreManager.
...
llvm-svn: 53726
2008-07-17 18:38:48 +00:00
Ted Kremenek
9ace803308
We now build universal binaries of the checker.
...
llvm-svn: 53725
2008-07-17 18:35:12 +00:00
Argyrios Kyrtzidis
ef34aed1f9
Unify ctx_iterator/ctx_begin()/ctx_end() and iterator/begin()/end() so that a single iterator type is used for both traversing decls of the same declaration context *and* of the parent declaration contexts, depending on the value of the bool parameter 'LookInParentCtx' that is passed to IdentifierResolver::begin().
...
llvm-svn: 53724
2008-07-17 17:49:50 +00:00
Steve Naroff
97adf60418
RewriteObjC::SynthMessageExpr(): Fix super rewrite (a fairly recent regression).
...
Fixes <rdar://problem/6046663> clang ObjC rewriter: Regression in handling of 'super' in latest build.
llvm-svn: 53703
2008-07-16 22:35:27 +00:00