Ken Dyck
73536eab67
Remove CharUnits::toString() to eliminate dependence on <string>.
...
llvm-svn: 91978
2009-12-23 02:44:11 +00:00
Fariborz Jahanian
02e07737a9
Patch to do more rewrite of __block variables.
...
Still WIP.
llvm-svn: 91977
2009-12-23 02:07:37 +00:00
John McCall
230a5d527e
Eliminate a completely unnecessary buffer copy when parsing float literals.
...
llvm-svn: 91974
2009-12-23 01:37:10 +00:00
Ted Kremenek
bb7a826844
Teach GRExprEngine::VisitLValue that we don't handle CXXZeroInitValueExprs yet.
...
llvm-svn: 91970
2009-12-23 01:25:13 +00:00
Ted Kremenek
343b51271d
Also treat the type of the subexpression as a pointer in GRExprEngine::VisitCast when the expression is handled as an lvalue.
...
llvm-svn: 91969
2009-12-23 01:19:20 +00:00
Ted Kremenek
1f76b51d3f
Add assertion to check for valid source ranges.
...
llvm-svn: 91966
2009-12-23 01:09:59 +00:00
John McCall
b50c443df2
Test case for PR5134.
...
llvm-svn: 91965
2009-12-23 01:09:14 +00:00
Daniel Dunbar
e0d2691b88
Driver: Fix '... -O4 -O0 ...', which was generating bitcode.
...
llvm-svn: 91962
2009-12-23 00:47:42 +00:00
Daniel Dunbar
f4894fe0eb
Driver: Drop ToolChain::getHost()
...
llvm-svn: 91960
2009-12-23 00:46:38 +00:00
John McCall
db3062cd4e
Test case from PR5476.
...
llvm-svn: 91957
2009-12-23 00:44:38 +00:00
John McCall
0a4bb26ed0
Set a member's access specifier even if it doesn't match the previous specifier.
...
Prevents an assert on successive redeclarations.
Fixed PR5573.
llvm-svn: 91956
2009-12-23 00:37:40 +00:00
Ted Kremenek
22cc1a8438
Add basic support for analyzing CastExprs as lvalues.
...
llvm-svn: 91952
2009-12-23 00:26:16 +00:00
Douglas Gregor
04c5f973ee
Objective-C methods can be variadic, too. Who knew.
...
llvm-svn: 91951
2009-12-23 00:21:46 +00:00
Douglas Gregor
8d48e9a26e
Switch Sema::CreateOverloadedUnaryOp over to InitializationSequence.
...
llvm-svn: 91948
2009-12-23 00:02:00 +00:00
Nuno Lopes
56abcbdb47
warn when attribute warn_unused_result is applied to void functions.
...
while at it, remove an outdated FIXME
llvm-svn: 91946
2009-12-22 23:59:52 +00:00
Douglas Gregor
684d7bdc43
Allow the first parameter of operator new to be a cv-qualified
...
size_t. Also, fix an issue with initialization of parameters in calls,
where we weren't removing the cv-qualifiers on the parameter type
itself. Fixes PR5823.
llvm-svn: 91941
2009-12-22 23:42:49 +00:00
Daniel Dunbar
c7a67b7877
Driver: When linking, don't warn about unused arguments which are obviously only
...
used during compilation.
- There is no easy way to define this group properly, unfortunately, and maybe
this is a losing strategy. For now this is unambiguous more friendly, though.
llvm-svn: 91940
2009-12-22 23:19:32 +00:00
Chris Lattner
801fda871b
implement -W[no-]fatal-errors, patch by Christian Adåker!
...
llvm-svn: 91938
2009-12-22 23:12:53 +00:00
Ted Kremenek
c0895eb730
Add c++-analyzer symlink (which is used by scan-build)
...
llvm-svn: 91937
2009-12-22 23:00:32 +00:00
Douglas Gregor
19fc0b753a
Make sure that reinterpret_cast gets a CastKind on all successful
...
paths. Fixes "cannot compile this unexpected cast lvalue yet" error in
llvm/lib/Analysis/IPA/GlobalsModRef.cpp.
llvm-svn: 91932
2009-12-22 22:47:22 +00:00
Douglas Gregor
39740dce30
Revert accidental commit
...
llvm-svn: 91930
2009-12-22 22:30:51 +00:00
Chris Lattner
261dd5ec06
accept -Wcomments as an alias for -Wcomment, PR5855
...
llvm-svn: 91929
2009-12-22 22:29:12 +00:00
John McCall
a1d8550778
Add using shadow decls to the "instantiated locals" map, fixing PR5847.
...
llvm-svn: 91928
2009-12-22 22:26:37 +00:00
Douglas Gregor
b6ea60872d
Switch Sema::AddCXXDirectInitializerToDecl over to InitializationSequence
...
llvm-svn: 91927
2009-12-22 22:17:25 +00:00
Ted Kremenek
e19711d223
Add transfer functions support for visiting an Objective-C message expression as an lvalue when the return type is a C++ reference.
...
llvm-svn: 91926
2009-12-22 22:13:46 +00:00
Daniel Dunbar
42fe663e3b
ARM: Remove a FIXME, it's not actually more complicated than that.
...
llvm-svn: 91924
2009-12-22 21:59:17 +00:00
Douglas Gregor
0a70c4d9a2
Switch parameter passing for overloaded binary operators to
...
InitializationSequence. Fixes the -fsyntax-only failure in
llvm/lib/Transforms/Scalar/InstructionCombining.cpp.
llvm-svn: 91921
2009-12-22 21:44:34 +00:00
Douglas Gregor
dc72875d25
Serialize the NoReturn bit on FunctionTypes for precompiled headers
...
llvm-svn: 91911
2009-12-22 18:11:50 +00:00
Douglas Gregor
613bf10470
Enter the scope of an initializer for direct-initialization as well as
...
for copy-initialization.
llvm-svn: 91909
2009-12-22 17:47:17 +00:00
Douglas Gregor
2e9c795df0
When transforming a C++ "new" expression that was not explicitly given
...
a size, check whether the transformed type is itself an array type. If
so, take the major array bound as the size to allocate. Fixes PR5833.
llvm-svn: 91907
2009-12-22 17:13:37 +00:00
Douglas Gregor
bbeb5c391c
Switch parameter-passing for calls via function pointers (where we
...
don't have a FunctionDecl) over to InitializationSequence.
llvm-svn: 91906
2009-12-22 16:09:06 +00:00
Douglas Gregor
1b3039344b
Switch InitializedEntity from TypeLoc down to just QualTypes, since we don't use the location information but we did spend a bunch of time building faked-up TypeLocs
...
llvm-svn: 91905
2009-12-22 15:35:07 +00:00
Ken Dyck
8c89d59c82
Move the implementation of ASTContext::getTypeSizeInChars() to the .cpp file to
...
avoid #including CharUnits.h in ASTContext.h.
llvm-svn: 91903
2009-12-22 14:23:30 +00:00
Douglas Gregor
96596c98fb
Switch initialization of parameters in a call over to
...
InitializationSequence (when a FunctionDecl is present). This required
a few small fixes to initialization sequences:
- Make sure to use the adjusted parameter type for initialization of
function parameters.
- Implement transparent union calling semantics in C
llvm-svn: 91902
2009-12-22 07:24:36 +00:00
Anders Carlsson
8a35c7982c
Make sure that we mangle overloaded operators that are member functions correctly, giving them the correct arity.
...
With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being).
llvm-svn: 91893
2009-12-22 06:36:32 +00:00
Anders Carlsson
3caa2b486d
Work around PR5514.
...
llvm-svn: 91891
2009-12-22 06:13:42 +00:00
Chris Lattner
d806cbc98d
fix a bug handling the gnu ?: extension. Patch by Storlek on IRC,
...
who prefers to be stealthy and mysterious.
llvm-svn: 91888
2009-12-22 06:00:13 +00:00
Anders Carlsson
9c45ad7a1b
When we simply return a retained member expression when instantiating, we must also mark the member decl as referenced.
...
llvm-svn: 91887
2009-12-22 05:24:09 +00:00
Eli Friedman
e2808379b8
Zap CheckInitializerTypes.
...
llvm-svn: 91884
2009-12-22 02:50:30 +00:00
Eli Friedman
5f101b95c6
Switch default arguments over to InitializationSequence.
...
llvm-svn: 91883
2009-12-22 02:46:13 +00:00
Eli Friedman
a553d4ac95
Switch compound literals over to InitializationSequence.
...
llvm-svn: 91882
2009-12-22 02:35:53 +00:00
Eli Friedman
463e523ad8
Switch file-scope assignment initialization over to InitializationSequence.
...
llvm-svn: 91881
2009-12-22 02:10:53 +00:00
Daniel Dunbar
3780f0b680
x86_64: Structures with no fields but which have padding should be classified as
...
integer.
- This is consistent, but may not be correct. I will revisit x86_64 ABI handling for C++ as a whole at some point.
- PR5831.
llvm-svn: 91874
2009-12-22 01:19:25 +00:00
Douglas Gregor
da8cdbce35
Centralize the emission/suppression/delay of diagnostics describing runtime before in the new function Sema::DiagRuntimeBehavior, addressing one of Chris' comments.
...
llvm-svn: 91870
2009-12-22 01:01:55 +00:00
John McCall
463e10cbd5
Stop diagnosing the use of inner classes as friends. ddunbar asked whether
...
this was useful, and on review Doug and I decided it was probably on the level
of a bug in the standard and therefore not worth a warning even in -pedantic.
If someone disagrees and urgently wants clang++ to warn about this in strict
c++98 mode, we can talk about it.
llvm-svn: 91868
2009-12-22 00:59:39 +00:00
Fariborz Jahanian
8120346c57
Template code for rewrite of __block variables - wip.
...
llvm-svn: 91865
2009-12-22 00:48:54 +00:00
Douglas Gregor
507eb87f05
Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl
...
llvm-svn: 91862
2009-12-22 00:34:07 +00:00
Douglas Gregor
4141d5bea2
When converting from a type to itself or one of its base classes via a
...
constructor call, the conversion is only a standard conversion
sequence if that constructor is a copy constructor. This fixes PR5834
in a semi-lame way, because the "real" fix will be to move over to
InitializationSequence. That will happen "soonish", but not now.
llvm-svn: 91861
2009-12-22 00:21:20 +00:00
Douglas Gregor
2bb0765bb4
When filling in value initializations within an initializer list, be
...
sure to fill in the initialized member of a union when a member was
explicitly designated. Fixes PR5843.
llvm-svn: 91858
2009-12-22 00:05:34 +00:00
Fariborz Jahanian
e175eeb117
Providing support for rewriting of block copy/dispose of
...
imported block variables. WIP.
llvm-svn: 91856
2009-12-21 23:31:42 +00:00