Douglas Gregor
d58530422f
Flush statements after writing each DECL_CXX_BASE_SPECIFIERS node
...
llvm-svn: 117770
2010-10-30 04:28:16 +00:00
Argyrios Kyrtzidis
93513155e7
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.
llvm-svn: 117760
2010-10-30 01:06:26 +00:00
Argyrios Kyrtzidis
b5488f45db
Add test/SemaCXX/crash-PR7625.cpp into test/SemaCXX/crashes.cpp
...
llvm-svn: 117759
2010-10-30 01:06:23 +00:00
Argyrios Kyrtzidis
0f24185c76
test/SemaCXX/crash-8124080.cpp -> test/SemaCXX/crashes.cpp
...
llvm-svn: 117758
2010-10-30 01:06:21 +00:00
Ted Kremenek
c00d5b9706
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.
llvm-svn: 117754
2010-10-30 00:43:15 +00:00
Douglas Gregor
5ef9e33137
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.
llvm-svn: 117750
2010-10-30 00:23:06 +00:00
John McCall
6a16b2f10c
When list-initializing a vector, try to copy-initialize from vectors instead
...
of descending into the subelements.
rdar://problem/8345836
llvm-svn: 117749
2010-10-30 00:11:39 +00:00
Dan Gohman
e89c04e518
Don't test isRegularFile before calling eraseFromDisk, since
...
eraseFromDisk does the same check. This avoids a stat call
in the common case.
llvm-svn: 117744
2010-10-29 23:26:14 +00:00
Dale Johannesen
182addf159
Handle Type.h a better way.
...
llvm-svn: 117743
2010-10-29 23:24:33 +00:00
Fariborz Jahanian
e5c1bda4d1
Improve diagnostics reporting of un-implemented
...
methods in protocols when protocols are in system
headers and thus ignored. //rdar: //8227199
llvm-svn: 117739
2010-10-29 23:20:05 +00:00
Dale Johannesen
7d3dfc0622
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?
llvm-svn: 117736
2010-10-29 23:12:32 +00:00
Dan Gohman
e9e32dcb48
Use CodeGenFunction's getContext(), for consistency.
...
llvm-svn: 117734
2010-10-29 22:47:07 +00:00
Dan Gohman
ba76802ed4
These functions don't need external linkage.
...
llvm-svn: 117733
2010-10-29 22:41:35 +00:00
Douglas Gregor
d4c5ed038c
Make the deserialization of C++ base class specifiers lazy, improving
...
the performance of C++ PCH and reducing stack depth in the reader.
llvm-svn: 117732
2010-10-29 22:39:52 +00:00
John McCall
37bb6c9832
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.
llvm-svn: 117729
2010-10-29 22:22:43 +00:00
Rafael Espindola
4f8857e6f4
Use objdir != srcdir in the getting started doc.
...
llvm-svn: 117723
2010-10-29 22:05:17 +00:00
Rafael Espindola
5275559c2e
Update tests to not search of as.
...
llvm-svn: 117711
2010-10-29 21:18:11 +00:00
Rafael Espindola
acc8709850
Switch to using the integrated assembler by default on x86 and x86-64 ELF
...
systems.
llvm-svn: 117697
2010-10-29 20:14:02 +00:00
Fariborz Jahanian
2129ccf512
If Consumer object failed to create due to some
...
user error, fail gracefully. Fixes
pr8508.
llvm-svn: 117692
2010-10-29 19:49:13 +00:00
Fariborz Jahanian
531a3707a9
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.
llvm-svn: 117678
2010-10-29 18:26:21 +00:00
Devang Patel
31d1e2153f
After processing named unions do not fall through to handle anonymous unions.
...
This is tested by funcargs.exp in gdb testsuite.
llvm-svn: 117659
2010-10-29 16:21:19 +00:00
Argyrios Kyrtzidis
706bbf84d8
When doing name lookup for members don't look into global/namespace scope.
...
Better performance and fixes rdar://8603569.
llvm-svn: 117656
2010-10-29 16:12:50 +00:00
Daniel Dunbar
df8792128f
Revert r117644, "Apply visibility in IR gen to variables that are merely
...
declared", it breaks things.
llvm-svn: 117653
2010-10-29 15:19:36 +00:00
John McCall
077dc60540
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.
llvm-svn: 117645
2010-10-29 08:14:02 +00:00
John McCall
4af6bf1fdc
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.
llvm-svn: 117644
2010-10-29 07:49:41 +00:00
Marcin Swiderski
a7d84a7615
Added CFGTerminator class, that holds information about CFGBlock terminator statement.
...
llvm-svn: 117642
2010-10-29 05:21:47 +00:00
Charles Davis
31575f758c
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().
llvm-svn: 117638
2010-10-29 03:25:11 +00:00
Ted Kremenek
310c5a8e31
Don't flag idempotent '+' or '-' warnings for pointer arithmetic (typically false positives).
...
Fixes <rdar://problem/8601243>.
llvm-svn: 117635
2010-10-29 01:06:54 +00:00
Ted Kremenek
55ccf4e81f
Remove old CrashTracer cruft from CIndex.
...
llvm-svn: 117634
2010-10-29 01:06:50 +00:00
John McCall
033caa5895
When computing the visibility of a class member, calculate the visibility
...
of its context without considering global settings like -fvisibility=hidden.
Fixes PR8492.
llvm-svn: 117628
2010-10-29 00:29:13 +00:00
Blaine Garst
cfdb75891d
expand discussion of __block C++ on-stack objects
...
llvm-svn: 117618
2010-10-28 23:30:10 +00:00
Devang Patel
ed23f18d7e
Basic types are language defined builtins. They are always defined at top most level.
...
llvm-svn: 117613
2010-10-28 22:03:20 +00:00
John McCall
565141612f
When emitting l-values for bool non-__block decl references, make a pointer
...
using the memory type; fixes an assert.
Fixes rdar://problem/8605032
llvm-svn: 117610
2010-10-28 21:37:57 +00:00
Daniel Dunbar
a78e589b08
Driver/IA: Ignore -L for now, which users shouldn't be using for semantic effect.
...
llvm-svn: 117600
2010-10-28 20:36:23 +00:00
Devang Patel
faadd7b72d
Directly use NamespaceDecl->getLocation() to find the source file.
...
llvm-svn: 117576
2010-10-28 19:12:46 +00:00
John McCall
62b6862c5e
Don't apply -fvisibility-inlines-hidden to extern templates.
...
Part 2 of rdar://problem/8595231
llvm-svn: 117567
2010-10-28 18:10:36 +00:00
Devang Patel
8e0073008a
Stay within 80 columns.
...
llvm-svn: 117561
2010-10-28 17:27:32 +00:00
Douglas Gregor
16896c45f3
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.
llvm-svn: 117550
2010-10-28 15:44:59 +00:00
Argyrios Kyrtzidis
440ea32773
Initialize the ASTMutationListener. Thanks goes to Abramo Bagnara!
...
llvm-svn: 117541
2010-10-28 09:29:35 +00:00
Argyrios Kyrtzidis
d9f526fc2e
Switch case IDs conflict between chained PCHs; since there is no need to be global, make them local to a decl.
...
llvm-svn: 117540
2010-10-28 09:29:32 +00:00
John McCall
9de9160d55
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.
llvm-svn: 117539
2010-10-28 08:53:48 +00:00
Argyrios Kyrtzidis
47102d885d
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.
llvm-svn: 117537
2010-10-28 07:38:53 +00:00
Argyrios Kyrtzidis
01c2df45ff
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.
llvm-svn: 117536
2010-10-28 07:38:51 +00:00
Argyrios Kyrtzidis
ef80a01d04
Properly add chained template specializations.
...
llvm-svn: 117535
2010-10-28 07:38:47 +00:00
Argyrios Kyrtzidis
4729972c0f
Fix the re-serializing decls in a chained PCH mechanism.
...
llvm-svn: 117534
2010-10-28 07:38:45 +00:00
Argyrios Kyrtzidis
402dbbbd66
Use the ASTMutationListener to track added template specializations in a chained PCH.
...
llvm-svn: 117533
2010-10-28 07:38:42 +00:00
John McCall
2efaf11695
Abandon the type-visibility optimization for functions. GCC doesn't do it,
...
and it's too much trouble to push for. Fixes PR8478.
llvm-svn: 117532
2010-10-28 07:07:52 +00:00
John McCall
b7139c43ae
When computing visibility, use the latest declaration's explicit visibility
...
attribute.
Part of rdar://problem/8595231
llvm-svn: 117526
2010-10-28 04:18:25 +00:00
Ted Kremenek
eaae1adb94
Add test case for <rdar://problem/8356342>.
...
llvm-svn: 117525
2010-10-28 02:50:32 +00:00
John McCall
071df46743
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.
llvm-svn: 117524
2010-10-28 02:34:38 +00:00