Rafael Espindola
13327bbe55
Fix PR6562. If a type is dependent, we don't know if it will have implicit
...
destructors.
llvm-svn: 98440
2010-03-13 18:12:56 +00:00
Douglas Gregor
17b76185f1
Re-revert the explicit template instantiation linkage patch. I am beginning to look incompetent
...
llvm-svn: 98425
2010-03-13 03:49:57 +00:00
Douglas Gregor
89cae0f224
Reinstate patch to turn explicit template instantiations into weak symbols
...
llvm-svn: 98424
2010-03-13 03:14:19 +00:00
John McCall
44c064be73
Check compatibility of vector types using their canonicalizations.
...
Fixes an assertion arising C overload analysis, but really I can't imagine
that this wouldn't cause a thousand other uncaught failures.
Fixes PR6600.
llvm-svn: 98400
2010-03-12 23:14:13 +00:00
John McCall
c493a73240
Improve the unused-value check to look into comma expressions and filter out
...
voids in sub-expressions. Patch by Mike M!
Fixes PR4806.
llvm-svn: 98335
2010-03-12 07:11:26 +00:00
Douglas Gregor
539bc40906
Revert the linkage change for explicit template instantiations; something is amiss
...
llvm-svn: 98332
2010-03-12 05:13:59 +00:00
Douglas Gregor
ee3f72299c
Give explicit template instantiations weak linkage (but don't defer
...
them). Fixes PR6578.
llvm-svn: 98328
2010-03-12 04:49:06 +00:00
John McCall
9caafbc5ca
Add an extra test to this test-case.
...
llvm-svn: 98322
2010-03-12 01:20:21 +00:00
John McCall
16927f6274
Implement basic support for friend types and functions in non-dependent
...
contexts.
llvm-svn: 98321
2010-03-12 01:19:31 +00:00
John McCall
71d8d9b468
Warn about comparing an unsigned expression with 0 in tautological ways.
...
Patch by mikem!
llvm-svn: 98279
2010-03-11 19:43:18 +00:00
John McCall
6b0dcd9dd1
Remember the PR number.
...
llvm-svn: 98276
2010-03-11 19:33:57 +00:00
John McCall
e40b58ec2f
Implement -Wmissing-field-initializers. Patch by mikem!
...
llvm-svn: 98275
2010-03-11 19:32:38 +00:00
Daniel Dunbar
44e51ea41f
Use -emit-llvm-only, to avoid leaving a temp around.
...
llvm-svn: 98267
2010-03-11 18:23:02 +00:00
Fariborz Jahanian
3a106e7029
Add tentative support for accessing local variables with
...
external linkage (static, extern, etc.) in blocks in
rewriter. wip.
llvm-svn: 98265
2010-03-11 18:20:03 +00:00
Chris Lattner
9723d6c699
fix PR6433, crash on va_arg of typedef.
...
llvm-svn: 98264
2010-03-11 18:19:55 +00:00
Rafael Espindola
4d5c3d99e5
Correctly mangle address of member in template arguments. Fixes PR6460
...
llvm-svn: 98254
2010-03-11 14:07:00 +00:00
John McCall
45d878b0f0
Fix a self-host problem caused by this over-eager assertion. I'm not sure
...
there's a good equivalent that's actually true, unfortunately.
llvm-svn: 98253
2010-03-11 09:33:17 +00:00
Anders Carlsson
3521552ebe
Add a test.
...
llvm-svn: 98246
2010-03-11 06:44:31 +00:00
Anders Carlsson
423406f335
Fix calculation of whether a member function needs a thunk in construction vtables.
...
llvm-svn: 98191
2010-03-10 21:25:37 +00:00
Fariborz Jahanian
a4a925febb
Change the 'super' messaging API in the rewriter.
...
Fixes radar 7738452.
llvm-svn: 98190
2010-03-10 21:17:41 +00:00
Anders Carlsson
115b4756b5
We were mistakenly marking morally virtual bases as being uninteresting. Fix this.
...
llvm-svn: 98180
2010-03-10 19:39:11 +00:00
Anders Carlsson
703a08605f
Ignore non-interesting bases when emitting construction vtables.
...
llvm-svn: 98177
2010-03-10 19:15:26 +00:00
Rafael Espindola
e81620fb88
Move test and also test codegen.
...
llvm-svn: 98154
2010-03-10 14:01:14 +00:00
John McCall
85f9055955
When pretty-printing tag types, only print the tag if we're in C (and
...
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).
Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.
llvm-svn: 98149
2010-03-10 11:27:22 +00:00
Anders Carlsson
45be0e069d
Add newline.
...
llvm-svn: 98140
2010-03-10 06:51:56 +00:00
Anders Carlsson
804cf51dcf
Don't accidentally mark some functions in construction vtables as unused. Also land the test for a previous checkin, now that it's correct.
...
llvm-svn: 98139
2010-03-10 06:51:42 +00:00
Zhongxing Xu
1bb6a1a593
Add use-after-free check to MallocChecker.
...
llvm-svn: 98136
2010-03-10 04:58:55 +00:00
Douglas Gregor
6cf3f3c75e
Statement expressions can be used in global- or namespace-scoped blocks
...
llvm-svn: 98135
2010-03-10 04:54:39 +00:00
John McCall
e78aac41de
Create a new InjectedClassNameType to represent bare-word references to the
...
injected class name of a class template or class template partial specialization.
This is a non-canonical type; the canonical type is still a template
specialization type. This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).
Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.
llvm-svn: 98134
2010-03-10 03:28:59 +00:00
Rafael Espindola
69902a0a0d
add missing test
...
llvm-svn: 98129
2010-03-10 02:43:01 +00:00
Anders Carlsson
ca82a4fdba
Improve vcall offset handling in construction vtables. With this we layout the construction vtables from the ABI examples correctly.
...
llvm-svn: 98127
2010-03-10 02:33:41 +00:00
Rafael Espindola
e7113ca907
Delay codegen of vtables when handling implicit instantiations.
...
This fixes PR6474.
llvm-svn: 98123
2010-03-10 02:19:29 +00:00
Ted Kremenek
575398e29b
When computing in AnalysisContext the variables referenced
...
by a block, also look at the contained blocks.
llvm-svn: 98111
2010-03-10 00:18:11 +00:00
Devang Patel
93f274c161
Fix file reference for derived and composite types. Now, dwarf writer uses strict verifier that ignores debug info for such types if their file info is unknown.
...
llvm-svn: 98096
2010-03-09 22:49:11 +00:00
Fariborz Jahanian
eb1690d2bd
Fix the test some more.
...
llvm-svn: 98090
2010-03-09 22:17:52 +00:00
Fariborz Jahanian
9d227a1d5e
See if this test makes it though buildbot.
...
llvm-svn: 98087
2010-03-09 21:50:08 +00:00
Devang Patel
4f26205ba8
More then one anonymous aggregates on one line creates chaos when MDNode uniquness is combined with RAUW operation. Right solution is to avoid using RAUW.
...
This fixes PR 6554.
llvm-svn: 98083
2010-03-09 21:32:27 +00:00
Fariborz Jahanian
86048dc2e5
Reverse the code gen. enabled part of test until I can figure out
...
how to check the code pattern no matter how clang is built.
llvm-svn: 98079
2010-03-09 21:26:24 +00:00
Douglas Gregor
791c08734a
Improve Objective-C token-annotation test
...
llvm-svn: 98078
2010-03-09 20:57:01 +00:00
Fariborz Jahanian
525f34133d
Code gen test for a previous patch for
...
radar 7709015
llvm-svn: 98073
2010-03-09 19:15:10 +00:00
Fariborz Jahanian
c4813e8d02
Don't error when a block pointer is passed to a
...
vararg functions/methods. Fixes radar 7725203.
llvm-svn: 98070
2010-03-09 18:34:52 +00:00
Douglas Gregor
490075a7dd
Add an Objective-C test for token annotation
...
llvm-svn: 98056
2010-03-09 13:06:04 +00:00
Ted Kremenek
8590544ea8
Add test cases for r98003 and r98006.
...
llvm-svn: 98008
2010-03-08 23:38:27 +00:00
Chris Lattner
e18aaf2c4b
add a codegen hack to work around an AST bug, allowing us to compile the
...
code in PR6537. This should be reverted when the ast bug is fixed.
llvm-svn: 97981
2010-03-08 21:08:07 +00:00
John McCall
2c7c0424b2
Revert r97727 at ddunbar's request; we want to solve this some other way.
...
llvm-svn: 97971
2010-03-08 20:01:09 +00:00
Douglas Gregor
de4827dd34
Extend ObjCMessageExpr for class method sends with the source location
...
of the class name.
llvm-svn: 97943
2010-03-08 16:40:19 +00:00
Douglas Gregor
12852d9521
Keep track of type source information in the return type of an
...
Objective-C method declaration, e.g., for
- (Foo *)myMethod;
we now have TypeSourceInfo for the Foo*.
llvm-svn: 97942
2010-03-08 14:59:44 +00:00
Douglas Gregor
589973b097
In C++98/03, an uninitialized variable that has POD class type will be
...
uninitialized. This seems not to be the case in C++0x, where we still
call the (trivial) default constructor for a POD class
(!). Previously, we had implemented only the C++0x rules; now we
implement both. Fixes PR6536.
llvm-svn: 97928
2010-03-08 02:45:10 +00:00
Douglas Gregor
104ee00181
Downgrade errors when trying to catch a pointer or reference to
...
incomplete type to warnings; GCC (and EDG in GCC compatibility mode)
permit such handles. Fixes PR6527.
(For real this time)
llvm-svn: 97927
2010-03-08 01:47:36 +00:00
Chandler Carruth
3681e58d8b
Revert r97925, it only contained the test updates not the actual fix.
...
llvm-svn: 97926
2010-03-08 00:41:19 +00:00
Douglas Gregor
254bba4095
Downgrade errors when trying to catch a pointer or reference to
...
incomplete type to warnings; GCC (and EDG in GCC compatibility mode)
permit such handles. Fixes PR6527.
llvm-svn: 97925
2010-03-07 23:28:27 +00:00
Douglas Gregor
281c486e1b
Robustify callers that rebuild typename type nodes again NULL return
...
types. Fixes PR6463.
llvm-svn: 97924
2010-03-07 23:26:22 +00:00
Douglas Gregor
c934bc840c
Perform overload resolution when static_cast'ing from a
...
pointer-to-member-to-derived to a pointer-to-member-to-base. Fixes
PR6072.
llvm-svn: 97923
2010-03-07 23:24:59 +00:00
Douglas Gregor
1ce52caf0d
Reference binding via user-defined conversion can compute a binding
...
that is not reference-related (because it requires another implicit
conversion to which we can find). Fixes PR6483.
llvm-svn: 97922
2010-03-07 23:17:44 +00:00
Chris Lattner
0a65574ccb
implement support for -Wno-deprecated, PR6534. While
...
I'm in there, change the altivec diagnostics to use 'double'
instead of "double" for consistency.
llvm-svn: 97919
2010-03-07 18:50:21 +00:00
Eli Friedman
b632e30e41
Fix for PR6294: we should only delay recording nested dynamic classes if they
...
are lexically nested. Othewise, we never end up recording semantically nested
classes.
llvm-svn: 97900
2010-03-07 05:49:51 +00:00
Douglas Gregor
577cf97cf3
Don't turn off mangling in implicitly extern "C" system headers. GCC
...
doesn't do this on any of the major platforms, and we don't really
support any of the platforms that do (nor will we actually handle
those headers well). Fixes PR6217; see PR6530 for details on what we
would need to do to support these platforms.
llvm-svn: 97899
2010-03-07 05:10:40 +00:00
Rafael Espindola
08a692aba4
Don't produce debug info when given -g. Fixes PR6529.
...
llvm-svn: 97897
2010-03-07 04:46:18 +00:00
Tanya Lattner
5029d56cc1
Implement missing-braces warning and add a test case.
...
llvm-svn: 97893
2010-03-07 04:17:15 +00:00
Eli Friedman
99d20f83ba
PR6515: Implement __builtin_signbit and friends.
...
I'm reasonably sure my implementation is correct, but it would be nice if
someone could double-check.
llvm-svn: 97864
2010-03-06 02:17:52 +00:00
Fariborz Jahanian
af9553a23a
Allow use of byref (__block attributed) arrays inside
...
the block. Fixes radar 7671883.
llvm-svn: 97863
2010-03-06 01:58:53 +00:00
Douglas Gregor
6de584c2d2
When declaring a catch block in C++, make sure that the type being
...
caught can be copy-initialized and destructed. Fixes PR6518.
llvm-svn: 97853
2010-03-05 23:38:39 +00:00
Ted Kremenek
a00c5db1a8
Augment __has_feature to report that Clang supports adding attribute 'unused'
...
to an Objective-C instance variable.
llvm-svn: 97850
2010-03-05 22:43:32 +00:00
Fariborz Jahanian
d2bccafe82
Patch to build qualifier on objective-c
...
pointer types. Fixes radar 7626768.
llvm-svn: 97847
2010-03-05 22:42:55 +00:00
Chris Lattner
b2bc4b9880
Emit warning on indirect goto that potentially violates
...
scope instead of error, PR6517
llvm-svn: 97826
2010-03-05 20:38:02 +00:00
Chris Lattner
2df50e6573
address PR6502 by downgrading the scope checker's address
...
of label error to a warning controllable with a -W flag.
llvm-svn: 97815
2010-03-05 19:26:49 +00:00
Fariborz Jahanian
2574577828
Remove header file dependencies in block patch
...
test case.
llvm-svn: 97777
2010-03-05 01:49:18 +00:00
Blaine Garst
f27ab71d9f
add support for a 1<<29 bit in the block flags field to mark blocks using alternate struct return ABI
...
llvm-svn: 97775
2010-03-05 01:29:59 +00:00
Fariborz Jahanian
97bb418575
Make rewritten source compiled with clang++.
...
llvm-svn: 97762
2010-03-04 23:13:29 +00:00
Fariborz Jahanian
7103835d79
Make rewritten source compiled with clang++ for correctness.
...
llvm-svn: 97761
2010-03-04 23:03:49 +00:00
Fariborz Jahanian
3db51d80ec
Change test to compile rewritten test with clang++.
...
llvm-svn: 97756
2010-03-04 21:57:21 +00:00
Rafael Espindola
bef98689ad
really fix 6473 by handling weakref in constant expressions.
...
llvm-svn: 97750
2010-03-04 21:26:03 +00:00
Douglas Gregor
0b46650b66
c-index-test's printing of linkage was completely broken, as was the
...
test of this functionality. The API worked great, though! :)
llvm-svn: 97736
2010-03-04 19:36:27 +00:00
Fariborz Jahanian
8bb35c4d7c
Fixes a bug whereby static const block var has static
...
moved incorrectly. (radar 7714443).
llvm-svn: 97734
2010-03-04 18:54:29 +00:00
Rafael Espindola
2e42fec3a0
Fix PR6473.
...
Clang's support for weakref is now better than llvm-gcc's :-)
We don't introduce a new symbol and we correctly mark undefined references weak only if there is no
definition or regular undefined references in the same file.
llvm-svn: 97733
2010-03-04 18:17:24 +00:00
John McCall
b07d8b56d2
Steal the TARGET lit condition from the LLVM test suite.
...
llvm-svn: 97727
2010-03-04 09:38:07 +00:00
Zhongxing Xu
5cb8d9d40f
When profiling Environment, also profile with AnalysisContext*, bacause
...
we now may have identical states with different analysis context.
Set the right AnalysisContext in state when entering and leaving a callee.
With both of the above changes, we can pass the test case.
llvm-svn: 97724
2010-03-04 09:04:52 +00:00
John McCall
731be6620c
Revert changes r97693, r97700, and r97718.
...
Our testing framework can't deal with disabled targets yet.
llvm-svn: 97719
2010-03-04 04:29:44 +00:00
John McCall
61076e1d87
XFAIL these tests on win32, since the win32 buildbot apparently disables all
...
targets except X86.
llvm-svn: 97718
2010-03-04 04:14:44 +00:00
Eric Christopher
45fa7e60fb
Fix __builtin_ia32_roundss and __builtin_ia32_roundsd definitions.
...
Re-enable test.
llvm-svn: 97707
2010-03-04 01:34:19 +00:00
Fariborz Jahanian
9eba9dfb0c
Refactor local class name mangling and make it
...
ABI conforming.
llvm-svn: 97702
2010-03-04 01:02:03 +00:00
John McCall
81d4d12504
Implement __builtin_dwarf_sp_column().
...
llvm-svn: 97700
2010-03-04 00:44:01 +00:00
Chris Lattner
eaa2778f27
fix a buildbot failure, this was passing for me because the
...
'%t' file was left around on my disk. doh.
llvm-svn: 97699
2010-03-04 00:38:16 +00:00
Douglas Gregor
cc3f325fa6
Reinstate r97674 with a fix for the assertion that was firing in <list>
...
llvm-svn: 97686
2010-03-03 23:55:11 +00:00
Douglas Gregor
979302e14a
Revert r97674; it's causing failures
...
llvm-svn: 97677
2010-03-03 23:26:56 +00:00
Douglas Gregor
f2a42a66e2
Implement disambiguation of base class members via a
...
nested-name-specifier. For example, this allows member access in
diamond-shaped hierarchies like:
struct Base {
void Foo();
int Member;
};
struct D1 : public Base {};
struct D2 : public Base {};
struct Derived : public D1, public D2 { }
void Test(Derived d) {
d.Member = 17; // error: ambiguous cast from Derived to Base
d.D1::Member = 17; // error: okay, modify D1's Base's Member
}
Fixes PR5820 and <rdar://problem/7535045>. Also, eliminate some
redundancy between Sema::PerformObjectMemberConversion() and
Sema::PerformObjectArgumentInitialization() -- the latter now calls
the former.
llvm-svn: 97674
2010-03-03 22:53:40 +00:00
Fariborz Jahanian
281aae6328
Fix code gen bug generating code for
...
((id)cat)->isa. Fixes radar 7709015.
llvm-svn: 97672
2010-03-03 22:09:47 +00:00
Chris Lattner
aabec2fb84
merge asm-2.c into asm.c, remove asm-inout.c because it is
...
XFAIL and already tracked in bugzilla.
llvm-svn: 97671
2010-03-03 21:56:57 +00:00
Chris Lattner
576def7fbe
fix PR6475, we were doing side-effecting stuff in an assert.
...
llvm-svn: 97669
2010-03-03 21:52:23 +00:00
Fariborz Jahanian
a529c25555
Implements mangling of local class names to
...
fix a code gen crash. This is WIP as not
all ABI cases are covered (there is a FIXME to
this effect). Fixes radar 7696748.
llvm-svn: 97658
2010-03-03 19:41:08 +00:00
Chris Lattner
5cc15e058b
add framework for ARM builtins, Patch by Edmund Grimley Evans!
...
llvm-svn: 97656
2010-03-03 19:03:45 +00:00
Ted Kremenek
83b28a2433
Add '-test-print-linkage-source' option to c-index-test
...
to test clang_getCursorLinkage()
llvm-svn: 97648
2010-03-03 06:37:58 +00:00
Anders Carlsson
5b0057c05b
Fix a bug with base offset merging that Devang noticed.
...
llvm-svn: 97641
2010-03-03 04:58:02 +00:00
Douglas Gregor
3e637467d7
Implement name hiding for names found through virtual base subobjects
...
that are hidden by other derived base subobjects reached along a
lookup path that does *not* pass through the hiding subobject (C++
[class.member.lookup]p6). Fixes PR6462.
llvm-svn: 97640
2010-03-03 04:38:46 +00:00
John McCall
1950a11939
Don't emit derived-to-base destructor aliases if we don't have a definition
...
for the base destructor, because aliases to declarations aren't legal.
Fixes PR 6471.
llvm-svn: 97637
2010-03-03 03:40:11 +00:00
Zhongxing Xu
6b11b4e050
Add comments to test case.
...
llvm-svn: 97619
2010-03-03 01:02:48 +00:00
Douglas Gregor
a75600b7d8
Don't use echo in the Index test, which I hope will work around an intermittent Windows failure
...
llvm-svn: 97613
2010-03-03 00:03:22 +00:00
John McCall
6b21eb5c59
Suppress implicit member redeclarations arising from explicit instantiation
...
declarations after the member has been explicitly specialized. We already
did this after explicit instantiation definitions; not doing it for
declarations meant that subsequent definitions would see a previous
member declaration with specialization kind "explicit instantiation decl",
which would then happily get overridden.
Fixes PR 6458.
llvm-svn: 97605
2010-03-02 23:09:38 +00:00
Rafael Espindola
70e040d552
During codegen assert that any copy assignment, destructor or constructor that
...
we need to synthesize has been marked as used by Sema.
Change Sema to avoid these asserts.
llvm-svn: 97589
2010-03-02 21:28:26 +00:00
Douglas Gregor
63d08ddda6
Add test case from PR6064, which now works
...
llvm-svn: 97575
2010-03-02 18:48:07 +00:00