]>
granicus.if.org Git - clang/log
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
Argyrios Kyrtzidis [Sat, 30 Oct 2010 01:06:21 +0000 (01:06 +0000)]
test/SemaCXX/crash-
8124080 .cpp -> test/SemaCXX/crashes.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117758
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 30 Oct 2010 00:43:15 +0000 (00:43 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117754
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 30 Oct 2010 00:23:06 +0000 (00:23 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117750
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 30 Oct 2010 00:11:39 +0000 (00:11 +0000)]
When list-initializing a vector, try to copy-initialize from vectors instead
of descending into the subelements.
rdar://problem/
8345836
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117749
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 29 Oct 2010 23:26:14 +0000 (23:26 +0000)]
Don't test isRegularFile before calling eraseFromDisk, since
eraseFromDisk does the same check. This avoids a stat call
in the common case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117744
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 29 Oct 2010 23:24:33 +0000 (23:24 +0000)]
Handle Type.h a better way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117743
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 29 Oct 2010 23:20:05 +0000 (23:20 +0000)]
Improve diagnostics reporting of un-implemented
methods in protocols when protocols are in system
headers and thus ignored. //rdar: //
8227199
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117739
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 29 Oct 2010 23:12:32 +0000 (23:12 +0000)]
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?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117736
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 29 Oct 2010 22:47:07 +0000 (22:47 +0000)]
Use CodeGenFunction's getContext(), for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117734
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 29 Oct 2010 22:41:35 +0000 (22:41 +0000)]
These functions don't need external linkage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117733
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 29 Oct 2010 22:39:52 +0000 (22:39 +0000)]
Make the deserialization of C++ base class specifiers lazy, improving
the performance of C++ PCH and reducing stack depth in the reader.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117732
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 29 Oct 2010 22:22:43 +0000 (22:22 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117729
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 Oct 2010 22:05:17 +0000 (22:05 +0000)]
Use objdir != srcdir in the getting started doc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117723
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 Oct 2010 21:18:11 +0000 (21:18 +0000)]
Update tests to not search of as.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117711
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 Oct 2010 20:14:02 +0000 (20:14 +0000)]
Switch to using the integrated assembler by default on x86 and x86-64 ELF
systems.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117697
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 29 Oct 2010 19:49:13 +0000 (19:49 +0000)]
If Consumer object failed to create due to some
user error, fail gracefully. Fixes
pr8508.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117692
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 29 Oct 2010 18:26:21 +0000 (18:26 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117678
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 29 Oct 2010 16:21:19 +0000 (16:21 +0000)]
After processing named unions do not fall through to handle anonymous unions.
This is tested by funcargs.exp in gdb testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117659
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 29 Oct 2010 16:12:50 +0000 (16:12 +0000)]
When doing name lookup for members don't look into global/namespace scope.
Better performance and fixes rdar://
8603569 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117656
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 29 Oct 2010 15:19:36 +0000 (15:19 +0000)]
Revert r117644, "Apply visibility in IR gen to variables that are merely
declared", it breaks things.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117653
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 29 Oct 2010 08:14:02 +0000 (08:14 +0000)]
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
John McCall [Fri, 29 Oct 2010 07:49:41 +0000 (07:49 +0000)]
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
Marcin Swiderski [Fri, 29 Oct 2010 05:21:47 +0000 (05:21 +0000)]
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
Charles Davis [Fri, 29 Oct 2010 03:25:11 +0000 (03:25 +0000)]
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
Ted Kremenek [Fri, 29 Oct 2010 01:06:54 +0000 (01:06 +0000)]
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
Ted Kremenek [Fri, 29 Oct 2010 01:06:50 +0000 (01:06 +0000)]
Remove old CrashTracer cruft from CIndex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117634
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 29 Oct 2010 00:29:13 +0000 (00:29 +0000)]
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
Blaine Garst [Thu, 28 Oct 2010 23:30:10 +0000 (23:30 +0000)]
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
Devang Patel [Thu, 28 Oct 2010 22:03:20 +0000 (22:03 +0000)]
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
John McCall [Thu, 28 Oct 2010 21:37:57 +0000 (21:37 +0000)]
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