]>
granicus.if.org Git - clang/log
Argyrios Kyrtzidis [Fri, 5 Nov 2010 22:10:14 +0000 (22:10 +0000)]
Initialize the array with the "C++ way".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118302
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 5 Nov 2010 21:11:19 +0000 (21:11 +0000)]
Teach clang_getCursorReferenced() that a
CXXConstructorExpr/CXXTemporaryObjectExpr references the constructor
it calls. Then, tweak clang_getCursor() to prefer such a call over a
type reference to the type being called.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118297
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 5 Nov 2010 19:56:37 +0000 (19:56 +0000)]
Put class into an anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118293
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 5 Nov 2010 18:34:46 +0000 (18:34 +0000)]
Proper rewriting of block envokation with
qualified ObjC pointer types in its argument list.
// rdar: //
8608902
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118286
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 5 Nov 2010 17:21:46 +0000 (17:21 +0000)]
libclang: Enable requesting a larger stack for several libclang entry points
using "safety" threads.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118278
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 5 Nov 2010 15:21:33 +0000 (15:21 +0000)]
Expressions of type std::nullptr_t can be used as sentinels.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118276
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 5 Nov 2010 07:19:31 +0000 (07:19 +0000)]
libclang: Add some support for running certain entry points in a "safety"
thread, primarily to get a larger stack.
- Yes, I feel dirty.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118274
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 5 Nov 2010 07:19:21 +0000 (07:19 +0000)]
Fix 80-col violas.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118273
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 5 Nov 2010 00:12:09 +0000 (00:12 +0000)]
Implement [over.ics.rank]p4: A conversion that does not convert an std::nullptr_t to bool is better than one than does.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118269
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 4 Nov 2010 19:11:31 +0000 (19:11 +0000)]
Adjust return type of thread_runner.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118259
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 4 Nov 2010 19:04:38 +0000 (19:04 +0000)]
Use the real keyword location when rebuilding an elaborated type instead of
making something up. Fixes PR8129.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 4 Nov 2010 12:18:32 +0000 (12:18 +0000)]
Pass a -I flag when compiling nullptr.cpp so the typeinfo header can be found. This should fix the errors seen on the bot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 4 Nov 2010 08:48:52 +0000 (08:48 +0000)]
Don't be so eager to replace UsingDecls in a DeclContext's lookup table;
check that the TargetNestedNameDecl is the same first.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118239
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 4 Nov 2010 05:28:09 +0000 (05:28 +0000)]
std::nullptr_t is a fundamental type for RTTI purposes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 4 Nov 2010 04:31:32 +0000 (04:31 +0000)]
Mangle std::nullptr_t as specified by the Itanium C++ ABI.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 4 Nov 2010 03:18:57 +0000 (03:18 +0000)]
Don't instantiate members not belonging in the semantic context of the template.
e.g. for:
template <int i> class A {
class B *g;
};
'class B' has the template as lexical context but semantically it is
introduced in namespace scope.
Fixes rdar://
8611125 & http://llvm.org/PR8505
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 4 Nov 2010 03:17:43 +0000 (03:17 +0000)]
It's OK to use nullptr in relational operators if the other side is a null pointer constant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 4 Nov 2010 01:26:31 +0000 (01:26 +0000)]
c-index-test: Switch to using clang_executeOnThread instead of mucking about
with system specific stuff.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118224
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 4 Nov 2010 01:26:29 +0000 (01:26 +0000)]
libclang: Add clang_executeOnThread, for use in c-index-test (and only there,
preferably). Good thing c-index-test is written in C!!!!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118223
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 4 Nov 2010 00:14:23 +0000 (00:14 +0000)]
add a comment to my last commit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 4 Nov 2010 00:09:33 +0000 (00:09 +0000)]
When canonicalizing nested-name-specifiers involving dependent names
or dependent specializations, rip apart the dependent name/dependent
specialization to recanonicalize its pieces, because
nested-name-specifiers store "dependent-type::identifier" differently
than types do. Fixes PR7419.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 3 Nov 2010 23:50:34 +0000 (23:50 +0000)]
Fixes a rewriting bug when type in a block argument type
is a objc qualified class type. // rdar: //
8608902
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118208
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 3 Nov 2010 23:29:24 +0000 (23:29 +0000)]
Patch to rewrite objc qualified types which occur in
block pointer type arguments. Partial fix for
// rdar: //
8608902
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118205
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 3 Nov 2010 22:45:23 +0000 (22:45 +0000)]
Implement -working-directory.
When -working-directory is passed in command line, file paths are resolved relative to the specified directory.
This helps both when using libclang (where we can't require the user to actually change the working directory)
and to help reproduce test cases when the reproduction work comes along.
--FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains
the working directory value if set).
--FileSystemOptions are passed around to various interfaces that perform file operations.
--Opening & reading the content of files should be done only through FileManager. This is useful in general since
file operations will be abstracted in the future for the reproduction mechanism.
FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same
FileManager but with different FileSystemOptions.
Addresses rdar://
8583824 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118203
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 3 Nov 2010 22:45:13 +0000 (22:45 +0000)]
Fix an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118202
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 3 Nov 2010 17:52:57 +0000 (17:52 +0000)]
Make this error less specific but also less likely to cause confusion. Fixes
PR7702.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118181
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 3 Nov 2010 17:00:07 +0000 (17:00 +0000)]
When producing overload candidates for binary built-in operators, keep
the sets of available conversions for the first and second arguments
separate. This is apparently the indent of C++ [over.built], and
reduces the number of overload candidates generated, eliminating some
ambiguities. Fixes PR8477.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118178
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Wed, 3 Nov 2010 16:12:44 +0000 (16:12 +0000)]
Some fixes for synthesized ivar metadata (GNU runtime).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118172
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Wed, 3 Nov 2010 14:12:26 +0000 (14:12 +0000)]
Added cursor visitor that takes a block as an argument. Tested compiling
libclang with both clang -fblocks and gcc (no blocks support). Only exposed in
the header to compilers that do have blocks support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118170
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 3 Nov 2010 11:24:56 +0000 (11:24 +0000)]
fix test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118166
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 3 Nov 2010 11:14:06 +0000 (11:14 +0000)]
Do not add elidable CXXConstructExpr as block-level expr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118165
91177308 -0d34-0410-b5e6-
96231b3b80d8
Marcin Swiderski [Wed, 3 Nov 2010 06:19:35 +0000 (06:19 +0000)]
Added generating destructors for temporary objects. Two cases I know of, that are not handled properly:
1. For statement: const C& c = C(0) ?: C(1) destructors generated for condition will not differ from those generated for case without prolonged lifetime of temporary,
2. There will be no destructor for constant reference member bound to temporary at the exit from constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118158
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Nov 2010 04:43:56 +0000 (04:43 +0000)]
Revert while I debug test failures :-(
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118150
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Nov 2010 04:37:51 +0000 (04:37 +0000)]
Switch clang to run ld directly on linux. I tested this on all the linux
distros listed by running
gcc main.o -o main
g++ main.o -o main
gcc main.o -o main -static
g++ main.o -o main -static
gcc f.o -o f.so -shared
g++ f.o -o f.so -shared
and comparing the ld line with the one created by clang. I also added
-m32/m64 in distros that support it.
While I tested many distros, there will always be more. If you are hit by this
it should be somewhat easy to add your distro. If you are in a hurry, do
revert this, but please inform how to detect you distro and the ld command
lines produced by the above gcc invocations. Most distros have some patches
on gcc :-(
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118149
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 3 Nov 2010 02:54:51 +0000 (02:54 +0000)]
When setting a tied check if it's already tied. If it's tied to another constraint it's invalid. Fixes PR3905.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118146
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 3 Nov 2010 02:22:29 +0000 (02:22 +0000)]
A number in an input constraint can't point to a read-write ('+') constraint. Fixes PR3904.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118145
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Hunt [Wed, 3 Nov 2010 01:07:06 +0000 (01:07 +0000)]
Provide an error when a non-identifier name (such as an operator) is used as a
parameter name.
Fixes PR8012.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 3 Nov 2010 00:35:38 +0000 (00:35 +0000)]
Improve source-location information for CXXConstructExpr nodes, by
ensuring that they cover all of their child nodes. There's still a
clang_getCursor()-related issue with CXXFunctionalCastExprs with
CXXConstructExprs as children (see FIXME in the test case); I'll look
at that separately.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 2 Nov 2010 23:17:51 +0000 (23:17 +0000)]
Don't add Decls with an invalid location to DeclsInContainer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118111
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 2 Nov 2010 23:10:24 +0000 (23:10 +0000)]
Hack to workaround deficiency in ObjC ASTs. Functions and variables may be declared
within an @implementation, but we have no way to record that information in the AST.
This may cause CursorVisitor to miss these Decls when doing a AST walk.
Fixes <rdar://problem/
8595462 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118109
91177308 -0d34-0410-b5e6-
96231b3b80d8
John Thompson [Tue, 2 Nov 2010 23:03:52 +0000 (23:03 +0000)]
Tests for inline asm constraints, generic and x86.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118108
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 2 Nov 2010 22:34:04 +0000 (22:34 +0000)]
Add link to LLVM releases page.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118095
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 2 Nov 2010 21:05:53 +0000 (21:05 +0000)]
Fixes an assertion violation when bind to temporary
expression is a dependent expression.
// rdar: //
8620524 and PR7851
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118066
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 2 Nov 2010 21:04:24 +0000 (21:04 +0000)]
Ensure that static local variables in function templates inherit the
visibility of their function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118065
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 2 Nov 2010 20:36:02 +0000 (20:36 +0000)]
Teach code completion to provide property results when the property
can be used to automatically synthesize an ivar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118052
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 2 Nov 2010 19:42:04 +0000 (19:42 +0000)]
Driver: Silently ignore -fasm-blocks for now instead of error'ing, this cause
some unexpected fallout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 2 Nov 2010 18:39:34 +0000 (18:39 +0000)]
Add support for Fedora 14. Patch by Daniel Kozlowski.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118035
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 2 Nov 2010 18:38:13 +0000 (18:38 +0000)]
Unbreak private_extern, which apparently we had zero tests for.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118034
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 2 Nov 2010 16:54:00 +0000 (16:54 +0000)]
Fix a crash mangling decayed val argument-typed function.
// rdar: //
8620510 and PR7666
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118019
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 2 Nov 2010 02:33:08 +0000 (02:33 +0000)]
Properly handle temporaries that are created in a AsmStmt.
Previously the temporaries would get destroyed before the asm call.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118001
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 2 Nov 2010 01:45:15 +0000 (01:45 +0000)]
Ignore attributes on classes when calculating visibility for members
with their own explicit visibility attributes. Basically we only want to
apply a single visibility attribute from any particular ancestry.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117998
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 2 Nov 2010 00:44:43 +0000 (00:44 +0000)]
Diagnose a coherant message when @interface
does not terminate with @end.
// rdar: //
7824372
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117991
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 2 Nov 2010 00:39:22 +0000 (00:39 +0000)]
Teach SourceManager::getPresumedLoc() how to fail gracefully if getLineNumber/getColumnNumber fail
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117990
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 2 Nov 2010 00:02:34 +0000 (00:02 +0000)]
When performing template argument deduction against a template-id,
only keep deduction results for successful deductions, so that they
can be compared against each other. Fixes PR8462, from Richard Smith!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117983
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Nov 2010 23:33:11 +0000 (23:33 +0000)]
Make my test case test what it meant to
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117974
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 1 Nov 2010 23:26:51 +0000 (23:26 +0000)]
Encapsulate within CXCursor the notion of whether a VarDecl* is the first Decl in a DeclGroup. We use this
to recover some context that is currently not modeled directly in the AST. Currently VarDecl's cannot
properly determine their source range because they have no context on whether or not they appear in a DeclGroup.
For the meantime, this bandaid suffices in libclang since that is where the correct SourceRange is directly needed.
Fixes <rdar://problem/
8595749 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117973
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Nov 2010 23:16:05 +0000 (23:16 +0000)]
Teach the CStringChecker and PthreadLockChecker about non-identifier
declaration names, from Jim Goodnow II!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117970
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Nov 2010 21:56:54 +0000 (21:56 +0000)]
Eliminate an unused local variable
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117963
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 1 Nov 2010 21:51:42 +0000 (21:51 +0000)]
Clean up temporaries created by an asm statement. Fixes rdar://
8540491
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117961
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Nov 2010 21:10:29 +0000 (21:10 +0000)]
Harden Sema::MaybeBindTotemporary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117954
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 1 Nov 2010 20:47:16 +0000 (20:47 +0000)]
Restore patch for PR8453 which was undone in r117829
(was project bugs).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117951
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Nov 2010 20:13:04 +0000 (20:13 +0000)]
Do not compare invalid source locations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117946
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Mon, 1 Nov 2010 18:49:26 +0000 (18:49 +0000)]
Emit error when using a bound member function for something other than calling it.
Also avoids IRGen crashes due to accepting invalid code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117943
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Nov 2010 18:37:59 +0000 (18:37 +0000)]
Require that the types of the parameters of a block literal are complete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117942
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 1 Nov 2010 16:52:40 +0000 (16:52 +0000)]
Simplify. Builtin types' context is always implied.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117928
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 1 Nov 2010 15:14:51 +0000 (15:14 +0000)]
Don't update empty field subobjects for bitfields. Fixes PR8519.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117921
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Nov 2010 15:03:47 +0000 (15:03 +0000)]
Plug a leak in the preprocessing record's handling of inclusion
directives. We had a std::string in an object that was allocated via a
BumpPtrAllocator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117912
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Nov 2010 13:48:43 +0000 (13:48 +0000)]
Disable some timing code
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117910
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 1 Nov 2010 13:04:58 +0000 (13:04 +0000)]
Explicitly handle CXXBindTemporaryExpr, CXXFunctionalCastExpr,
and ImplicitCastExpr to propagate asLValue AddStmtChoice property.
But do not propagate AlwaysAdd property.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117909
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 1 Nov 2010 09:09:44 +0000 (09:09 +0000)]
Now initializer of C++ record type is visited as block-level expr.
Let the destination of AggExprVisitor be an explicit MemRegion.
Reenable the test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117908
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 1 Nov 2010 06:46:05 +0000 (06:46 +0000)]
Make all CXXConstructExpr's block-level expressions. This is required by
method inlining. Temporarily fail a test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117907
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 1 Nov 2010 01:29:57 +0000 (01:29 +0000)]
Only apply -fvisibility-inlines-hidden to definitions. Apparently
isInlined() just gives meaningless results for non-definitions.
Fixes rdar://problem/
8614470
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117887
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 1 Nov 2010 00:21:58 +0000 (00:21 +0000)]
Get rid of more calls to getBaseClassOffsetInBits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117883
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 31 Oct 2010 23:45:59 +0000 (23:45 +0000)]
Port over a couple of getVBaseClassOffsetInBits call sites to use getVBaseClassOffset instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117882
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 31 Oct 2010 23:22:37 +0000 (23:22 +0000)]
Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117881
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 31 Oct 2010 22:20:42 +0000 (22:20 +0000)]
Start converting over the RecordLayoutBuilder next.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117878
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 31 Oct 2010 22:13:23 +0000 (22:13 +0000)]
EmptyObjectMap now uses CharUnits wherever possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117877
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 31 Oct 2010 21:54:55 +0000 (21:54 +0000)]
More CharUnits conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117875
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 31 Oct 2010 21:39:24 +0000 (21:39 +0000)]
More CharUnits conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117874
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 31 Oct 2010 21:22:43 +0000 (21:22 +0000)]
Use CharUnits in the EmptyClassOffsets map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117873
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 31 Oct 2010 21:17:03 +0000 (21:17 +0000)]
Add a DenseMapInfo specializaiton for CharUnits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117872
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 31 Oct 2010 21:07:24 +0000 (21:07 +0000)]
Correct typos and whitespace, spotted by Nico Weber!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117871
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 31 Oct 2010 21:04:33 +0000 (21:04 +0000)]
Fix typo spotted by Nico Weber.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117870
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 31 Oct 2010 21:01:46 +0000 (21:01 +0000)]
Baby steps towards using only CharUnits for base class offsets in ASTRecordLayout. Start by storing the offsets in CharUnits in the ASTRecordLayout object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117869
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 31 Oct 2010 20:41:46 +0000 (20:41 +0000)]
Teach the constant expr evaluator about derived-to-base casts when no virtual bases are involved. Fixes PR5974.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117868
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhanyong Wan [Sun, 31 Oct 2010 04:22:34 +0000 (04:22 +0000)]
Make Clang static analyzer skip function template definitions. This fixes Clang PR 8426, 8427, & 8433. Reviewed by Ted Kremenek and Doug Gregor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117853
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 31 Oct 2010 01:21:47 +0000 (01:21 +0000)]
Don't try to evaluate the LHS or RHS of a member pointer binary operation. Fixes PR8507.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117850
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 30 Oct 2010 19:52:22 +0000 (19:52 +0000)]
Emit an error when trying to form a pointer-to-member to a bitfield.
As a bonus, avoids a crash on the IRGen side due to accepting invalid code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117842
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 30 Oct 2010 19:52:19 +0000 (19:52 +0000)]
renamed: test/SemaCXX/ptrtomember-badcall.cpp -> test/SemaCXX/ptrtomember.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117841
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 30 Oct 2010 19:22:48 +0000 (19:22 +0000)]
Revert r117678, "Qualified 'id' should implement all of static class type's", it breaks things.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117829
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 Oct 2010 17:32:40 +0000 (17:32 +0000)]
Turns out that we may end up calling dladdr on GetExecutablePath, give it external linkage to make sure the lookup works on all platforms.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117813
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 Oct 2010 14:28:41 +0000 (14:28 +0000)]
This function doesn't need external linkage either.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117786
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 30 Oct 2010 11:50:40 +0000 (11:50 +0000)]
Better solution: calculate the visibility of functions and variables
independently of whether they're definitions, then teach IR generation to
ignore non-explicit visibility when emitting declarations. Use this to
make sure that RTTI, vtables, and VTTs get the right visibility.
More of rdar://problem/
8613093
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117781
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 30 Oct 2010 09:18:49 +0000 (09:18 +0000)]
GCC faithfully calculates visibility for variables independently of
whether it's a declaration or not, then ignores that information for
declarations unless it was explicitly given. It's not totally clear
how that should be mapped into a sane system, but make an effort.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117780
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 Oct 2010 08:28:42 +0000 (08:28 +0000)]
Use the expanded form of S_ISREG. Hopefully this unbreaks the MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117779
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 30 Oct 2010 06:48:20 +0000 (06:48 +0000)]
Preserve the template type parameter name when instantiating a templace.
Fixes PR8489.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117776
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 30 Oct 2010 05:14:06 +0000 (05:14 +0000)]
Rename alignof -> alignOf to avoid irritating C++'0x compilers,
PR8423
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117775
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 30 Oct 2010 04:28:16 +0000 (04:28 +0000)]
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
Argyrios Kyrtzidis [Sat, 30 Oct 2010 01:06:26 +0000 (01:06 +0000)]
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
Argyrios Kyrtzidis [Sat, 30 Oct 2010 01:06:23 +0000 (01:06 +0000)]
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