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

25344 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor acec34bda4 Flush statements after writing each DECL_CXX_BASE_SPECIFIERS node
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117770 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-30 04:28:16 +00:00
Argyrios Kyrtzidis d86132d52c Don't remove the init expression from the initializer list if it had a semantic error.
We already flag the error with InitListChecker's hadError and we mess up the AST unnecessarily.
Fixes rdar://8605381.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117760 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-30 01:06:26 +00:00
Argyrios Kyrtzidis 6a622dfde4 Add test/SemaCXX/crash-PR7625.cpp into test/SemaCXX/crashes.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117759 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-30 01:06:23 +00:00
Argyrios Kyrtzidis 387fb7104e test/SemaCXX/crash-8124080.cpp -> test/SemaCXX/crashes.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117758 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-30 01:06:21 +00:00
Ted Kremenek c75f6180d1 Add test case for <rdar://problem/8610363> (a bogus report of using an uninitialized field). This was
already fixed, but this serves for detecting regressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117754 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-30 00:43:15 +00:00
Douglas Gregor 295a2a617a Make the deserialization of macro definitions lazy, so that we can
load identifiers without loading their corresponding macro
definitions. This is likely to improve PCH performance slightly, and
reduces deserialization stack depth considerably when using
preprocessor metaprogramming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117750 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-30 00:23:06 +00:00
John McCall 20e047abc5 When list-initializing a vector, try to copy-initialize from vectors instead
of descending into the subelements.

rdar://problem/8345836



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117749 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-30 00:11:39 +00:00
Dan Gohman 978e3a274a Don't test isRegularFile before calling eraseFromDisk, since
eraseFromDisk does the same check. This avoids a stat call
in the common case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117744 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 23:26:14 +00:00
Dale Johannesen 1e592cba6b Handle Type.h a better way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117743 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 23:24:33 +00:00
Fariborz Jahanian 61c8d3ecac Improve diagnostics reporting of un-implemented
methods in protocols when protocols are in system
headers and thus ignored. //rdar: //8227199


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117739 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 23:20:05 +00:00
Dale Johannesen f6e2c2039f Generate bitcasts going in and out of MMX parameters
in asm's.  PR 8501, 8602988.
I don't like including Type.h where it is; the idea was
to get references to X86_MMXTy out of the common code.
Maybe there's a better way?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117736 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 23:12:32 +00:00
Dan Gohman bc07a55b68 Use CodeGenFunction's getContext(), for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117734 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 22:47:07 +00:00
Dan Gohman f129562b43 These functions don't need external linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117733 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 22:41:35 +00:00
Douglas Gregor 7c789c1a3f Make the deserialization of C++ base class specifiers lazy, improving
the performance of C++ PCH and reducing stack depth in the reader.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117732 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 22:39:52 +00:00
John McCall 110e8e56af Restore r117644, this time properly ignoring -fvisibility and type visibility
for namespace-scope variable declarations.

Apply visibility in IR gen to variables that are merely declared
and never defined.  We were previously emitting these with default
visibility unless they were declared with private_extern.

Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117729 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 22:22:43 +00:00
Rafael Espindola fa5fa97a14 Use objdir != srcdir in the getting started doc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117723 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 22:05:17 +00:00
Rafael Espindola 1af67f33f3 Update tests to not search of as.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117711 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 21:18:11 +00:00
Rafael Espindola e43cfa1fdb Switch to using the integrated assembler by default on x86 and x86-64 ELF
systems.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117697 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 20:14:02 +00:00
Fariborz Jahanian d305719f9b If Consumer object failed to create due to some
user error, fail gracefully. Fixes
pr8508.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117692 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 19:49:13 +00:00
Fariborz Jahanian 0483dceea0 Qualified 'id' should implement all of static class type's
protocols, including those added to class, super class
and categories; otherewise issue a warning. This fixes
pr8453.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117678 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 18:26:21 +00:00
Devang Patel f4dd962e68 After processing named unions do not fall through to handle anonymous unions.
This is tested by funcargs.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117659 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 16:21:19 +00:00
Argyrios Kyrtzidis 78f5911a4e When doing name lookup for members don't look into global/namespace scope.
Better performance and fixes rdar://8603569.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117656 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 16:12:50 +00:00
Daniel Dunbar 034f55c1eb Revert r117644, "Apply visibility in IR gen to variables that are merely
declared", it breaks things.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117653 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 15:19:36 +00:00
John McCall 14e1bc9201 Don't assert on attempts to throw 'bool'. I wonder if in the history of C++
anyone has ever intentionally done this outside of a compiler test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 08:14:02 +00:00
John McCall 87a4ed905e Apply visibility in IR gen to variables that are merely declared
and never defined.  We were previously emitting these with default
visibility unless they were declared with private_extern.

Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117644 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 07:49:41 +00:00
Marcin Swiderski 4ba72a0b28 Added CFGTerminator class, that holds information about CFGBlock terminator statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 05:21:47 +00:00
Charles Davis 424ae9882e Add a hook to the CXXABI object to get the default method calling convention.
This isn't used yet, because someone more experienced than I needs to look
at the type system about gutting getCanonicalCallConv().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 03:25:11 +00:00
Ted Kremenek 74faec22ec Don't flag idempotent '+' or '-' warnings for pointer arithmetic (typically false positives).
Fixes <rdar://problem/8601243>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117635 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 01:06:54 +00:00
Ted Kremenek 1dfb26af4d Remove old CrashTracer cruft from CIndex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117634 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 01:06:50 +00:00
John McCall 0df9587ab0 When computing the visibility of a class member, calculate the visibility
of its context without considering global settings like -fvisibility=hidden.
Fixes PR8492.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117628 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29 00:29:13 +00:00
Blaine Garst 02be29a1e8 expand discussion of __block C++ on-stack objects
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117618 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 23:30:10 +00:00
Devang Patel 532105f025 Basic types are language defined builtins. They are always defined at top most level.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117613 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 22:03:20 +00:00
John McCall 46ec70e2e6 When emitting l-values for bool non-__block decl references, make a pointer
using the memory type;  fixes an assert.

