Ken Dyck
33211d9658
Avoid unwanted expansion in macros that paste together INT<n>_C(v) and
...
UINT<n>_C(v) macros.
llvm-svn: 89461
2009-11-20 16:49:10 +00:00
Ken Dyck
8dcc21420b
Avoid unwanted expansion in macros that paste together INT<n>_MIN, INT<n>_MAX,
...
and UINT<n>_MAX defintions.
llvm-svn: 89460
2009-11-20 16:44:38 +00:00
Ken Dyck
764a5f3881
Avoid unwanted macro expansion in macros that paste together int<n>_t and
...
uint<n>_t definitions.
llvm-svn: 89459
2009-11-20 16:37:35 +00:00
Ted Kremenek
a4f7c180ae
Add simple static analyzer checker to check for sending 'release', 'retain', etc. directly to a class. Fixes <rdar://problem/7252064>.
...
llvm-svn: 89449
2009-11-20 05:27:05 +00:00
Ted Kremenek
c1f161c012
Unused ivar checker: ivars referenced by lexically nested functions should not be flagged as unused. Fixes <rdar://problem/7254495>.
...
llvm-svn: 89448
2009-11-20 04:31:57 +00:00
Ted Kremenek
a96d02c76b
Really fix test case.
...
llvm-svn: 89430
2009-11-20 01:20:12 +00:00
Ted Kremenek
4b412f51df
Fix test case.
...
llvm-svn: 89429
2009-11-20 01:19:22 +00:00
Douglas Gregor
ee9067c51f
When we have a non-dependent expression such as
...
A::f
that occurs within a non-static member function with a type-dependent
"this", don't consider this to be a case for introduction of an
implicit "(*this)." to refer to a specific member function unless we
know (at template definition time) that A is a base class of *this.
There is some disagreement here between GCC, EDG, and Clang about the
handling of this case. I believe that Clang now has the correct,
literal interpretation of the standard, but have asked for
clarification (c++std-core-15483).
llvm-svn: 89425
2009-11-20 00:59:20 +00:00
Ted Kremenek
dd2b2b23c8
Fix null dereference in NSAutoreleasePoolChecker when analyzing messages sent to blocks.
...
llvm-svn: 89413
2009-11-20 00:12:36 +00:00
Mike Stump
a7a1b7e780
Fixup key function calculations.
...
llvm-svn: 89412
2009-11-20 00:02:19 +00:00
Douglas Gregor
deebf6efab
Deduce a ConstantArrayType from a value-dependent initializer list
...
rather than punting to a DependentSizedArrayType, tightening up our
type checking for template definitions. Thanks, John!
llvm-svn: 89407
2009-11-19 23:25:22 +00:00
Fariborz Jahanian
e774fa6412
Don't issue spurious diagnostic with Obj-C fast enumeration.
...
(radar 7409165).
llvm-svn: 89400
2009-11-19 22:12:37 +00:00
Ted Kremenek
439a6d146c
Fix crash when using --analyzer-store=region when handling initializers with nested arrays/structs whose values are not explicitly specified. Fixes <rdar://problem/7403269>.
...
llvm-svn: 89384
2009-11-19 20:20:24 +00:00
Fariborz Jahanian
1eab66c7cc
Patch to implement new-operators with default args.
...
Fixes pr5547.
llvm-svn: 89370
2009-11-19 18:39:40 +00:00
Douglas Gregor
ad2956c25d
Cope with an amusingly little anomaly with dependent types and
...
incomplete array initialization, where we have the following in a
template:
int a[] = { 1, 2, something-value-dependent };
// ...
sizeof(a);
The type of "a" appears to be a non-dependent IncompleteArrayType, but
treating it as such makes the sizeof(a) fail at template definition
time. We now correctly handle this by morphing the IncompleteArrayType
into a DependentSizedArrayType with a NULL expression, indicating that
its size has no corresponding expression (and, therefore, the type is
distinct from others).
llvm-svn: 89366
2009-11-19 18:03:26 +00:00
Ken Dyck
0138b9e1db
Define __WCHAR_WIDTH__ for use in stdint.h.
...
llvm-svn: 89353
2009-11-19 15:47:58 +00:00
Ken Dyck
f0b343f5b7
Parameterize WINT_MIN and WINT_MAX with __WINT_WIDTH__ to support arbitrary
...
widths. This corrects the values of these definitions for MSP430 and PIC16.
llvm-svn: 89350
2009-11-19 14:35:19 +00:00
Ken Dyck
a1f677c3d1
Add __WINT_WIDTH__ to paramaterize the limits of WINT_MIN and WINT_MAX in
...
stdint.h.
llvm-svn: 89348
2009-11-19 14:16:57 +00:00
Ken Dyck
575128656e
Add __SIZE_WIDTH__ to eventually replace __SIZE_TYPE__ in stdint.h.
...
llvm-svn: 89346
2009-11-19 13:42:09 +00:00
Ken Dyck
9b25f781c5
Restore __INTMAX_TYPE__, __UINTMAX_TYPE__, __PTRDIFF_TYPE__, and
...
__INTPTR_TYPE__ as the last is used in the test/CodeGen/const-init.c and all
could potentially be in use in the wild. My apologies.
llvm-svn: 89345
2009-11-19 13:18:59 +00:00
Ken Dyck
f982fc0b23
Remove __PTRDIFF_TYPE__ as it is no longer needed by stdint.h. It has been
...
replaced with __PTRDIFF_WIDTH__.
llvm-svn: 89344
2009-11-19 12:37:14 +00:00
Ken Dyck
056efe0fc7
Add __PTRDIFF_WIDTH__ macro to eventually replace __PTRDIFF_TYPE__ in stdint.h.
...
llvm-svn: 89342
2009-11-19 12:21:52 +00:00
Ken Dyck
cc11129fda
Remove __INTPTR_TYPE__ as it is no longer needed by stdint.h, which uses
...
__INTPTR_WIDTH__ instead.
llvm-svn: 89340
2009-11-19 12:15:31 +00:00
Douglas Gregor
156d50c529
Add missing testcase for Objective-C p@property getter/setter completions
...
llvm-svn: 89335
2009-11-19 07:58:03 +00:00
Daniel Dunbar
484afa2d3b
Switch -f{builtin,math-errno,rtti} and -analyzer-purge-dead to -...no... variants instead of using llvm: 🆑 :init(true) arguments.
...
llvm-svn: 89315
2009-11-19 04:55:23 +00:00
Eli Friedman
06577388d7
The sub-statement of a case statement is not an unevaluated context!
...
llvm-svn: 89303
2009-11-19 03:14:00 +00:00
Douglas Gregor
1b605f7537
Improve code completion for Objective-C message sends, so that we
...
provide completion results before each keyword argument, e.g.,
[foo Method:arg WithArg1:arg1 WithArg2:arg2]
We now complete before "WithArg1" and before "WithArg2", in addition
to completing before "Method".
llvm-svn: 89290
2009-11-19 01:08:35 +00:00
Douglas Gregor
e6078dab99
Improve the accuracy of code completion for the attributes of an @property declaration, so that we don't produce completions for attributes that would conflict with already-specified attributes
...
llvm-svn: 89281
2009-11-19 00:14:45 +00:00
Douglas Gregor
45f83ee87d
Improve code-completion results for the flags in an @property
...
declaration by providing patterns for "getter = <method>" and "setter
= <method>". As part of this, invented a new "pattern" result kind
that is merely a semantic string. The "pattern" result kind should
help with other kinds of code templates.
llvm-svn: 89277
2009-11-19 00:01:57 +00:00
Fariborz Jahanian
1e3609f6c4
Do not enter forward class 'Protocol' in decl context.
...
Will do it later. Fixes pr5552.
llvm-svn: 89269
2009-11-18 23:15:37 +00:00
Sebastian Redl
6a96bf7d6e
Do overload resolution for compound assignment even if only the RHS is overloadable. Compound assignment may be overloaded as a non-member, and anyway the overload resolution is necessary because it triggers implicit (used-defined) conversions. Fixes PR5512, but not really the deeper issues lurking. Those are standard defects.
...
llvm-svn: 89268
2009-11-18 23:10:33 +00:00
John McCall
1f6339e1fb
Resolve this FIXME: unelaborated lookups are ambiguous, too.
...
llvm-svn: 89266
2009-11-18 23:05:13 +00:00
Douglas Gregor
52e78bd992
Code completion after @dynamic
...
llvm-svn: 89265
2009-11-18 22:56:13 +00:00
John McCall
1f82f2462d
Overhaul previous-declaration and overload checking to work on lookup results
...
rather than NamedDecl*. This is a major step towards eliminating
OverloadedFunctionDecl.
llvm-svn: 89263
2009-11-18 22:49:29 +00:00
Douglas Gregor
11f3050141
Test case for parsing-recovery change to @synthesized
...
llvm-svn: 89260
2009-11-18 22:37:38 +00:00
Douglas Gregor
5d6498827b
Code completion for Objective-C @synthesized.
...
llvm-svn: 89259
2009-11-18 22:32:06 +00:00
Fariborz Jahanian
fff3fb2b35
ignore parens surounding the type when diagnosing
...
pointer-to-member cast types used in expressions.
llvm-svn: 89255
2009-11-18 22:16:17 +00:00
Fariborz Jahanian
1bc0f9affc
This patch fixes a bug in misdiagnosing correct
...
use of pointer to data member.
llvm-svn: 89251
2009-11-18 21:54:48 +00:00
Sebastian Redl
d5b2453722
Track overriding methods when instantiating a template class. Fixes PR5550.
...
llvm-svn: 89248
2009-11-18 21:51:29 +00:00
Sebastian Redl
931e0bd331
Pretend destructors are const and volatile. This allows calling them with const and/or volatile objects. Fixes PR5548.
...
llvm-svn: 89244
2009-11-18 20:55:52 +00:00
Sebastian Redl
4990a6347a
Don't generate superfluous and ambiguous built-in candidates for multi-level array subscript and arithmetic. Fixes PR5546.
...
llvm-svn: 89242
2009-11-18 20:39:26 +00:00
Ken Dyck
2d4371d666
Define intptr_t and uintptr_t in terms of their equivalent exact-width types.
...
llvm-svn: 89237
2009-11-18 20:24:13 +00:00
Daniel Dunbar
9b33352856
Update test to stop scanning things in the predefines buffer, this isn't adding
...
value.
llvm-svn: 89235
2009-11-18 20:19:44 +00:00
Ken Dyck
24cfcf15c3
Predefine __INTPTR_WIDTH__ for future use in stdint.h.
...
llvm-svn: 89231
2009-11-18 20:05:48 +00:00
Ken Dyck
fa01168a5c
Remove the __INTMAX_TYPE__ and __UINTMAX_TYPE__ built-in macros as they are no
...
longer used by stdint.h.
llvm-svn: 89230
2009-11-18 19:51:06 +00:00
Ken Dyck
ac11b7b625
Define INTMAX_C and UINTMAX_C in terms of the corresponding exact-width
...
INTn_C and UINTn_C macros.
llvm-svn: 89226
2009-11-18 19:42:57 +00:00
Ken Dyck
63c8ef8256
Define INTMAX_MIN, INTMAX_MAX, and UINTMAX_MAX in terms of the limit macros for
...
their corresponding exact-width type.
llvm-svn: 89224
2009-11-18 19:22:15 +00:00
Douglas Gregor
5d34fd3674
Implement code completion for Objective-C category names in @interface
...
and @implementation declarations.
llvm-svn: 89223
2009-11-18 19:08:43 +00:00
Ken Dyck
47181584f1
Define intmax_t and uintmax_t as the [u]intN_t type corresponding to
...
__INTMAX_WIDTH__.
llvm-svn: 89221
2009-11-18 18:57:04 +00:00
Fariborz Jahanian
41e803d8c7
Don't warn if objc method param types in declaration and
...
implementation mismatch in their qualifiers only.
This will match similar behavior in c/c++ and
fixes radar 7211653.
llvm-svn: 89220
2009-11-18 18:56:09 +00:00