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
Chris Lattner
b9d511c53d
make it really clear that vla != flexible arrays
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117522 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 02:20:32 +00:00
Ted Kremenek
ed50a8a7a8
Don't warn about unamed bitfield ivars in the ObjCUnusedIvarsChecker. Fixes <rdar://problem/8481311>.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117521 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 02:16:22 +00:00
Dale Johannesen
d145535546
Ahem. Add rest of D and Q registers to ARM inline asm handling.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117517 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 01:05:37 +00:00
Stuart Hastings
76be2a2cab
Test passes on Darwin; try to XFAIL on freebsd, linux, xp/msvc9.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117515 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 00:47:58 +00:00
Dale Johannesen
20eb49b503
Add D and Q register names to ARM inline asm handling.
...
No aliasing is needed, these work as given in the BE.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117508 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 23:34:42 +00:00
Devang Patel
4bc48877db
Fix context info for enums.
...
Radar 8595129
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117507 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 23:23:58 +00:00
Blaine Garst
b03a9287c2
small tweaks to reflect statements of what really ever shipped. ABI is, and has been, accurate for what we ship.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117504 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 22:59:01 +00:00
John McCall
6f4ac4b18f
Don't override explicit visibility attributes on class members with
...
type-based visibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117500 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 22:31:22 +00:00
Douglas Gregor
c8e5cf8f72
Make AST deserialization for class template specializations lazier, by
...
not loading the specializations of a class template until some AST
consumer needs them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117498 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 22:21:36 +00:00
Blaine Garst
538815592d
reconcile missing typos & delete obsolete pre-SnowLeopard section w.r.t. prior repository for this document
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117492 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 21:22:46 +00:00
John McCall
26815d97c5
Restore r117403 (fixing IR gen for bool atomics), this time being less
...
aggressive about the form we expect bools to be in. I don't really have
time to fix all the sources right now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117486 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 20:58:56 +00:00
Fariborz Jahanian
4bdc446fd4
Decay array/function types of a statement-expression.
...
// rdar: // 8600553.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117484 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 20:44:00 +00:00
Douglas Gregor
69aecc6252
Lazily load the next friend in the chain of FriendDecls, to eliminate
...
some excessive recursion and deserialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117480 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 20:23:41 +00:00
Fariborz Jahanian
500b782d51
patch to do array-to-pointer conversion in a
...
statement-expression. // rdar: //8600553
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117479 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 20:10:28 +00:00
Douglas Gregor
06c919300c
Lazily load the "next" namespace in the chain of NamespaceDecls, to
...
eliminate some excessive recursion and deserialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117476 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 19:49:05 +00:00
Douglas Gregor
99ba202f65
Introduce libclang-level options for C++ precompiled preambles,
...
separating out chaining precompiled preambles from non-chaining ones.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117457 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 17:24:53 +00:00
Rafael Espindola
11893327d0
Revert r117403 as it caused PR8480.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117456 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 17:13:49 +00:00
Fariborz Jahanian
354e712c81
Do the guarding of instantiated static data members
...
on if its linkage is weak. Currently this is the
case but may change in the future. (part of radar
8562966).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117452 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 16:21:54 +00:00
Douglas Gregor
715c92aece
Document how source ranges work
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117450 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 16:02:28 +00:00
Douglas Gregor
6160598bcd
Add an environment variable that allows us to turn off threading in c-index-test
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117449 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 16:00:01 +00:00
Douglas Gregor
157a3ff14d
Remove redundant test
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117446 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 14:20:34 +00:00
Anders Carlsson
d66f428565
Also devirtualize calls to a member functions where the containing class has been marked final.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117445 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 13:34:43 +00:00
Anders Carlsson
bd2bfae2a6
If a virtual member function has the 'final' attribute, we can devirtualize calls to it.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117444 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-27 13:28:46 +00:00