Граф коммитов

25010 Коммитов

Автор SHA1 Сообщение Дата
Argyrios Kyrtzidis 3b8f610ac9 Don't add the injected class name to the redeclarations chain; the chain should contain actual redeclarations, not implicits.
As a bonus, now we don't deserialize it unless we need it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116504 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 20:14:21 +00:00
Argyrios Kyrtzidis b972858068 Introduce command line option -dump-deserialized-decls which is used to print the PCH decls that got deserialized, for testing purposes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116503 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 20:14:18 +00:00
David Chisnall f34553d823 Test case for r116439
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116493 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 18:15:20 +00:00
Fariborz Jahanian 8ac2d44982 Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 16:04:05 +00:00
Anton Yartsev 44270d6abf support for AltiVec extensions from the Cell architecture
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116478 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 14:37:46 +00:00
Zhongxing Xu 830a7fe0ee Call PreVisitDeclStmt for C++ aggregate initializers. Patch by Jim Goodnow II.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116473 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 05:22:59 +00:00
John McCall 71c3673d1e Compress bit fields / enums from ReferenceType, BuiltinType, FunctionType, and
ObjCObjectType into Type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116472 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 03:00:17 +00:00
John McCall 008df5dce3 Whoops. This really shouldn't compile in clang, either.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116470 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 02:06:32 +00:00
John McCall 1e030eb119 Perform range restrictions on regparm when applied to a type and
not a decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116469 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 01:57:10 +00:00
John McCall e53a44bcd3 Teach Diagnostic to recursively expand inside %plural formats.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116468 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 01:55:31 +00:00
Chris Lattner c637415a96 allow I128 suffixes in msextensions mode just like i128 suffixes, patch
by Martin Vejnar!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116460 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14 00:24:10 +00:00
Chris Lattner f9e7734ede move logic for computing signed integer overflow when constant folding
into APInt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116453 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 23:46:56 +00:00
Douglas Gregor a6c1e3a56a Diagnose when a 'static' member function overrides a virtual function
in a base class. Fixes PR8168.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116448 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 22:55:32 +00:00
Douglas Gregor 922fff2c9e Generalize the checking for qualification of (non-friend) class
members. Provide a hard error when the qualification doesn't match the
current class type, or a warning + Fix-it if it does match the current
class type. Fixes PR8159.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116445 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 22:19:53 +00:00
David Chisnall 096428b351 Don't claim that things that are Objective-C keywords if preceded by an @ are keywords unless they are preceded by an @.
For example, don't claim that end is a keyword in:

unsigned end;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116439 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 21:44:48 +00:00
Douglas Gregor 6b0656a7c3 Eliminate the use of ObjCSuperExpr in code completion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116436 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 21:24:53 +00:00
Douglas Gregor 7d520baec9 There is no reason for dereferencing a pointer-to-member to require
that the class type into which the pointer points be complete, even
though the standard requires it. GCC/EDG do not require a complete
type here, so we're calling this a problem with the standard. Fixes
PR8328.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116429 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 20:41:14 +00:00
Douglas Gregor 43c0a4cae0 Update Type::BitsRemainingInType
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116423 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 20:07:36 +00:00
Douglas Gregor 3a43d8df59 _Bool is not a keyword in C++. Fixes PR7388 and PR8349.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116422 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 20:00:38 +00:00
Douglas Gregor 171dcdb092 Place conversion warnings for non-type template arguments under the
control of -Wconversion, and ignore them by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116415 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 18:27:55 +00:00
Douglas Gregor db4d4bb03d Introduce a bit into Type that keeps track of whether there are any
unnamed or local types within that type. This bit is cached along with
the linkage of a type, so that it can be recomputed (e.g., when we see
that a typedef has given a name to an anonymous declaration).

Use this bit when checking C++03 [temp.arg.type]p2, so that we don't
walk template argument types repeatedly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116413 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 18:05:20 +00:00
Douglas Gregor b535041ee3 Fix a silly bug in the suppression of non-error diagnostics in a
SFINAE context, where we weren't getting the right diagnostic argument
count. I blame DiagnosticBuilder's weirdness. Fixes PR8372.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116411 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 17:22:14 +00:00
Douglas Gregor 35495eb14f Compute whether a type is variably modified as we build the type,
rather than walking the type's structure every time we request this
information. Performance optimization; no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116409 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 16:58:14 +00:00
Fariborz Jahanian 7b1ec6c478 Eliminates a clang warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116408 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 16:19:16 +00:00
Rafael Espindola 4f036fad04 Call InitSections when assembling. This makes clang's output match that of
llvm-mc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116405 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 14:53:57 +00:00
John McCall 380aaa4421 Preserve the original scope when picking the right scope for a friend
declaration, because we'll need it later.  Hopefully fixed self-host.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 06:22:15 +00:00
John McCall 29ae6e5fb0 Support friend function declarations in local classes correctly.
Fixes a crash and diagnoses the error condition of an unqualified
friend which doesn't resolve to something.  I'm still not certain how
this is useful.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116393 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 05:45:15 +00:00
Argyrios Kyrtzidis 3bd5b6c3c2 Embrace C++ ABI 5.2.6 and consider that template instantiations don't have key functions (same as GCC).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116391 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 02:39:41 +00:00
Douglas Gregor 5f3aeb6f8b Teach the warning about unnamed/local types in template arguments to
actually walk the template argument type to find any unnamed/local
types within it. Fixes PR6784.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116382 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-13 00:27:52 +00:00
Douglas Gregor 9b62363937 Introduce support for emitting diagnostics (warnings + their notes)
that are suppressed during template argument deduction. This change
queues diagnostics computed during template argument deduction. Then,
if the resulting function template specialization or partial
specialization is chosen by overload resolution or partial ordering
(respectively), we will emit the queued diagnostics at that point. 

