Marcin Swiderski
01769904d3
Added generation of destructors for member constant size arrays.
...
There's only one destructor call generated for each not empty array (at least for now this should be enough).
llvm-svn: 117252
2010-10-25 07:05:54 +00:00
Marcin Swiderski
52e4bc1fed
Added generation of destructors for constant size arrays.
...
There's only one destructor call generated for each not empty array (at least for now this should be enough).
llvm-svn: 117251
2010-10-25 07:00:40 +00:00
Peter Collingbourne
a99fdcf93e
Implement GNU C extension: two types are compatible if they appear
...
as a function argument, one of the types is a transparent union type
and the other type is compatible with a union member
llvm-svn: 117243
2010-10-24 18:30:18 +00:00
Argyrios Kyrtzidis
e16a5300ba
Keep track in chained PCH of implicit members that were added after the definition was completed.
...
llvm-svn: 117240
2010-10-24 17:26:54 +00:00
Argyrios Kyrtzidis
d170d844c4
Start fleshing out ASTMutationListener; notify when a tag definition is completed.
...
In that case a chained PCH will record the updates to the DefinitionData pointer of forward references.
If a forward reference mutated into a definition re-write it into the chained PCH, this is too big of a change.
llvm-svn: 117239
2010-10-24 17:26:50 +00:00
Argyrios Kyrtzidis
3ba70b89cf
Introduce a DeclsToRewrite field in ASTWrite, used for collecting the decls that will be replaced in the chained PCH.
...
llvm-svn: 117238
2010-10-24 17:26:46 +00:00
Argyrios Kyrtzidis
97bfda9b9b
Some method renaming, no functionality change.
...
llvm-svn: 117237
2010-10-24 17:26:43 +00:00
Argyrios Kyrtzidis
eb39d9a9ec
Refactoring.
...
- Pass around RecordDataImpl instead of the concrete RecordData so that any SmallVector can be used.
- Move ASTDeclWriter::WriteCXXDefinitionData to ASTWriter::AddCXXDefinitionData.
llvm-svn: 117236
2010-10-24 17:26:40 +00:00
Argyrios Kyrtzidis
65ad5691fd
Put the mechanism in place to track modifications in an AST entity that were committed after
...
its initial creation/deserialization and store the changes in a chained PCH.
The idea is that the AST entities call methods on the ASTMutationListener to give notifications
of changes; the PCHWriter implements the ASTMutationListener interface and stores the incremental changes
of the updated entity. WIP
llvm-svn: 117235
2010-10-24 17:26:36 +00:00
Argyrios Kyrtzidis
ad5f95cc4b
Simplify and "robust-ify" the way that CXXRecord references point to the definition data when loaded from PCH.
...
Temporary disable 'test/PCH/chain-cxx.cpp' until a better way to fix it is in place.
llvm-svn: 117234
2010-10-24 17:26:31 +00:00
Argyrios Kyrtzidis
8b200a5ef1
Minor refactoring; Pull reading/writing DefinitionData out into a function.
...
llvm-svn: 117233
2010-10-24 17:26:27 +00:00
Anders Carlsson
c532c8b106
Fix tyop.
...
llvm-svn: 117225
2010-10-24 12:51:00 +00:00
Marcin Swiderski
772324971d
- Fixed subexpressions evaluation order for binary operators to match order in code generated with the compiler,
...
- Fixed test cases for unreachable code warnings produced by Sema.
llvm-svn: 117220
2010-10-24 08:21:40 +00:00
Anders Carlsson
cdbd70ac69
Move the "used but marked unused" warning behind a special warning flag for now.
...
llvm-svn: 117219
2010-10-24 04:28:00 +00:00
Douglas Gregor
e63d087bcb
C++ [basic.scope.hiding] allows an ordinary name to hide a non-tag
...
name *in the same scope*, but not across scopes. Implement the
highlighted condition.
llvm-svn: 117212
2010-10-23 16:06:17 +00:00
Chandler Carruth
c3ce5840af
Update remaining attribute macros to new style.
...
llvm-svn: 117204
2010-10-23 08:44:57 +00:00
Chandler Carruth
b7967b91c9
Update to use 'LLVM_*' macro names for attributes.
...
llvm-svn: 117201
2010-10-23 08:21:37 +00:00
Anders Carlsson
73067a02db
Warn if a variable marked with the "unused" attribute is used. Patch by Darin Adler!
...
llvm-svn: 117184
2010-10-22 23:37:08 +00:00
John McCall
811a0f5578
Parse attributes on enumerators and instantiate attributes on enum decls.
...
llvm-svn: 117182
2010-10-22 23:36:17 +00:00
Anders Carlsson
21836f726b
Minor tweak so that fixit-errors.c is never compiled; it crashes and pops up a crash dialog on my system.
...
llvm-svn: 117181
2010-10-22 23:35:40 +00:00
Fariborz Jahanian
2b427c7fb0
Update compatibility page for objective-c.
...
llvm-svn: 117168
2010-10-22 22:35:51 +00:00
Douglas Gregor
263803a6cd
Teach clang_getCursorReferenced() and friends about BlockDeclRefExprs.
...
llvm-svn: 117167
2010-10-22 22:24:08 +00:00
Douglas Gregor
c0d2490ac4
In the presence of using declarations, we can find the same class
...
members in class subobjects of different types. So long as the
underlying declaration sets are the same, and the declaration sets
involve non-instance members, this is not an ambiguity.
llvm-svn: 117163
2010-10-22 22:08:47 +00:00
Ted Kremenek
5c97605c1d
Fix a horrible bug in all dataflow analyses that use CFGRecStmtVisitor (including live variables analysis).
...
We shouldn't recurse into CompoundStmts since they are already inlined in the CFG. This could result in
bogus dead stores warnings (among other things).
llvm-svn: 117162
2010-10-22 22:08:32 +00:00
Ted Kremenek
7043fba7fa
Fix '-analyzer-display-progress' for Objective-C methods. Also remove obsolete code.
...
llvm-svn: 117161
2010-10-22 22:08:29 +00:00
Fariborz Jahanian
059fe5ba09
Test emoved.
...
llvm-svn: 117160
2010-10-22 22:05:40 +00:00
Fariborz Jahanian
c123623d28
After discussion with Doug and John, I am reverting
...
the patch.
llvm-svn: 117159
2010-10-22 22:05:03 +00:00
Dale Johannesen
70f564e0e8
Change handling of inline asm 'p' constraint to match llvm-gcc.
...
llvm-svn: 117149
2010-10-22 21:07:10 +00:00
John McCall
457a04e3ce
Substantially revise how clang computes the visibility of a declaration to
...
more closely parallel the computation of linkage. This gets us to a state
much closer to what gcc emits, modulo bugs, which will undoubtedly arise in
abundance.
llvm-svn: 117147
2010-10-22 21:05:15 +00:00
Fariborz Jahanian
0196aa28ec
Patch fixes miscompile with non-trivial copy constructors and
...
statement expressions, //rdar: //8540501
llvm-svn: 117146
2010-10-22 21:01:02 +00:00
Devang Patel
401c916c8a
Delay record type's debug info emission, in -flimit-debug-info mode, if member expression's base is call expr.
...
llvm-svn: 117127
2010-10-22 18:56:27 +00:00
Devang Patel
db3910000a
Revert unintentional check-in.
...
llvm-svn: 117120
2010-10-22 18:31:12 +00:00
Douglas Gregor
bde20c0342
When we perform name lookup for a template, we may end up finding an
...
ambiguous name where none of the declarations found are actually
templates. In this case, make sure we clear out the ambiguous-path
data when recomputing the lookup result kind. Fixes PR8439.
llvm-svn: 117112
2010-10-22 17:36:51 +00:00
Oscar Fuentes
ac1a614079
Don't try to guess svn version when current path is a symlink.
...
See PR 8473.
llvm-svn: 117110
2010-10-22 17:16:39 +00:00
Devang Patel
f79199d140
Tidy up MIPS_linkage name. Provide it only if it does not match regular name, otherwise it confuses debugger.
...
This is tested by local.C in llvmgcc testsuite.
llvm-svn: 117107
2010-10-22 17:11:50 +00:00
Benjamin Kramer
fb5e584151
More class anonymization.
...
llvm-svn: 117106
2010-10-22 16:48:22 +00:00
Benjamin Kramer
2fc373e155
Move classes into anonymous namespaces.
...
llvm-svn: 117104
2010-10-22 16:33:16 +00:00
Douglas Gregor
412c362d9e
When performing name lookup for a namespace definition, only look into
...
the current context's redeclaration context, ignoring using
directives. Fixes PR8430.
llvm-svn: 117097
2010-10-22 15:24:46 +00:00
Douglas Gregor
06e41ae5c7
Teach the C++ simple-type-specifier parser and tentative parses about
...
protocol-qualified types such as id<Protocol>.
llvm-svn: 117081
2010-10-21 23:17:00 +00:00
Douglas Gregor
12a6c9e441
Update clang_getCursor() test to check searches on include directives
...
llvm-svn: 117063
2010-10-21 20:55:34 +00:00
Dan Gohman
2bb62c3d2b
Rename clang's TBAA tree root from "experimental" to "simple".
...
llvm-svn: 117046
2010-10-21 18:50:04 +00:00
Ted Kremenek
5ef9ad9907
Tweak diagnostics for redeclaration of a @property in a class extension where the redelcaration and original
...
declaration have the 'readwrite' attribute. This is a common case, and we can issue a more lucid diagnostic.
Fixes <rdar://problem/7629420>.
llvm-svn: 117045
2010-10-21 18:49:42 +00:00
Ted Kremenek
22813f4077
Tidy up comment (remove extraneous text).
...
llvm-svn: 117044
2010-10-21 18:49:36 +00:00
Dan Gohman
5419ce6827
Add some more comments.
...
llvm-svn: 117043
2010-10-21 18:49:12 +00:00
Douglas Gregor
cd1d0b4f98
Implement the integral promotion rules for the C++0x char16_t and
...
char32_t character types and enable built-in overloaded operator
candidates for these types. Fixes PR8432.
llvm-svn: 117038
2010-10-21 18:04:08 +00:00
Douglas Gregor
a02bb37a8c
Diagnose the declaration of template template parameters that
...
themselves have no template parameters. This is actually a restriction
due to the grammar of template template parameters, but we choose to
diagnose it in Sema to provide better recovery.
llvm-svn: 117032
2010-10-21 17:26:49 +00:00
Douglas Gregor
bff6203152
Always treat 'main' as an extern "C" function, so that we detect
...
redeclarations of main appropriately rather than allowing it to be
overloaded. Also, disallowing declaring main as a template.
Fixes GCC DejaGNU g++.old-deja/g++.other/main1.C.
llvm-svn: 117029
2010-10-21 16:57:46 +00:00
Douglas Gregor
270b2ef0e7
When checking whether a return statement returns a stack-local
...
variable, handle conditional operators involving a
throw-expression. Fixes GCC DejaGNU's g++.dg/template/cond4.C.
llvm-svn: 117027
2010-10-21 16:21:08 +00:00
Francois Pichet
ebdb43d54d
Revert r117005, WIN32 is not predefined after all.
...
llvm-svn: 117026
2010-10-21 16:14:56 +00:00
Ted Kremenek
c5644e1b97
Tweak the ObjCAtSyncChecker to assume that a mutex is non-nil after checking that it is
...
nil. Otherwise we can get false paths where a second @synchronized using the mutex
can have a bogus warning. Fixes <rdar://problem/8578650>.
llvm-svn: 117016
2010-10-21 15:38:55 +00:00