David Chisnall
bc8bdea183
Fixed crash when using undefined protocols (GNU runtime).
...
llvm-svn: 89457
2009-11-20 14:50:59 +00:00
Benjamin Kramer
df5280df05
Add a workaround to silence a bogus g++-4.4 -pedantic warning.
...
driver.cpp:211: warning: ISO C++ forbids zero-size array 'argv'
llvm-svn: 89455
2009-11-20 11:49:06 +00:00
Benjamin Kramer
7d875c7e7e
Fix typo GCC 4.3 warned about.
...
llvm-svn: 89453
2009-11-20 10:03:00 +00:00
Zhongxing Xu
adfd1a2e8b
no need to cast.
...
llvm-svn: 89451
2009-11-20 06:14:56 +00:00
Eli Friedman
564048e692
Fix a couple minor memory leaks.
...
llvm-svn: 89450
2009-11-20 05:53:06 +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
Zhongxing Xu
1aec3c0427
No need to pass the state argument explicitly.
...
llvm-svn: 89447
2009-11-20 04:09:56 +00:00
Zhongxing Xu
ab0ae2139a
Revert r89437 and add a comment.
...
llvm-svn: 89446
2009-11-20 03:50:46 +00:00
Mike Stump
d8d26d06a5
Implement throw d, where d is a class type that requires copy
...
construction. WIP.
llvm-svn: 89442
2009-11-20 02:31:07 +00:00
Douglas Gregor
3153da7154
Don't build an explicit conversion to a reference type
...
llvm-svn: 89441
2009-11-20 02:31:03 +00:00
Mike Stump
4d7a07bdaf
Handle throw d, where d is a class type but only has a trivial copy
...
constructor. WIP.
llvm-svn: 89438
2009-11-20 01:57:39 +00:00
Zhongxing Xu
6d9a942174
It's unnecessary to check for unknown at this point.
...
llvm-svn: 89437
2009-11-20 01:56:48 +00:00
Daniel Dunbar
f7535121a2
Driver: Add parsing for TargetOptions to CompilerInvocation::CreateFromArgs.
...
llvm-svn: 89435
2009-11-20 01:46:44 +00:00
Daniel Dunbar
c5d28f2ea9
Ignore -Wstrict-overflow={3,4,5} for now.
...
llvm-svn: 89433
2009-11-20 01:31:27 +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
Mike Stump
d1782cc478
Add suport for throw;. WIP.
...
llvm-svn: 89424
2009-11-20 00:56:31 +00:00
Mike Stump
18fc44dfd3
Fix rtti generation for throws. WIP.
...
llvm-svn: 89420
2009-11-20 00:43:57 +00:00
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
Daniel Dunbar
69d98a6818
Add missing dependency on TableGen.
...
llvm-svn: 89387
2009-11-19 20:54:45 +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
0c78ae18ab
Fix 80 col. violation.
...
llvm-svn: 89382
2009-11-19 19:59:42 +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
Daniel Dunbar
0f32a4bc86
Driver: Add Sentinel flag to option kinds.
...
llvm-svn: 89367
2009-11-19 18:09:06 +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
Douglas Gregor
45959e5556
Try yet again to de-bork CMake Windows build w.r.t. clang++
...
llvm-svn: 89361
2009-11-19 16:42:34 +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