This addresses most of PR6784. However, the check for unnamed/local
template arguments (which existed before this change) is still only
skin-deep, and needs to be extended to look deeper into types. It must
be improved to finish PR6784.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116373 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 23:32:35 +00:00
Devang Patel cebbedd237 Fix debug info for anon union.
This is tested by anon-union.exp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116372 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 23:24:54 +00:00
Devang Patel a2c21a2ddd Fix anon union member assignment expression's location.
This is tested by anon-union.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116371 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 23:23:25 +00:00
John McCall 337ec3d0e8 Handle dependent friends more explicitly and deal with the possibility
of templated-scope friends by marking them invalid and white-listing all
accesses until such time as we implement them.  Fixes a crash, this time
without a broken test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116364 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 23:13:28 +00:00
Eli Friedman 98efb9f6df PR8325: don't do destructor checking when a pointer is thrown.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116336 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 20:32:36 +00:00
John McCall df41f18936 Enter the context of the declared function template when performing
deduction and the final substitution, but not while substituting the
explicit template arguments.  Fixes rdar://problem/8537391



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116332 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 19:40:14 +00:00
Douglas Gregor 3273b0cea8 When finalizing a function template specialization following template
argument deduction, make sure to check the correctness of deduced template
type arguments (which we had previously skipped) along with other
kinds of template arguments. This fixes part of PR6784, but we're
still swallowing the extension warning about unnamed/local template
arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116327 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 18:51:08 +00:00
Douglas Gregor 8cfb7a39ca If we end up instantiating a function parameter whose default argument
has not yet been parsed, note that the default argument hasn't been
parsed and keep track of all of the instantiations of that function
parameter. When its default argument does get parsed, imbue the
instantiations with that default argument. Fixes PR8245.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116324 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 18:23:32 +00:00
Chris Lattner 75c29a0127 fix PR7885, rejecting invalid uses of __builtin_constant_p.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116317 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 17:47:42 +00:00
Nick Lewycky 141ecfeeb5 Replace \r\n with \n in this file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116312 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 16:46:35 +00:00
Douglas Gregor d54eb44103 Parse default arguments within member functions in source order, from
Manuel Klimek! Fixes PR7715.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116311 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 16:25:54 +00:00
Duncan Sands 240a020bed Pacify gcc-4.4.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116300 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 14:07:59 +00:00
John McCall cf2e5063ae C's comma operator performs lvalue conversion on both its operands;
require them to have complete types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116297 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 07:14:40 +00:00
John McCall f9c5afb8df Flesh out test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116292 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 03:38:33 +00:00
John McCall 2bf6f49ffa I just do what the comments tell me to do.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116289 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 02:19:57 +00:00
Chris Lattner 12e9c6db87 fix the definition of __builtin_constant_p, the first arg isn't a short.
Patch by the "pax team"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116288 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 02:16:39 +00:00
John McCall 2cd11fefb6 Progress.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116287 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 02:09:17 +00:00
Francois Pichet c44fe4bf29 This patch remove the Win32 XFAIL from remap-complete.c
The problem was that text files were open in text mode and Microsoft implementation of fread and write will try to do nasty line-feed conversion which make the line position no longer valid. The fix is to read and write files in binary mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116286 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 01:01:43 +00:00
Douglas Gregor 4cd912aa94 When we load an ASTUnit from command-line arguments, hold on to the
diagnostics produced by the driver itself. Previously, we were
allowing these to either be dropped or to slip through to stderr.

Fixes <rdar://problem/7595339>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116285 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 00:50:20 +00:00
Cameron Esfahani 9c4bb2c089 Fix spelling error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116283 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 00:21:25 +00:00
John McCall 2a984cad5a Add some infrastructure for dealing with expressions of 'placeholder' type,
i.e. expressions with an internally-convenient type which should not be
appearing in generally valid, complete ASTs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116281 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-12 00:20:44 +00:00