Mike Stump
101f052faf
Simplify rtti building code a little. Prep for reuse for throw rtti
...
generation.
llvm-svn: 89416
2009-11-20 00:31:50 +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
John McCall
8cd7813ca3
Draw a brighter line between "unresolved" expressions, where we have done the
...
appropriate lookup and simply can't resolve the referrent yet, and
"dependent scope" expressions, where we can't do the lookup yet because the
entity we need to look into is a dependent type.
llvm-svn: 89402
2009-11-19 22:55:06 +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
Daniel Dunbar
84e8a249fa
Fix some default in the option classes, and some CompilerInvocation argification
...
errors.
llvm-svn: 89388
2009-11-19 20:54:59 +00:00
Mike Stump
cd2b821241
Fixup address point computations. WIP.
...
llvm-svn: 89386
2009-11-19 20:52:19 +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
Ted Kremenek
0c54d2da14
Remove printf statement.
...
llvm-svn: 89383
2009-11-19 20:01:53 +00:00
Ted Kremenek
4b35a2ed08
Only fetch the ASTContext object within the assertion.
...
llvm-svn: 89375
2009-11-19 19:04:08 +00:00
Daniel Dunbar
5d26212f6b
Silence -Asserts warning.
...
llvm-svn: 89373
2009-11-19 18:53:25 +00:00
Daniel Dunbar
8c9efca5bd
Driver: Move INPUT and UNKNOWN sentinel options into the OptParser.td file.
...
llvm-svn: 89371
2009-11-19 18:47:17 +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
John Thompson
e467e19766
Added preliminary support step for PS3
...
llvm-svn: 89362
2009-11-19 17:18:50 +00:00
Ken Dyck
aff01ceb95
Define WCHAR_MIN and WCHAR_MAX in terms of __WCHAR_WIDTH__ for consistency with
...
other limit macros.
llvm-svn: 89355
2009-11-19 15:53:08 +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
279ed5189c
Construct definition of SIZE_MAX from __SIZE_WIDTH__ to support targets of
...
arbitrary widths.
llvm-svn: 89347
2009-11-19 14:03:24 +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
8af6035ac9
Construct the macro body of PTRDIFF_MAX and PTRDIFF_MIN from __PTRDIFF_WIDTH__.
...
llvm-svn: 89343
2009-11-19 12:33:01 +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
c8537c5156
Objective-C code completion within properties after "setter = " or
...
"getter = ", to provide suitable method names.
llvm-svn: 89334
2009-11-19 07:41:15 +00:00
Daniel Dunbar
51cd8f085f
Sketch some 'clang -cc1' support, for testing parts of CompilerInvocation.
...
llvm-svn: 89333
2009-11-19 07:37:51 +00:00
Daniel Dunbar
f57e69c78a
Add missing dependency for CMake.
...
llvm-svn: 89332
2009-11-19 07:37:40 +00:00
Daniel Dunbar
be6ef3874f
Sketch .td file and build system goop for OptTable based clang-cc options.
...
llvm-svn: 89330
2009-11-19 07:19:04 +00:00
Daniel Dunbar
52ed5feee5
Factor out OptTable::ParseArgs, for parsing an entire argument vector.
...
llvm-svn: 89327
2009-11-19 06:35:06 +00:00
Daniel Dunbar
da9e8e225d
clang-cc: Remove some more llvm: 🆑 :init arguments, by only setting values when
...
the argument is given.
Also, tweak Opt.Sysroot defaulting.
llvm-svn: 89318
2009-11-19 05:32:21 +00:00
Daniel Dunbar
d80277895d
Change -code-completion-debug-printer to -no-code-completion-debug-printer.
...
Also, tweak a few help strings and update CompilerInvocation serialization for prev change.
llvm-svn: 89317
2009-11-19 05:32:09 +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
Daniel Dunbar
da13faf982
Driver: ArgList doesn't depend on Options.h anymore.
...
llvm-svn: 89313
2009-11-19 04:25:22 +00:00
Daniel Dunbar
b323fd72ab
Driver: Take option ID for {Input,Unknown}Option, to drop dependency on actual options.
...
llvm-svn: 89312
2009-11-19 04:25:06 +00:00
Daniel Dunbar
8c00957008
Driver: Introduce OptSpecifier class for protecting access to an option id.
...
llvm-svn: 89310
2009-11-19 04:14:53 +00:00
Mike Stump
aa51ad6815
Refine vtable, rtti and rtti name instantiation so that they follow
...
the key function. All the code is wired up, but won't work yet, as I
had to turn off key function calculation as it doesn't work yet.
Also, we refine visibility of the vtable, rtti and rtti name to match
the class, as well as as arrange for all the symbols to be internal
for anonymous namespace entities.
llvm-svn: 89309
2009-11-19 04:04:36 +00:00
Daniel Dunbar
fffd18167d
Driver: Switch to using explicit {getLast,has}ArgNoClaim functions instead of taking a Claim argument.
...
- Most driver code always claims, and bool arguments don't play nice with the overloads.
llvm-svn: 89308
2009-11-19 04:00:53 +00:00
Mike Stump
beab381d2d
This doesn't work yet.
...
llvm-svn: 89307
2009-11-19 03:53:54 +00:00
Daniel Dunbar
b3b47b8dde
Driver: Resolve inconsistency in matching options against options which are
...
aliases -- just treat this case as an (unchecked) client error.
llvm-svn: 89306
2009-11-19 03:26:50 +00:00
Daniel Dunbar
0bfb21e4b0
Use Option::matches instead of direct ID comparison.
...
llvm-svn: 89305
2009-11-19 03:26:40 +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
Mike Stump
1a139f8fb5
Improve instantiation control for rtti data and allow key functions to
...
instantiate a class. WIP.
llvm-svn: 89289
2009-11-19 01:08:19 +00:00
Daniel Dunbar
46fffee081
Driver: Switch to using TableGen'erated Options.inc instead of Options.def file.
...
llvm-svn: 89288
2009-11-19 01:03:50 +00:00
Mike Stump
1960b20403
Refine linkage on thunks. WIP.
...
llvm-svn: 89287
2009-11-19 00:49:05 +00:00
Daniel Dunbar
aa767378ac
Driver: Split OptTable out into OptTable.{h,cpp}
...
llvm-svn: 89283
2009-11-19 00:15:11 +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
Douglas Gregor
36029f4118
Rename CodeCompleteObjCProperty to something more specific. No functionality change.
...
llvm-svn: 89267
2009-11-18 23:08:07 +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
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
Daniel Dunbar
7147de2c4e
Make MSVC happy.
...
llvm-svn: 89247
2009-11-18 21:42:57 +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
68fa5afada
Construct INTPTR_MIN, INTPTR_MAX, and UINTPTR_MAX from the exact-width limit
...
macros corresponding to __INTPTR_WIDTH__.
llvm-svn: 89239
2009-11-18 20:36:29 +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
26228a0d7a
Driver: Rework OptTable to have no dependency on the options it manages.
...
llvm-svn: 89234
2009-11-18 20:19:36 +00:00
Daniel Dunbar
a76762c9fb
Driver: Make local type name more distinct.
...
llvm-svn: 89233
2009-11-18 20:19:26 +00:00
Daniel Dunbar
f324fa7095
Driver: Store Option ID field as unsigned to drop dependency on the options
...
type.
llvm-svn: 89232
2009-11-18 20:19:19 +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
Daniel Dunbar
f2ce9a217d
Use llvm::sys::Path to check isAbsolute, instead of hard coding. Also, remove random FIXME (?).
...
llvm-svn: 89229
2009-11-18 19:50:41 +00:00
Douglas Gregor
88e72a0bf6
Improve diagnostics and recovery when parsing @synthesized definitions
...
llvm-svn: 89227
2009-11-18 19:45:45 +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
Mike Stump
ea950e249f
Reflow to fit 80-col.
...
llvm-svn: 89222
2009-11-18 18:57:56 +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
Mike Stump
643818bdd8
Trim whitespace.
...
llvm-svn: 89219
2009-11-18 18:52:31 +00:00
Fariborz Jahanian
76197416ac
Improve on diagnosing type mismatches because of
...
lack of viable convesion functions.
llvm-svn: 89216
2009-11-18 18:26:29 +00:00
Sebastian Redl
55db1ec3ec
CastsAwayConstness shouldn't care if member pointers point into different classes. Fixes PR5545.
...
llvm-svn: 89215
2009-11-18 18:10:53 +00:00
Daniel Dunbar
21432d38a0
Driver: Switch Options.def to storing flags as a bitmask (instead of mangled
...
into a string).
llvm-svn: 89212
2009-11-18 17:42:34 +00:00
Douglas Gregor
49c22a74eb
Code completion for Objective-C class names after @interface,
...
@implementation, and in the declaration of the superclass of an
@interface.
llvm-svn: 89207
2009-11-18 16:26:39 +00:00
Edward O'Callaghan
c14422223b
Fix passing stdc++ correctly in the FreeBSD toolchain support, Credit to Roman Divacky.
...
llvm-svn: 89205
2009-11-18 14:51:31 +00:00
Ken Dyck
c0c98291e0
Predefine __INTMAX_WIDTH__ for the future parameterization of INTMAX macros in
...
stdint.h.
llvm-svn: 89203
2009-11-18 13:52:57 +00:00
Eli Friedman
acfb1dfa4d
Minor cleanup to member pointer handling.
...
llvm-svn: 89201
2009-11-18 09:41:26 +00:00
John McCall
5cebab12d5
Split LookupResult into its own header.
...
llvm-svn: 89199
2009-11-18 07:57:50 +00:00
Eli Friedman
928a567af1
Clean up EmitPointerToDataMemberBinaryExpr a bit.
...
llvm-svn: 89197
2009-11-18 05:01:17 +00:00
Douglas Gregor
5b4671c328
Code completion after @property, providing the names of forward-declared properties
...
llvm-svn: 89196
2009-11-18 04:49:41 +00:00
Douglas Gregor
baf6961ed4
Code completion for Objective-C properly lists
...
llvm-svn: 89194
2009-11-18 04:19:12 +00:00
Mike Stump
c0f632d6b2
Set up vtable visibility appropriately.
...
llvm-svn: 89193
2009-11-18 04:00:48 +00:00
Eli Friedman
030eee4e5c
Make CreateOverloadedUnaryOp build the correct node for postinc/dec operators.
...
llvm-svn: 89192
2009-11-18 03:58:17 +00:00
Mike Stump
83d5e00a96
Propagate hidden to the _ZTS symbols appropriately. WIP.
...
llvm-svn: 89191
2009-11-18 03:46:51 +00:00
Eli Friedman
794290ca29
Add an assertion to catch bad calls to EmitCallArgs.
...
llvm-svn: 89190
2009-11-18 03:42:04 +00:00
Eli Friedman
cfdd40c807
Simplify ActOnPostfixUnaryOp.
...
llvm-svn: 89188
2009-11-18 03:38:04 +00:00
Mike Stump
c5d2ed73ff
Be sure to set visibility for ZTI symbols for classes from the class.
...
llvm-svn: 89186
2009-11-18 03:21:29 +00:00
Mike Stump
f77aaa0089
Make _ZTI symbols hidden. This speeds up the dynamic linker.
...
llvm-svn: 89185
2009-11-18 02:53:28 +00:00
John McCall
e61f2ba7e4
Incremental progress on using declarations. Split UnresolvedUsingDecl into
...
two classes, one for typenames and one for values; this seems to have some
support from Doug if not necessarily from the extremely-vague-on-this-point
standard. Track the location of the 'typename' keyword in a using-typename
decl. Make a new lookup result for unresolved values and deal with it in
most places.
llvm-svn: 89184
2009-11-18 02:36:19 +00:00
Ted Kremenek
0469b7ea00
Add special clang_getCursor() support for @class . Handles <rdar://problem/7383421>.
...
llvm-svn: 89183
2009-11-18 02:02:52 +00:00
Douglas Gregor
9291bade4f
Code completion for member accesses that involve Objective-C properties and instance variables
...
llvm-svn: 89182
2009-11-18 01:29:26 +00:00