Anders Carlsson
652758c3ec
Pass the nearest virtual base decl to InitializeVTablePointers. No functionality change right now.
...
llvm-svn: 101872
2010-04-20 05:22:15 +00:00
Chris Lattner
b596ac718e
reapply john's patch, he broke mainline again by changing the test.
...
llvm-svn: 101871
2010-04-20 05:19:10 +00:00
Anders Carlsson
3d4218570a
Assert that the path from the derived to the base class in CodeGenFunction::GetAddressOfBaseClass is not ambiguous.
...
llvm-svn: 101869
2010-04-20 05:07:22 +00:00
John Thompson
359675d036
Altivec vector literal initializer count mismatch error removed.
...
llvm-svn: 101868
2010-04-20 05:01:46 +00:00
Zhongxing Xu
4d4b8d833e
Use GetState() to get the possible cleaned state.
...
llvm-svn: 101867
2010-04-20 04:53:09 +00:00
Chris Lattner
03499d36b5
grr, lit only hates me, not the rest of the world.
...
llvm-svn: 101865
2010-04-20 04:33:06 +00:00
Chris Lattner
3da9a2a3a9
revert r101863, whcih is causing Sema/altivec-init.c to fail on a ton
...
of buildbots with:
error: 'error' diagnostics expected but not seen:
Line 9: too few elements in vector initialization (expected 8 elements, have 2)
1 warning and 1 error generated.
llvm-svn: 101864
2010-04-20 04:31:55 +00:00
John Thompson
f351b2c2b4
Altivec vector literal initializer count mismatch error removed.
...
llvm-svn: 101863
2010-04-20 03:58:33 +00:00
Zhongxing Xu
40eb21a827
Improve handling of CXXNewExpr.
...
llvm-svn: 101862
2010-04-20 03:37:34 +00:00
John McCall
0f55a035cf
Restore r101841 without modification. Also mark 'operator delete' as used for
...
actual delete expressions, not just new expressions.
llvm-svn: 101861
2010-04-20 02:18:25 +00:00
John McCall
44adf26dd0
Revert r101841 and follow-up.
...
llvm-svn: 101859
2010-04-20 01:42:53 +00:00
Chris Lattner
b6410e168c
add __builtin_[r]index. Perhaps all LIBBUILTIN's should get
...
these or something?
llvm-svn: 101858
2010-04-20 01:31:15 +00:00
John McCall
21f8d1d643
Use __SIZE_TYPE__ as suggested by dgregor.
...
llvm-svn: 101857
2010-04-20 01:26:56 +00:00
John McCall
75b4746e7d
Don't bother looking for (or diagnosing problems with) the 'operator delete'
...
associated with a new expression if -fno-exceptions is set.
llvm-svn: 101841
2010-04-20 00:22:43 +00:00
Douglas Gregor
dc35ef9279
Do not diagnose unused-parameter errors in template instantiations. We
...
will already have done so when the template is declared.
llvm-svn: 101838
2010-04-19 23:56:20 +00:00
Douglas Gregor
c4df407604
Keep track of the actual storage specifier written on a variable or
...
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.
llvm-svn: 101826
2010-04-19 22:54:31 +00:00
Douglas Gregor
f4cd8f4ece
Only suppress the "extern variable has an initializer" warning when the extern entity being initialized is const.
...
llvm-svn: 101821
2010-04-19 22:34:40 +00:00
Douglas Gregor
c81ca09830
Disable the "'extern' variable has an initializer" warning in C++,
...
since it makes sense there to have const extern variables. Fixes
PR6495.
llvm-svn: 101818
2010-04-19 21:31:25 +00:00
Daniel Dunbar
ccabe48235
AST: Dump ASTRecordLayout objects when they are created with -fdump-record-layouts.
...
llvm-svn: 101815
2010-04-19 20:44:53 +00:00
Daniel Dunbar
2ea5183b59
IRgen: Kill unused function and move the type match assert to after record dumping.
...
llvm-svn: 101814
2010-04-19 20:44:47 +00:00
Chris Lattner
72286d6129
add a PPCallback handler for a skipped #include, patch by
...
Zhanyong Wan!
llvm-svn: 101813
2010-04-19 20:44:31 +00:00
Douglas Gregor
ca7136b9ac
When normal name lookup to disambiguiate an Objective-C message send
...
fails to find anything, perform ivar lookup and, if we find one,
consider this an instance message.
llvm-svn: 101810
2010-04-19 20:09:36 +00:00
Douglas Gregor
26380d493b
More tests for Objective-C-related name lookup weirdness. Yes, it's
...
weird; yes, it's what GCC does. Almost.
llvm-svn: 101803
2010-04-19 19:10:40 +00:00
Eric Christopher
5c6525fbee
Add a testcase for PR6501 (too many/too few arguments to a function call).
...
llvm-svn: 101800
2010-04-19 18:39:43 +00:00
Fariborz Jahanian
fd34b0ac84
Check for darwin befoer cheking for version.
...
(related to radar 7866951).
llvm-svn: 101799
2010-04-19 18:38:31 +00:00
Fariborz Jahanian
cf33091659
Make this test darwin10 specific.
...
llvm-svn: 101797
2010-04-19 18:27:05 +00:00
Eric Christopher
ca6638f950
Temporarily XFAIL this test on windows.
...
llvm-svn: 101796
2010-04-19 18:26:40 +00:00
Eric Christopher
63448c3de2
Remove the argument number from the constant integer diagnostic.
...
Update all of the testcases accordingly.
llvm-svn: 101795
2010-04-19 18:23:02 +00:00
Fariborz Jahanian
4d55b2d049
Some renaming of methods, fixes typo
...
(related to PR6769).
llvm-svn: 101794
2010-04-19 18:15:02 +00:00
Douglas Gregor
0b59e80db5
When searching for code-completion and typo-correction candidates,
...
look from an Objective-C class or category to its implementation, to
pick up synthesized ivars. Fixes a problem reported by David
Chisnall.
llvm-svn: 101792
2010-04-19 18:02:19 +00:00
Fariborz Jahanian
dfb3983525
Force clang to produce legacy api for messaging
...
in for pre-snowleoprd (NeXt runtime). Fixes
radar 7866951
llvm-svn: 101791
2010-04-19 17:53:30 +00:00
Rafael Espindola
47cf5b581a
Add comment explaning the use of c99 inline in c++.
...
llvm-svn: 101787
2010-04-19 16:58:20 +00:00
Dan Gohman
145f3f1e83
Fix -Wcast-qual warnings.
...
llvm-svn: 101786
2010-04-19 16:39:44 +00:00
Zhongxing Xu
6a479bf281
Move all C++ expression evaluation logic into its own file.
...
llvm-svn: 101772
2010-04-19 12:51:02 +00:00
Zhongxing Xu
b6843f5f35
Analyzer: add support for CXXNewExpr.
...
llvm-svn: 101771
2010-04-19 11:47:28 +00:00
David Chisnall
44ec555a87
Don't just emit ivar metadata - emit CORRECT ivar metadata. (GNU runtime)
...
llvm-svn: 101759
2010-04-19 01:37:25 +00:00
David Chisnall
18cf7378de
Fix emitting ivar metadata for synthesized ivars and some 64-bit fixes. (GNU runtime)
...
llvm-svn: 101758
2010-04-19 00:45:34 +00:00
Rafael Espindola
683fe4fc4c
If a method is virtual and the class key function is in another file, emit the method as available_externally.
...
Fixes PR6747
llvm-svn: 101757
2010-04-19 00:44:22 +00:00
Fariborz Jahanian
3fef72f0ba
Local static variables must be available module-wise
...
as they are accessible in static methods in a class
local to the same function. Fixes PR6769.
llvm-svn: 101756
2010-04-18 21:01:23 +00:00
Nuno Lopes
247a138ec6
recommit r101568 to fix PR6766
...
as a side-effect, remove two FIXMEs now fixed
llvm-svn: 101726
2010-04-18 19:06:43 +00:00
Douglas Gregor
1da2225786
Make sure that we don't visit redeclarations of nested classes while
...
instantiating class members as part of an explicit
instantiation. Addresses a compilation problem in
Boost.Serialization.
llvm-svn: 101725
2010-04-18 18:11:38 +00:00
Douglas Gregor
b74b1038bb
C++ [namespace.memdef]p3 only applies when the friend is not named via
...
a qualified name. We weren't checking for an empty
nested-name-specifier when dealing with friend class templates
(although we were checking in the other places where we deal with this
paragraph). Fixes a Boost.Serialization showstopper.
llvm-svn: 101724
2010-04-18 17:37:40 +00:00
Daniel Dunbar
8387488f14
tests: Don't force triple in x86-builtin-palignr test, this test should be
...
portable.
llvm-svn: 101719
2010-04-18 15:30:18 +00:00
Benjamin Kramer
98ff7f8730
Bail out early to avoid comparing the internals of two conversion sequences of
...
different kinds (aka garbage). This happens if we're comparing a standard
conversion sequence to an ambiguous one which have the same KindRank.
Found by valgrind.
llvm-svn: 101717
2010-04-18 12:05:54 +00:00
Douglas Gregor
870f3743e4
When performing reference initialization for the purposes of overload
...
resolution ([over.ics.ref]), we take some shortcuts required by the
standard that effectively permit binding of a const volatile reference
to an rvalue. We have to treat lightly here to avoid infinite
recursion.
Fixes PR6177.
llvm-svn: 101712
2010-04-18 09:22:00 +00:00
Douglas Gregor
f93df19496
Binding a reference to an rvalue is a direct binding in C++0x but not
...
in C++03.
llvm-svn: 101707
2010-04-18 08:46:23 +00:00
Chandler Carruth
aad3007fe5
Fix the access checking of function and function template argument types,
...
return types, and default arguments. This fixes PR6855 along with several
similar cases where we rejected valid code.
llvm-svn: 101706
2010-04-18 08:23:21 +00:00
Douglas Gregor
30b5277a0a
When checking the copy constructor for the optional copy during a
...
reference binding to an rvalue of reference-compatible type, check
parameters after the first for complete parameter types and build any
required default function arguments. We're effectively simulating the
type-checking for a call without building the call itself.
llvm-svn: 101705
2010-04-18 07:57:34 +00:00
Douglas Gregor
c9cd64eee3
In C++98/03, when binding a reference to an rvalue of
...
reference-compatible type, the implementation is permitted to make a
copy of the rvalue (or many such copies, even). However, even though
we don't make that copy, we are required to check for the presence of
a suitable copy constructor. With this change, we do.
Note that in C++0x we are not allowed to make these copies, so we test
both dialects separately.
Also note the FIXME in one of the C++03 tests, where we are not
instantiating default function arguments for the copy constructor we
pick (but do not call). The fix is obvious; eliminating the infinite
recursion it causes is not. Will address that next.
llvm-svn: 101704
2010-04-18 07:40:54 +00:00
Chandler Carruth
5acc7d0e17
Add testcase that I forgot for r101667 for gnu-keywords.
...
llvm-svn: 101700
2010-04-18 06:12:13 +00:00