]>
granicus.if.org Git - clang/log
Chris Lattner [Mon, 21 Jul 2008 17:23:15 +0000 (17:23 +0000)]
rename setReferencedProtocolList -> addReferencedProtocols to
be consistent with ObjCInterfaceDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53852
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 21 Jul 2008 17:19:41 +0000 (17:19 +0000)]
Implement ffs, parity, and popcount builtins.
+ test case
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53851
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 21 Jul 2008 09:18:38 +0000 (09:18 +0000)]
Change 'MDecl' to 'MD' to fix redefinition compiler error in MSVC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53849
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 07:13:18 +0000 (07:13 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53848
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 07:06:49 +0000 (07:06 +0000)]
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>
^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53846
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 06:44:27 +0000 (06:44 +0000)]
when in the context of an @implementation, look for private methods in the
@implementation to resolve nullary selector references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53845
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 06:31:05 +0000 (06:31 +0000)]
don't pass in null as the Name for GenerateClassStructure,
it goes and makes std::strings out of them, which is not
defined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53843
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 06:16:07 +0000 (06:16 +0000)]
improve diagnostics about problems with receivers to highlight the receiver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53842
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 06:12:56 +0000 (06:12 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53841
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 05:57:44 +0000 (05:57 +0000)]
simplify control flow a bit, reducing indentation. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53837
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 05:54:02 +0000 (05:54 +0000)]
tighten up some checks, don't allow sending a message to NSString****
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53836
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 05:38:58 +0000 (05:38 +0000)]
update diagnostic to include string
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53835
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 05:35:34 +0000 (05:35 +0000)]
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;
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53834
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 05:27:51 +0000 (05:27 +0000)]
merge a bunch of code that is now common between qual interfaces and interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53833
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 05:20:01 +0000 (05:20 +0000)]
rename getProtocols -> getProtocol, as it only returns a single
protocol. Simplify some code to use unconditional form of the
protocol access list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53832
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 05:19:23 +0000 (05:19 +0000)]
use iterators instead of direct access to protocol list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53831
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 05:13:51 +0000 (05:13 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53830
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 04:59:05 +0000 (04:59 +0000)]
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'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53827
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 04:54:33 +0000 (04:54 +0000)]
right, the error is when the itf *doesn't* have the member.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53826
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 04:44:44 +0000 (04:44 +0000)]
use the simplified form of lookupInstanceVariable for callers who
don't care which class actually defines it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53825
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 04:42:08 +0000 (04:42 +0000)]
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;
~~~~^ ~~~~
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53824
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 04:36:39 +0000 (04:36 +0000)]
simplify a bunch of code, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53823
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 04:28:12 +0000 (04:28 +0000)]
rearrange some code, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53822
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 04:16:33 +0000 (04:16 +0000)]
improve comments yet again, now I know what this does :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53821
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 04:13:58 +0000 (04:13 +0000)]
minor rename, also, reject pointer to qualified id.
id<NSCopyable>* is not an "objc pointer type", id<NSCopyable> is.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53820
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 04:09:54 +0000 (04:09 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53819
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 04:07:11 +0000 (04:07 +0000)]
improve comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53818
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 21 Jul 2008 04:03:34 +0000 (04:03 +0000)]
simplify this predicate, only checking isObjCQualifiedIdType once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53817
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 20 Jul 2008 04:22:06 +0000 (04:22 +0000)]
Add a space, ted apparently has philosophical problems with spaces ;-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53808
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sat, 19 Jul 2008 22:11:43 +0000 (22:11 +0000)]
fix test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53802
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 19 Jul 2008 19:50:00 +0000 (19:50 +0000)]
Updated latest checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53800
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 19 Jul 2008 19:10:40 +0000 (19:10 +0000)]
Patch by Kovarththanan Rajaratnam:
"When dumping the tokens (-dumptokens output type), the column numbers are not
correctly shown. This patch fixes that issue."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53797
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 19 Jul 2008 19:10:04 +0000 (19:10 +0000)]
Patch by
"When dumping the tokens (-dumptokens output type), the column numbers are not
correctly shown. This patch fixes that issue."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53796
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 19 Jul 2008 06:11:04 +0000 (06:11 +0000)]
Reimplement ccc-analyzer in a language I actually know, and implement some obvious optimizations when processing command line arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53783
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 23:13:03 +0000 (23:13 +0000)]
Remove typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53776
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 23:11:33 +0000 (23:11 +0000)]
Quote invocation of clang in pipe to handle paths with spaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53775
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 20:48:10 +0000 (20:48 +0000)]
Added test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53770
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 20:22:22 +0000 (20:22 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53769
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 18:14:26 +0000 (18:14 +0000)]
"currentHandler" is a nullary selector
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53763
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 17:39:56 +0000 (17:39 +0000)]
Fix caching bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53759
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 17:24:20 +0000 (17:24 +0000)]
Add panic support for NSAssertionHandler.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53758
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 18 Jul 2008 16:38:05 +0000 (16:38 +0000)]
Prevent clang from emitting output when input has errors
+ test case
<rdar://problem/
6080040 >
http://llvm.org/bugs/show_bug.cgi?id=2280
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53756
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 16:28:33 +0000 (16:28 +0000)]
Add panic function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53755
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 15:59:33 +0000 (15:59 +0000)]
Fix 80 col violation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53754
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 15:54:51 +0000 (15:54 +0000)]
Fix regression by explicitly checking if we are negating a SymIntConstantVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53753
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 15:46:06 +0000 (15:46 +0000)]
Improve path-sensitivity when using the logical not operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53752
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 15:27:58 +0000 (15:27 +0000)]
Renamed deterministic EvalBinOp to DetermEvalBinOpNN. This name mangling is unfortunately needed because virtual methods with the same name can be hidden by subclasses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53751
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 05:53:58 +0000 (05:53 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53750
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jul 2008 04:55:41 +0000 (04:55 +0000)]
Remove dead method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53748
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Fri, 18 Jul 2008 00:14:09 +0000 (00:14 +0000)]
Add support shufpd
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53747
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jul 2008 23:33:10 +0000 (23:33 +0000)]
Update signature of EvalAssume.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53745
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jul 2008 23:24:36 +0000 (23:24 +0000)]
Provide static methods in BinaryOperator to determine if an opcode is an equality opcode, a relational opcode, or a logical opcode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53744
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jul 2008 23:15:45 +0000 (23:15 +0000)]
Move GRTransferFunc* into ValueStateManager, and move the assumption logic there as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53743
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jul 2008 22:41:39 +0000 (22:41 +0000)]
Added headers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53742
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jul 2008 21:36:43 +0000 (21:36 +0000)]
Remove redundant logic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53740
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jul 2008 21:27:31 +0000 (21:27 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53739
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 17 Jul 2008 21:07:48 +0000 (21:07 +0000)]
Fix for codegen crash on multibit bool bitfield initialization
<rdar://problem/
6078606 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53737
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jul 2008 18:38:48 +0000 (18:38 +0000)]
Moved RemoveDeadBindings logic for the contents of 'Store' to a virtual RemoveDeadBindings method in StoreManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53726
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jul 2008 18:35:12 +0000 (18:35 +0000)]
We now build universal binaries of the checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53725
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 17 Jul 2008 17:49:50 +0000 (17:49 +0000)]
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().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53724
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 16 Jul 2008 22:35:27 +0000 (22:35 +0000)]
RewriteObjC::SynthMessageExpr(): Fix super rewrite (a fairly recent regression).
Fixes <rdar://problem/
6046663 > clang ObjC rewriter: Regression in handling of 'super' in latest build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53703
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 16 Jul 2008 21:01:53 +0000 (21:01 +0000)]
When in C++, make EnumConstant names hide tag names in the same scope, instead of colliding with them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53702
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 16 Jul 2008 19:47:39 +0000 (19:47 +0000)]
Remove a FIXME from RewriteObjC::RewriteObjCSynchronizedStmt().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53696
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 16 Jul 2008 18:58:11 +0000 (18:58 +0000)]
RewriteObjC::Initialize(): add function decls used by @synchronized.
This fixes <rdar://problem/
6040143 > clang ObjC rewriter: @synchronized keyword inserts undeclared objc functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53695
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 16 Jul 2008 18:22:22 +0000 (18:22 +0000)]
Two fixes:
- Make sure ObjCIvarDecl propagates the bitfield width.
- RewriteObjC::SynthesizeIvarOffsetComputation(): Avoid using the __OFFSETOF__ mumbo jumbo for bitfields (since it isn't legal C). This fixes <rdar://problem/
5986079 > clang ObjC rewriter: bitfields and ivar access don't mix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53694
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 16 Jul 2008 15:31:30 +0000 (15:31 +0000)]
RewriteObjC::RewriteObjCTryStmt():Don't synthesize a catch begin if there are 0 catch clauses.
This fixes <rdar://problem/
5987211 > clang ObjC rewriter: @try / @finally block produces unbalanced output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53679
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 16 Jul 2008 14:40:40 +0000 (14:40 +0000)]
Teach RewriteObjC::RewriteObjCMethodDecl() to deal with pointer to function return types.
This fixes <rdar://problem/
6034961 > clang ObjC rewriter: rewriting methods with function pointer return values does not work
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53678
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 16 Jul 2008 07:45:46 +0000 (07:45 +0000)]
When checking for name collision between a tag and a previously defined namespace, the collision occured even when the tag was in a different nested scope.
Fix it by taking into account the scope when checking for namespace-tag name collisions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53667
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 16 Jul 2008 07:23:27 +0000 (07:23 +0000)]
Add 'this' in the comments of Parser::ParseCastExpression to indicate that it is handled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53665
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jul 2008 02:39:15 +0000 (02:39 +0000)]
Updated latest checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53664
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jul 2008 00:23:49 +0000 (00:23 +0000)]
Fix regression introduced by http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-
20080714 /006514.html.
The regression was the casts from integers to pointers where not being handled: they would just return UnknownVal. This would greatly decrease path-sensitivity.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53659
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 23:41:32 +0000 (23:41 +0000)]
Have scan-build control default analyses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53654
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 23:17:54 +0000 (23:17 +0000)]
Fix transfer function logic in GRSimpleVals for integer casts: only support casts from integers to integers.
This fixes a crash reported by Anders Carlsson!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53649
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 23:09:14 +0000 (23:09 +0000)]
Add -DIBOutlet=__attribute__((iboutlet)) to analyzer arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53648
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 23:04:27 +0000 (23:04 +0000)]
For the MissingDealloc check, don't treat IBOutlet ivars as being needed to be released
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53647
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 22:39:36 +0000 (22:39 +0000)]
Make iboutlet diagnostic lowercase
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53646
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 22:38:34 +0000 (22:38 +0000)]
Use lowercase of attribute iboutlet to not conflict with the macro IBOutlet
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53645
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 22:26:48 +0000 (22:26 +0000)]
Added parsing/sema support for __attribute__ ((IBOutlet)), a clang-specific attribute that the static analyzer will use to recognize what ivars are IBOutlets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53644
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 22:03:09 +0000 (22:03 +0000)]
Added --status-bugs option to scan-build. By default, the exit status of
scan-build is the same as the exit status of the executed build command. With
this option, the exit status of scan-build is 1 if the analyzer flagged any
bugs, and 0 otherwise.
This addresses: <rdar://problem/
6075320 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53642
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 20:18:21 +0000 (20:18 +0000)]
Per Sam Bishop's excellent suggestion, use "system" instead of backticks to invoke sub-commands used by scan-build. This avoids meta-character translation issues caused by a shell subprocess.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53640
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 18:28:16 +0000 (18:28 +0000)]
Quote file names to better handle paths with spaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53635
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 18:15:51 +0000 (18:15 +0000)]
Incremented latest checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53631
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 18:06:32 +0000 (18:06 +0000)]
Distinguish between dead stores and dead initializations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53628
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 17:43:41 +0000 (17:43 +0000)]
isRetain() and isRelease() now only returns true if "Retain"/"Release" appears in the suffix of a function's name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53621
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 17:09:28 +0000 (17:09 +0000)]
scan-build now propagates up the exit status of the build command.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53620
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 17:06:44 +0000 (17:06 +0000)]
Do not enable -warn-objc-missing-dealloc by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 17:06:13 +0000 (17:06 +0000)]
scan-build now interrogates clang for a list of available analyses, and presents
these as options to the user of scan-build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53618
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 16:50:12 +0000 (16:50 +0000)]
Support retain/release tracking for CoreGraphics (CGxxxRef) objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53617
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 03:51:09 +0000 (03:51 +0000)]
Update radar component to file static analyzer bugs against.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53589
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 03:49:15 +0000 (03:49 +0000)]
Removed disclaimer about checker-36, which is old news.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53588
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jul 2008 00:46:02 +0000 (00:46 +0000)]
Provide an "Analysis Scope" for Analyses so checks can either be run on code declarations (bodies) or Objective-C @implementation blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53584
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jul 2008 23:56:31 +0000 (23:56 +0000)]
Re-enable missing -dealloc check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53578
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jul 2008 23:42:26 +0000 (23:42 +0000)]
Update Xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jul 2008 23:41:49 +0000 (23:41 +0000)]
Using new clang option to invoke the type-signature check of Objective-C instance methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53576
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jul 2008 23:41:13 +0000 (23:41 +0000)]
Break off declaration of Analysis enum into Analyses.def. The driver options in
clang.cpp now #include these definitions to create the command line options, and
AnalysisConsumer #includes this file to generate the switch statement to create
actions.
Renamed -check-objc-methodsigs to -warn-objc-methodsigs.
The "missing -dealloc" check is now optional: -warn-objc-missing-dealloc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53575
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jul 2008 20:56:04 +0000 (20:56 +0000)]
Refactor Dead Stores error reporting to use the simplified BugReporter::EmitBasicReport interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53573
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Mon, 14 Jul 2008 18:02:46 +0000 (18:02 +0000)]
http://llvm.org/bugs/show_bug.cgi?id=2523
Add some code to handle vector comparisons, which is the language side
of the llvm vicmp/vfcmp instructions. Also make the vector-vector and
vector-scalar asign checks a bit more sane under the presence of lax vector
conversions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53565
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jul 2008 17:40:50 +0000 (17:40 +0000)]
Added method "EmitBasicReport" to BugReporter to simplify the emission of simple bug diagnostics.
Refactored error reporting in CheckObjCDealloc and CheckObjCInstMethSignature to use this new bug reporting interface (major code simplification).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53560
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 16:54:05 +0000 (16:54 +0000)]
remove CGObjCEtoile until it compiles.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53552
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jul 2008 14:40:22 +0000 (14:40 +0000)]
Fix minor mistake in clang checkout instructions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53550
91177308 -0d34-0410-b5e6-
96231b3b80d8