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
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
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
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
Ted Kremenek
0abd85c7ae
Don't warn about unamed bitfield ivars in the ObjCUnusedIvarsChecker. Fixes <rdar://problem/8481311>.
...
llvm-svn: 117521
2010-10-28 02:16:22 +00:00
Dale Johannesen
d2b2ad093c
Ahem. Add rest of D and Q registers to ARM inline asm handling.
...
llvm-svn: 117517
2010-10-28 01:05:37 +00:00
Dale Johannesen
7fd51bc1e6
Add D and Q register names to ARM inline asm handling.
...
No aliasing is needed, these work as given in the BE.
llvm-svn: 117508
2010-10-27 23:34:42 +00:00
Devang Patel
1bee63f325
Fix context info for enums.
...
Radar 8595129
llvm-svn: 117507
2010-10-27 23:23:58 +00:00
John McCall
ff78c8a3ef
Don't override explicit visibility attributes on class members with
...
type-based visibility.
llvm-svn: 117500
2010-10-27 22:31:22 +00:00
Douglas Gregor
7e8c4e061b
Make AST deserialization for class template specializations lazier, by
...
not loading the specializations of a class template until some AST
consumer needs them.
llvm-svn: 117498
2010-10-27 22:21:36 +00:00
John McCall
3a7f6926d1
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.
llvm-svn: 117486
2010-10-27 20:58:56 +00:00
Fariborz Jahanian
dd6907bd77
Decay array/function types of a statement-expression.
...
// rdar: // 8600553.
llvm-svn: 117484
2010-10-27 20:44:00 +00:00
Douglas Gregor
e0fb32c261
Lazily load the next friend in the chain of FriendDecls, to eliminate
...
some excessive recursion and deserialization.
llvm-svn: 117480
2010-10-27 20:23:41 +00:00
Fariborz Jahanian
5701585780
patch to do array-to-pointer conversion in a
...
statement-expression. // rdar: //8600553
llvm-svn: 117479
2010-10-27 20:10:28 +00:00
Douglas Gregor
417e87cb96
Lazily load the "next" namespace in the chain of NamespaceDecls, to
...
eliminate some excessive recursion and deserialization.
llvm-svn: 117476
2010-10-27 19:49:05 +00:00
Douglas Gregor
f5a1854655
Introduce libclang-level options for C++ precompiled preambles,
...
separating out chaining precompiled preambles from non-chaining ones.
llvm-svn: 117457
2010-10-27 17:24:53 +00:00
Rafael Espindola
9d798a07e4
Revert r117403 as it caused PR8480.
...
llvm-svn: 117456
2010-10-27 17:13:49 +00:00
Fariborz Jahanian
1518a5eca7
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).
llvm-svn: 117452
2010-10-27 16:21:54 +00:00
Douglas Gregor
af1daa9854
Remove redundant test
...
llvm-svn: 117446
2010-10-27 14:20:34 +00:00
Anders Carlsson
b00c2144b3
Also devirtualize calls to a member functions where the containing class has been marked final.
...
llvm-svn: 117445
2010-10-27 13:34:43 +00:00
Anders Carlsson
a7911fa3d7
If a virtual member function has the 'final' attribute, we can devirtualize calls to it.
...
llvm-svn: 117444
2010-10-27 13:28:46 +00:00
Chandler Carruth
00426b4876
Add helper for extracting the CXXRecordDecl for the implicit argument to
...
a member call expression. This has proved to be a common pattern for users of
RecursiveASTVisitor.
llvm-svn: 117439
2010-10-27 06:55:41 +00:00
Zhongxing Xu
d95ccd58a9
If visiting RHS causes us to finish 'Block', e.g. the RHS is a StmtExpr
...
containing a DoStmt, and the LHS doesn't create a new block, then we should
return RBlock. Otherwise we'll incorrectly return NULL.
Also relax an assertion in VisitWhileStmt(). Reset 'Block' when it is finished.
llvm-svn: 117436
2010-10-27 03:23:10 +00:00
John McCall
d37d35b571
Avoid calculating linkage until the more obvious checks have run when
...
deciding whether to queue a decl for unused-declaration warnings.
llvm-svn: 117431
2010-10-27 01:41:35 +00:00
John McCall
6fe024052b
Don't compute linkage for a declaration as part of the #pragma weak
...
forward-declaration support unless there's really a mapping for that
name.
llvm-svn: 117426
2010-10-27 00:59:00 +00:00
Dan Gohman
2f76cd756a
Add support for code completion on stdin.
...
llvm-svn: 117414
2010-10-26 23:21:25 +00:00
Fariborz Jahanian
67ca8c4c7b
Patch to provide guard when initializing instances
...
of static data member of a class template.
Fixes //rdar :// 8562966 and pr8409.
llvm-svn: 117410
2010-10-26 22:47:47 +00:00
John McCall
6bde954f47
Extract procedures to do scalar-to-memory and memory-to-scalar conversions
...
in IR gen, and use those to fix a correctness issue with bool atomic
intrinsics. rdar://problem/8461234
llvm-svn: 117403
2010-10-26 22:09:15 +00:00
Dan Gohman
52765215d0
Simplify this code: don't check for the same error two
...
different ways. Check once, and use an assert to handle
consistency checking.
llvm-svn: 117397
2010-10-26 21:13:51 +00:00
Dan Gohman
5d223dcb2f
getOrCreateContentCache never returns null, so overrideFileContents
...
doesn't need its return value.
llvm-svn: 117393
2010-10-26 20:47:28 +00:00
Dan Gohman
8fc50c296a
Factor out the code for emitting code to load vtable pointer members
...
so that it's done in one place.
llvm-svn: 117386
2010-10-26 18:44:08 +00:00
Douglas Gregor
2a1d72d078
Teach typo correction not to return the same keyword that matches a
...
typo. This can happen with context-sensitive keywords like "super",
when typo correction didn't know that "super" wasn't permitted in this
context.
llvm-svn: 117372
2010-10-26 17:18:00 +00:00
John McCall
925b16629d
Optimize field space usage in CompoundStmt, LabelStmt, Expr, and CastExpr.
...
There's probably still significant padding waste on x86-64 UNIXen, but
the difference in 32-bit compiles should be significant.
There are a lot of Expr nodes left that could lose a word this way.
llvm-svn: 117359
2010-10-26 08:39:16 +00:00
John McCall
c3007a2145
No really, we don't have a retain/release system for statements/expressions
...
anymore.
llvm-svn: 117357
2010-10-26 07:05:15 +00:00