Fixes rdar://problem/8605032



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117610 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 21:37:57 +00:00
Daniel Dunbar b14eed0ed4 Driver/IA: Ignore -L for now, which users shouldn't be using for semantic effect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117600 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 20:36:23 +00:00
Devang Patel 8c37668762 Directly use NamespaceDecl->getLocation() to find the source file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117576 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 19:12:46 +00:00
John McCall 479edbc8d0 Don't apply -fvisibility-inlines-hidden to extern templates.
Part 2 of rdar://problem/8595231



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117567 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 18:10:36 +00:00
Devang Patel a2e57698e2 Stay within 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117561 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 17:27:32 +00:00
Douglas Gregor 213f18b3d6 Simplify ASTUnit's internal timers, by not trying to keep a pile of
timers to be dumped whenever the ASTUnit is destroyed. Instead, just
print the time elapsed for each operation after we perform the
operation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117550 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 15:44:59 +00:00
Argyrios Kyrtzidis 9a44b5f559 Initialize the ASTMutationListener. Thanks goes to Abramo Bagnara!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117541 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 09:29:35 +00:00
Argyrios Kyrtzidis e09a275444 Switch case IDs conflict between chained PCHs; since there is no need to be global, make them local to a decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117540 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 09:29:32 +00:00
John McCall 95c225de9f Implement an indirect-goto optimization for goto *&&lbl and respect this
in the scope checker.  With that done, turn an indirect goto into a
protected scope into a hard error;  otherwise IR generation has to start
worrying about declarations not dominating their scopes, as exemplified
in PR8473.

If this really affects anyone, I can probably adjust this to only hard-error
on possible indirect gotos into VLA scopes rather than arbitrary scopes.
But we'll see how people cope with the aggressive change on the marginal
feature.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117539 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 08:53:48 +00:00
Argyrios Kyrtzidis 3c7d7afd25 Remove an assertion that hit on legitimate cases. A redeclaration may have location before the
first one if the redeclaration comes from a friend decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 07:38:53 +00:00
Argyrios Kyrtzidis 100050bf64 Use the ASTMutationListener to track when a named decl gets added to a DeclContext,
meaning we need to rewrite its name lookup table in a chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117536 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 07:38:51 +00:00
Argyrios Kyrtzidis 0f04f69acd Properly add chained template specializations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117535 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 07:38:47 +00:00
Argyrios Kyrtzidis d3d0755a42 Fix the re-serializing decls in a chained PCH mechanism.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117534 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 07:38:45 +00:00
Argyrios Kyrtzidis bef1a7b9c1 Use the ASTMutationListener to track added template specializations in a chained PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117533 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 07:38:42 +00:00
John McCall 67fa6d5ea6 Abandon the type-visibility optimization for functions. GCC doesn't do it,
and it's too much trouble to push for.  Fixes PR8478.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117532 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 07:07:52 +00:00
John McCall e7bc9722c8 When computing visibility, use the latest declaration's explicit visibility
attribute.

Part of rdar://problem/8595231



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117526 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 04:18:25 +00:00
Ted Kremenek cf38af20eb Add test case for <rdar://problem/8356342>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117525 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 02:50:32 +00:00
John McCall 10302c01e8 Implement the newest status quo for method override checking. The idea now
is that we need more information to decide the exact conditions for whether
one ObjCObjectPointer is an acceptable return/parameter override for another,
so we're going to disable that entire class of warning for now.  The
"forward developement" warning category, -Wmethod-signatures, can receive
unrestricted feature work, and when we're happy with how it acts, we'll
turn it on by default.

This is a pretty conservative change, and nobody's totally content with it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117524 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 02:34:38 +00:00