summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Test case for PR5134.John McCall2009-12-231-0/+7
| | | | llvm-svn: 91965
* Driver: Fix '... -O4 -O0 ...', which was generating bitcode.Daniel Dunbar2009-12-231-0/+10
| | | | llvm-svn: 91962
* Test case from PR5476.John McCall2009-12-231-0/+11
| | | | llvm-svn: 91957
* Set a member's access specifier even if it doesn't match the previous specifier.John McCall2009-12-231-0/+11
| | | | | | | | Prevents an assert on successive redeclarations. Fixed PR5573. llvm-svn: 91956
* Add basic support for analyzing CastExprs as lvalues.Ted Kremenek2009-12-231-0/+11
| | | | llvm-svn: 91952
* Objective-C methods can be variadic, too. Who knew.Douglas Gregor2009-12-231-0/+10
| | | | llvm-svn: 91951
* warn when attribute warn_unused_result is applied to void functions.Nuno Lopes2009-12-221-2/+4
| | | | | | while at it, remove an outdated FIXME llvm-svn: 91946
* Allow the first parameter of operator new to be a cv-qualifiedDouglas Gregor2009-12-221-2/+2
| | | | | | | | size_t. Also, fix an issue with initialization of parameters in calls, where we weren't removing the cv-qualifiers on the parameter type itself. Fixes PR5823. llvm-svn: 91941
* Make sure that reinterpret_cast gets a CastKind on all successfulDouglas Gregor2009-12-221-0/+6
| | | | | | | paths. Fixes "cannot compile this unexpected cast lvalue yet" error in llvm/lib/Analysis/IPA/GlobalsModRef.cpp. llvm-svn: 91932
* Add using shadow decls to the "instantiated locals" map, fixing PR5847.John McCall2009-12-221-0/+14
| | | | llvm-svn: 91928
* Switch Sema::AddCXXDirectInitializerToDecl over to InitializationSequenceDouglas Gregor2009-12-224-8/+7
| | | | llvm-svn: 91927
* Add transfer functions support for visiting an Objective-C message ↵Ted Kremenek2009-12-221-0/+31
| | | | | | expression as an lvalue when the return type is a C++ reference. llvm-svn: 91926
* Serialize the NoReturn bit on FunctionTypes for precompiled headersDouglas Gregor2009-12-222-0/+7
| | | | llvm-svn: 91911
* Enter the scope of an initializer for direct-initialization as well asDouglas Gregor2009-12-221-0/+2
| | | | | | for copy-initialization. llvm-svn: 91909
* When transforming a C++ "new" expression that was not explicitly givenDouglas Gregor2009-12-221-0/+14
| | | | | | | a size, check whether the transformed type is itself an array type. If so, take the major array bound as the size to allocate. Fixes PR5833. llvm-svn: 91907
* Switch initialization of parameters in a call over toDouglas Gregor2009-12-225-11/+10
| | | | | | | | | | | InitializationSequence (when a FunctionDecl is present). This required a few small fixes to initialization sequences: - Make sure to use the adjusted parameter type for initialization of function parameters. - Implement transparent union calling semantics in C llvm-svn: 91902
* Make sure that we mangle overloaded operators that are member functions ↵Anders Carlsson2009-12-222-3/+21
| | | | | | | | correctly, giving them the correct arity. With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being). llvm-svn: 91893
* fix a bug handling the gnu ?: extension. Patch by Storlek on IRC,Chris Lattner2009-12-221-0/+1
| | | | | | who prefers to be stealthy and mysterious. llvm-svn: 91888
* When we simply return a retained member expression when instantiating, we ↵Anders Carlsson2009-12-221-0/+27
| | | | | | must also mark the member decl as referenced. llvm-svn: 91887
* Switch default arguments over to InitializationSequence.Eli Friedman2009-12-223-3/+3
| | | | llvm-svn: 91883
* Switch file-scope assignment initialization over to InitializationSequence.Eli Friedman2009-12-226-9/+9
| | | | llvm-svn: 91881
* x86_64: Structures with no fields but which have padding should be classified asDaniel Dunbar2009-12-222-2/+5
| | | | | | | | integer. - This is consistent, but may not be correct. I will revisit x86_64 ABI handling for C++ as a whole at some point. - PR5831. llvm-svn: 91874
* When converting from a type to itself or one of its base classes via aDouglas Gregor2009-12-221-0/+14
| | | | | | | | | constructor call, the conversion is only a standard conversion sequence if that constructor is a copy constructor. This fixes PR5834 in a semi-lame way, because the "real" fix will be to move over to InitializationSequence. That will happen "soonish", but not now. llvm-svn: 91861
* When filling in value initializations within an initializer list, beDouglas Gregor2009-12-221-0/+17
| | | | | | | sure to fill in the initialized member of a union when a member was explicitly designated. Fixes PR5843. llvm-svn: 91858
* ARM: Honor -mfpu= and set __VFP_FP__ and __ARM_NEON__ "correctly".Daniel Dunbar2009-12-211-1/+0
| | | | | | | | - Correctly is in quotes, because we are following what I interpreted as GCC's intent (which diverges from practice, naturally). - Also, fix the arch define for arm1136jf-s. llvm-svn: 91855
* When a template-id refers to a single function template, and theDouglas Gregor2009-12-212-2/+39
| | | | | | | | | | explicitly-specified template arguments are enough to determine the instantiation, and either template argument deduction fails or is not performed in that context, we can resolve the template-id down to a function template specialization (so sayeth C++0x [temp.arg.explicit]p3). Fixes PR5811. llvm-svn: 91852
* Allow comparison of 'void *' with function pointer Fariborz Jahanian2009-12-211-0/+9
| | | | | | as a g++ extension (fixes radar 7481987). llvm-svn: 91827
* Fix for PR5840: fix the kind of name lookup used for classes inEli Friedman2009-12-211-0/+8
| | | | | | | | | | Sema::getTypeName. "LookupNestedNameSpecifierName" isn't quite the right kind of lookup, though; it doesn't ignore namespaces. Someone more familiar with the lookup code should fix this properly. llvm-svn: 91809
* Add tests for structs inside anonymous namespaces.Anders Carlsson2009-12-211-2/+17
| | | | llvm-svn: 91806
* Incomplete structs should also have internal linkage.Anders Carlsson2009-12-211-0/+2
| | | | llvm-svn: 91805
* Correcly handle pointers to member pointer types where the class or the ↵Anders Carlsson2009-12-202-5/+28
| | | | | | pointee is incomplete. llvm-svn: 91804
* fix PR4010: add support for the warn_unused_result for function pointersNuno Lopes2009-12-201-0/+5
| | | | llvm-svn: 91803
* fix PR5500: clang fails to parse inline asm with :: in C++ mode Chris Lattner2009-12-201-0/+6
| | | | llvm-svn: 91802
* a really old testcase I apparently forgot to 'svn add'.Chris Lattner2009-12-201-0/+33
| | | | llvm-svn: 91800
* Rework the way pointer types are handled by the RTTI builder. We now get the ↵Anders Carlsson2009-12-202-6/+29
| | | | | | right linkage for indirect pointers to incomplete structs. llvm-svn: 91799
* Make sure we instantiate the destructor for variables initialized byEli Friedman2009-12-201-0/+11
| | | | | | assignment. llvm-svn: 91798
* Switch default-initialization of variables of class type (or array thereof) ↵Douglas Gregor2009-12-209-18/+17
| | | | | | over to InitializationSequence. I could swear that this fixes a PR somewhere, but I couldn't figure out which one llvm-svn: 91796
* Don't inject the class name until that magical lbrace.John McCall2009-12-201-0/+8
| | | | | | | | | | | | | | | | Because of the rules of base-class lookup* and the restrictions on typedefs, it was actually impossible for this to cause any problems more serious than the spurious acceptance of template <class T> class A : B<A> { ... }; instead of template <class T> class A : B<A<T> > { ... }; but I'm sure we can all agree that that is a very important restriction which is well worth making another Parser->Sema call for. (*) n.b. clang++ does not implement these rules correctly; we are not ignoring non-type names llvm-svn: 91792
* Test the lookup I wasn't sure would be done properly after the last patch.John McCall2009-12-201-5/+25
| | | | | | | | | Clang reasonably adds all the base specifiers in one pass; this is now required for correctness to prevent lookup from going mad. But this has the advantage of establishing the correct context when looking up base specifiers, which will be important for access control. llvm-svn: 91791
* Parse base specifiers within the scope of the class. This is possibly notJohn McCall2009-12-191-0/+9
| | | | | | quite right; I'll come back to it later. It does fix PR 5741. llvm-svn: 91789
* Refactor to remove more dependencies on PreDeclaratorDC. I seem to have madeJohn McCall2009-12-191-8/+6
| | | | | | | the redeclaration problems in the [temp.explicit]p3 testcase worse, but I can live with that; they'll need to be fixed more holistically anyhow. llvm-svn: 91771
* Just push a new scope when parsing an out-of-line variable definition.John McCall2009-12-193-2/+20
| | | | | | | Magically fixes all the terrible lookup problems associated with not pushing a new scope. Resolves an ancient xfail and an LLVM misparse. llvm-svn: 91769
* Initialization improvements: addition of string initialization and a fewEli Friedman2009-12-1919-37/+33
| | | | | | | | small bug fixes in SemaInit, switch over SemaDecl to use it more often, and change a bunch of diagnostics which are different with the new initialization code. llvm-svn: 91767
* A CXXExprWithTemporaries expression is an lvalue if its subexpressionDouglas Gregor2009-12-191-0/+19
| | | | | | is an lvalue. Fixes PR5787. llvm-svn: 91765
* Use the FunctionDecl's result type to know exactly if it returns a reference.Zhongxing Xu2009-12-191-2/+1
| | | | llvm-svn: 91751
* Switch more of Sema::CheckInitializerTypes over toDouglas Gregor2009-12-1913-31/+52
| | | | | | | | | | InitializationSequence. Specially, switch initialization of a C++ class type (either copy- or direct-initialization). Also, make sure that we create an elidable copy-construction when performing copy initialization of a C++ class variable. Fixes PR5826. llvm-svn: 91750
* Correctly initialize the PrimaryBaseInfo if a base is null. Fixes PR5832.Anders Carlsson2009-12-191-0/+8
| | | | llvm-svn: 91748
* Unresolved implicit member accesses are dependent if the object type is ↵John McCall2009-12-191-0/+14
| | | | | | | | | | dependent. Avoids an assertion arising during object-argument initialization in overload resolution. In theory we can resolve this at definition time if the class hierarchy for the member is fully known. llvm-svn: 91747
* Teach TryAnnotateTypeOrScopeToken to deal with already-annotatedJohn McCall2009-12-192-4/+42
| | | | | | | scope specifiers. Fix a tentative parsing bug that came up in LLVM. Incidentally fixes some random FIXMEs in an existing testcase. llvm-svn: 91734
* Fix for PR5524: make reference binding in default argument work correctly.Eli Friedman2009-12-191-0/+6
| | | | llvm-svn: 91733
OpenPOWER on IntegriCloud