summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove dead code.Benjamin Kramer2010-04-202-30/+0
| | | | llvm-svn: 101920
* IRgen: Always use i8 arrays to access union bit-fields. This is ugly, butDaniel Dunbar2010-04-201-15/+6
| | | | | | | matches how we currently handle structs, and this correctly handles -fno-bitfield-type-align. llvm-svn: 101918
* remove some extraneous qualifiers.Chris Lattner2010-04-201-2/+2
| | | | llvm-svn: 101912
* Fix a bug which triggered the assertion I added yesterday. Basically, when ↵Anders Carlsson2010-04-202-13/+30
| | | | | | we initialize the vtable pointer for a virtual base, and there was another path from the most derived class to another base with the same class type, we would use the wrong base. llvm-svn: 101911
* Move code to apply a non-virtual and virtual offset out into a separate ↵Anders Carlsson2010-04-201-19/+31
| | | | | | function. llvm-svn: 101909
* Keep proper source location information for the type in an Objective-CDouglas Gregor2010-04-205-15/+19
| | | | | | @encode expression. llvm-svn: 101907
* Introduce a limit on the depth of the template instantiation backtraceDouglas Gregor2010-04-205-2/+38
| | | | | | | | | | | | | | | | we will print with each error that occurs during template instantiation. When the backtrace is longer than that, we will print N/2 of the innermost backtrace entries and N/2 of the outermost backtrace entries, then skip the middle entries with a note such as: note: suppressed 2 template instantiation contexts; use -ftemplate-backtrace-limit=N to change the number of template instantiation entries shown This should eliminate some excessively long backtraces that aren't providing any value. llvm-svn: 101882
* don't slap noalias attribute on stret result arguments.Chris Lattner2010-04-201-2/+1
| | | | | | | | | This mirror's Dan's patch for llvm-gcc in r97989, and fixes the miscompilation in PR6525. There is some contention over whether this is the right thing to do, but it is the conservative answer and demonstrably fixes a miscompilation. llvm-svn: 101877
* Replace code with a method call. No functionality change.Zhongxing Xu2010-04-201-65/+8
| | | | llvm-svn: 101876
* Pass the nearest virtual base decl to InitializeVTablePointers. No ↵Anders Carlsson2010-04-202-14/+11
| | | | | | functionality change right now. llvm-svn: 101872
* reapply john's patch, he broke mainline again by changing the test.Chris Lattner2010-04-201-1/+1
| | | | llvm-svn: 101871
* Assert that the path from the derived to the base class in ↵Anders Carlsson2010-04-201-0/+7
| | | | | | CodeGenFunction::GetAddressOfBaseClass is not ambiguous. llvm-svn: 101869
* Use GetState() to get the possible cleaned state.Zhongxing Xu2010-04-201-3/+3
| | | | llvm-svn: 101867
* revert r101863, whcih is causing Sema/altivec-init.c to fail on a tonChris Lattner2010-04-201-1/+1
| | | | | | | | | | 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
* Altivec vector literal initializer count mismatch error removed.John Thompson2010-04-201-1/+1
| | | | llvm-svn: 101863
* Improve handling of CXXNewExpr.Zhongxing Xu2010-04-201-7/+62
| | | | llvm-svn: 101862
* Restore r101841 without modification. Also mark 'operator delete' as used forJohn McCall2010-04-201-0/+9
| | | | | | actual delete expressions, not just new expressions. llvm-svn: 101861
* Revert r101841 and follow-up.John McCall2010-04-201-7/+0
| | | | llvm-svn: 101859
* Don't bother looking for (or diagnosing problems with) the 'operator delete'John McCall2010-04-201-0/+7
| | | | | | associated with a new expression if -fno-exceptions is set. llvm-svn: 101841
* Do not diagnose unused-parameter errors in template instantiations. WeDouglas Gregor2010-04-191-1/+7
| | | | | | will already have done so when the template is declared. llvm-svn: 101838
* Keep track of the actual storage specifier written on a variable orDouglas Gregor2010-04-1919-91/+182
| | | | | | | | 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
* Only suppress the "extern variable has an initializer" warning when the ↵Douglas Gregor2010-04-191-1/+1
| | | | | | extern entity being initialized is const. llvm-svn: 101821
* Disable the "'extern' variable has an initializer" warning in C++,Douglas Gregor2010-04-191-1/+2
| | | | | | | since it makes sense there to have const extern variables. Fixes PR6495. llvm-svn: 101818
* AST: Dump ASTRecordLayout objects when they are created with ↵Daniel Dunbar2010-04-193-13/+31
| | | | | | -fdump-record-layouts. llvm-svn: 101815
* IRgen: Kill unused function and move the type match assert to after record ↵Daniel Dunbar2010-04-191-13/+8
| | | | | | dumping. llvm-svn: 101814
* add a PPCallback handler for a skipped #include, patch byChris Lattner2010-04-191-6/+9
| | | | | | Zhanyong Wan! llvm-svn: 101813
* When normal name lookup to disambiguiate an Objective-C message sendDouglas Gregor2010-04-191-0/+10
| | | | | | | fails to find anything, perform ivar lookup and, if we find one, consider this an instance message. llvm-svn: 101810
* Check for darwin befoer cheking for version.Fariborz Jahanian2010-04-191-1/+2
| | | | | | (related to radar 7866951). llvm-svn: 101799
* Remove the argument number from the constant integer diagnostic.Eric Christopher2010-04-191-1/+1
| | | | | | Update all of the testcases accordingly. llvm-svn: 101795
* Some renaming of methods, fixes typoFariborz Jahanian2010-04-193-5/+7
| | | | | | (related to PR6769). llvm-svn: 101794
* When searching for code-completion and typo-correction candidates,Douglas Gregor2010-04-191-0/+15
| | | | | | | | 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
* Force clang to produce legacy api for messagingFariborz Jahanian2010-04-191-1/+4
| | | | | | | in for pre-snowleoprd (NeXt runtime). Fixes radar 7866951 llvm-svn: 101791
* Add comment explaning the use of c99 inline in c++.Rafael Espindola2010-04-191-0/+4
| | | | llvm-svn: 101787
* Fix -Wcast-qual warnings.Dan Gohman2010-04-1910-11/+18
| | | | llvm-svn: 101786
* Move all C++ expression evaluation logic into its own file.Zhongxing Xu2010-04-193-234/+238
| | | | llvm-svn: 101772
* Analyzer: add support for CXXNewExpr.Zhongxing Xu2010-04-193-11/+40
| | | | llvm-svn: 101771
* Don't just emit ivar metadata - emit CORRECT ivar metadata. (GNU runtime)David Chisnall2010-04-191-2/+8
| | | | llvm-svn: 101759
* Fix emitting ivar metadata for synthesized ivars and some 64-bit fixes. (GNU ↵David Chisnall2010-04-191-12/+15
| | | | | | runtime) llvm-svn: 101758
* If a method is virtual and the class key function is in another file, emit ↵Rafael Espindola2010-04-192-1/+17
| | | | | | | | the method as available_externally. Fixes PR6747 llvm-svn: 101757
* Local static variables must be available module-wiseFariborz Jahanian2010-04-183-0/+12
| | | | | | | as they are accessible in static methods in a class local to the same function. Fixes PR6769. llvm-svn: 101756
* recommit r101568 to fix PR6766Nuno Lopes2010-04-181-8/+6
| | | | | | as a side-effect, remove two FIXMEs now fixed llvm-svn: 101726
* Make sure that we don't visit redeclarations of nested classes whileDouglas Gregor2010-04-181-1/+4
| | | | | | | | instantiating class members as part of an explicit instantiation. Addresses a compilation problem in Boost.Serialization. llvm-svn: 101725
* C++ [namespace.memdef]p3 only applies when the friend is not named viaDouglas Gregor2010-04-181-15/+17
| | | | | | | | | 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
* Bail out early to avoid comparing the internals of two conversion sequences ofBenjamin Kramer2010-04-181-0/+5
| | | | | | | | | 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
* When performing reference initialization for the purposes of overloadDouglas Gregor2010-04-181-7/+17
| | | | | | | | | | | 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
* Binding a reference to an rvalue is a direct binding in C++0x but notDouglas Gregor2010-04-181-20/+17
| | | | | | in C++03. llvm-svn: 101707
* Fix the access checking of function and function template argument types,Chandler Carruth2010-04-181-2/+9
| | | | | | | return types, and default arguments. This fixes PR6855 along with several similar cases where we rejected valid code. llvm-svn: 101706
* When checking the copy constructor for the optional copy during aDouglas Gregor2010-04-181-3/+19
| | | | | | | | | 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
* In C++98/03, when binding a reference to an rvalue ofDouglas Gregor2010-04-183-16/+95
| | | | | | | | | | | | | | | | | 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
* Allow the 'ibaction' attribute to be attached to method declarations (and ↵Ted Kremenek2010-04-181-2/+12
| | | | | | not issue a warning). llvm-svn: 101699
OpenPOWER on IntegriCloud