Chris Lattner
3f5124815d
commit test update
...
llvm-svn: 86396
2009-11-07 18:59:51 +00:00
Douglas Gregor
358e7745ed
Cope with calls to operator() templates. Fixes PR5419.
...
llvm-svn: 86387
2009-11-07 17:23:56 +00:00
John McCall
b61e9d03c1
Support -Wshorten-64-to-32 for integer types only, which seems to satisfy the
...
core requirements. Fixes rdar://problem/6389954
llvm-svn: 86364
2009-11-07 09:03:53 +00:00
Anders Carlsson
d3569efb5a
Add bug number.
...
llvm-svn: 86357
2009-11-07 08:24:59 +00:00
John McCall
b397956338
Improve -Wconversion by permitting binary operations on values of the target
...
type (or smaller) to stay "closed" within the type.
llvm-svn: 86356
2009-11-07 08:15:46 +00:00
Anders Carlsson
f5dc6fa252
Don't treat variables with non-trivial ctors or dtors as unused. Fixes PR5407.
...
llvm-svn: 86352
2009-11-07 07:26:56 +00:00
Anders Carlsson
c0a3561f0f
Always mangle functions with special names. Fixes PR5420.
...
llvm-svn: 86350
2009-11-07 07:15:03 +00:00
Anders Carlsson
3d70975917
When instantiating a field decl, make sure to clone its attributes. With this change FileCheck no longer crashes when it's run without any arguments.
...
llvm-svn: 86344
2009-11-07 06:07:58 +00:00
Anders Carlsson
ce21431fc4
When looking up and adding substitutions to the substitution table, make sure to always use the canonical declaration. With tihs change, FileCheck compiles and links but crashes during startup.
...
llvm-svn: 86339
2009-11-07 04:26:04 +00:00
John McCall
554e857cf4
Test case for -Wconversion.
...
llvm-svn: 86327
2009-11-07 03:30:38 +00:00
John McCall
fceb64bd04
Implement -Wconversion. Off by default, in the non-gcc group. There's
...
significant work left to be done to reduce the false-positive rate here.
llvm-svn: 86326
2009-11-07 03:30:10 +00:00
Steve Naroff
eae650366d
Add basic code completion support for ObjC messages.
...
Still a work in progress...
llvm-svn: 86323
2009-11-07 02:08:14 +00:00
Devang Patel
22053c0f46
MIPS linkage name confuses gdb here. Generate and test DW_AT_name here.
...
llvm-svn: 86318
2009-11-07 00:41:37 +00:00
Eli Friedman
01cad4c6b0
Make sure isCopyAssignment is only true for actual copy assignment operators,
...
instead of all assignment operators. The mistake messes up IRGen because
it ends up assuming that the assignment operator is actually the implicit
copy assignment operator, and therefore tries to emit the RHS as an lvalue.
llvm-svn: 86307
2009-11-07 00:02:45 +00:00
Douglas Gregor
9eb7701dff
Various improvements to Clang's code-completion infrastructure:
...
- Introduce more code-completion string "chunk" kinds that describe
symbols, the actual text that the user is expected to type, etc.
- Make the generation of macro results optional, since it can be
slow
- Make code-completion accessible through the C API, marshalling the
code-completion results through a temporary file (ick) to maintain
process separation.
The last doesn't have tests yet.
llvm-svn: 86306
2009-11-07 00:00:49 +00:00
Mike Stump
cd6f9ed906
Refine the non-virtual this adjustment. Optimize out virtual this
...
adjustments of zero.
llvm-svn: 86300
2009-11-06 23:27:42 +00:00
Fariborz Jahanian
3600f41a3a
Since default writable attribute is 'assign', allow
...
specification of 'assign' (no warning to be issued),
when a continuation class makes a 'readonly' attribute
'readwrite' but also specifies the 'assign' attribute.
(this matches gcc's behavior and prevents exessive
warnings)/
llvm-svn: 86297
2009-11-06 22:59:12 +00:00
Fariborz Jahanian
2f487126ce
Make fragile-abi test run happy.
...
llvm-svn: 86293
2009-11-06 22:15:27 +00:00
Fariborz Jahanian
95239110cd
Fix a bogus objective-c warning with -pedantic.
...
(radar 7370882).
llvm-svn: 86291
2009-11-06 21:48:47 +00:00
Fariborz Jahanian
e8e631c912
Prevent a code gen. crash on empty unions - pr5408.
...
llvm-svn: 86287
2009-11-06 20:47:40 +00:00
Ted Kremenek
e3423e84a9
testing: Merge PR3135.c into misc-ps-region-store.m.
...
llvm-svn: 86286
2009-11-06 20:32:38 +00:00
Ted Kremenek
df9ca633b6
Sentence-case bug type, and pull tests from region-only-test.c into misc-ps-region.store.m (removing an extra unneeded test file). Also add a bunch of FIXME comments for future enhancements.
...
llvm-svn: 86282
2009-11-06 20:16:31 +00:00
Anders Carlsson
443f677302
Simplify the debug info code, handle lvalue references and template specializations.
...
llvm-svn: 86277
2009-11-06 19:19:55 +00:00
Fariborz Jahanian
c2d71b531c
This patch fixes code gen. part of pr5333 (Conversion
...
using elipsis conversion).
llvm-svn: 86276
2009-11-06 18:47:57 +00:00
Anders Carlsson
8a6512961f
Handle QualifiedNameType and SubstTemplateTypeParmType types in CGDebugInfo::CreateTypeNode.
...
llvm-svn: 86274
2009-11-06 18:45:16 +00:00
Nuno Lopes
ac5eba93ca
add test case for PR3135 which was already fixed
...
llvm-svn: 86273
2009-11-06 18:42:13 +00:00
Zhongxing Xu
167bce9cf1
Add a checker for CWE-466: Return of Pointer Value Outside of Expected Range.
...
llvm-svn: 86252
2009-11-06 13:30:44 +00:00
John McCall
e46fd8531c
compare.c also needs a target triple now, and improve some comments while we're
...
at it.
llvm-svn: 86243
2009-11-06 08:53:51 +00:00
John McCall
99ce6bfe28
Improve the -Wsign-compare heuristics:
...
* If the unsigned type is smaller than the signed type, never warn, because
its value will not change when zero-extended to the larger type.
* If we're testing for (in)equality, and the unsigned value is an integer
constant whose sign bit is not set, never warn, because even though the
signed value might change, it can't affect the result of the equality.
Also make the comparison test cases much more rigorous, and have them expose
the subtle differences between C and C++ here.
llvm-svn: 86242
2009-11-06 08:49:08 +00:00
Douglas Gregor
d82ae38d53
Rework the fix-it hint for code like
...
get_origin->x
where get_origin is actually a function and the user has forgotten the
parentheses. Instead of giving a lame note for the fix-it, give a
full-fledge error, early, then build the call expression to try to
recover.
llvm-svn: 86238
2009-11-06 06:30:47 +00:00
Douglas Gregor
f4f2ff773b
Improve recovery when we fail to parse the operand of a C++ named cast. Fixes PR5210
...
llvm-svn: 86234
2009-11-06 05:48:00 +00:00
Douglas Gregor
6af6c3ee56
Turn off -Wsign-compare warnings by default
...
llvm-svn: 86233
2009-11-06 05:24:12 +00:00
Anders Carlsson
421a5c9651
If a member variable of reference type is bound to a temporary in its member initializer it needs to be destroyed at the end of the constructor.
...
llvm-svn: 86230
2009-11-06 04:19:02 +00:00
Anders Carlsson
5852b13827
If a member initializer create temporaries we need to destroy them. Fixes PR5077.
...
llvm-svn: 86225
2009-11-06 04:11:09 +00:00
Anders Carlsson
9e4e0237e4
Handle ParenExprs in mangleExpression.
...
llvm-svn: 86218
2009-11-06 02:50:19 +00:00
Mike Stump
72431bd9ea
Refine the vcall for a function that is defined in a virtual base
...
class that is overridden in a base that isn't morally virtual.
llvm-svn: 86217
2009-11-06 02:38:24 +00:00
Douglas Gregor
ad8b22269e
If we have a C-style cast, functional cast, or a static_cast to a
...
class type, don't perform the array-to-pointer or function-to-pointer
conversions, because we may end up binding a reference to a function
or array.
With this change, FileCheck now passes -fsyntax-only!
llvm-svn: 86211
2009-11-06 01:14:41 +00:00
Douglas Gregor
02ba0ea461
When we encounter a derived-to-base conversion when performing an
...
implicit conversion sequence, check the validity of this conversion
and then perform it.
llvm-svn: 86210
2009-11-06 01:02:41 +00:00
Mike Stump
aea4b8a0c3
Convert file over to checking the .ll file for codegen. Also, we
...
speed up this file by not doing twice the checking.
llvm-svn: 86205
2009-11-06 00:18:25 +00:00
Douglas Gregor
b2186fe23c
Make sure that EnumConstantDecls always get a type, even when they have type-dependent initializers.
...
llvm-svn: 86197
2009-11-06 00:03:12 +00:00
Chris Lattner
e4a8c64731
clean up integer preprocessor type definitions, patch by Ken Dyck!
...
llvm-svn: 86177
2009-11-05 21:21:32 +00:00
Sebastian Redl
87869bc435
Make ASTContext::getIntWidth return 1 for all boolean type variations, not just for the unqualified, unaliased bool.
...
llvm-svn: 86174
2009-11-05 21:10:57 +00:00
Douglas Gregor
4ebb7f3e4c
Be a little more careful when trying to extract a TypeDecl from a enum/class/struct/union specifier; in invalid code, we may also see ClassTemplateDecls.
...
llvm-svn: 86171
2009-11-05 20:54:04 +00:00
John Thompson
ed4e2950bc
Adding -fshort-wchar option.
...
llvm-svn: 86167
2009-11-05 20:14:16 +00:00
Douglas Gregor
866ad5d8ea
De-FIXME a test
...
llvm-svn: 86166
2009-11-05 20:02:41 +00:00
Sebastian Redl
1060067dd1
Don't allow definitions of array variables without some size information in C++. Fixed PR5401
...
llvm-svn: 86165
2009-11-05 19:47:47 +00:00
Fariborz Jahanian
4127b8ef97
Added support for static variables which require
...
initialization before main. Fixes pr5396.
llvm-svn: 86145
2009-11-05 18:03:03 +00:00
Douglas Gregor
13a2c03801
Eliminate some false positives due to a thinko in the "'blah' is
...
always zero in this context" warning logic. Also, make the diagnostic
itself more precise when referring to pointer values ("NULL" vs. "zero").
llvm-svn: 86143
2009-11-05 17:49:26 +00:00
Sebastian Redl
65ae200a13
When collecting types for built-in candidates, make arrays decay to pointers. Otherwise, subscripting an array leads to no candidates at all. Fixes PR5360.
...
llvm-svn: 86140
2009-11-05 16:36:20 +00:00
Daniel Dunbar
d3f630f4d5
Add clang_site_config user variable, so that extra tests (e.g., utils/C++Syntax)
...
can always find the main clang site config (when invoked via CMake/Makefiles, at
least).
llvm-svn: 86139
2009-11-05 16:36:19 +00:00