summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Improve template instantiation for member access expressions thatDouglas Gregor2009-09-032-13/+21
| | | | | | | | | involve qualified names, e.g., x->Base::f. We now maintain enough information in the AST to compare the results of the name lookup of "Base" in the scope of the postfix-expression (determined at template definition time) and in the type of the object expression. llvm-svn: 80953
* Mark constructors used in initialization of base(s) and fieldsFariborz Jahanian2009-09-031-3/+11
| | | | | | | as referecned with location where they are used. Still need to look at destructor aspects of them. llvm-svn: 80950
* Issue diagnostics in variety of situations involvingFariborz Jahanian2009-09-031-0/+22
| | | | | | | | reference/const data members when user has declared the constructor. This necessitated some non-minor refactoring. llvm-svn: 80934
* Improved handling for dependent, qualified member access expressions, e.g.,Douglas Gregor2009-09-031-13/+10
| | | | | | | | | | | | | | | t->Base::f where t has a dependent type. We save the nested-name-specifier in the CXXUnresolvedMemberExpr then, during instantiation, substitute into the nested-name-specifier with the (transformed) object type of t, so that we get name lookup into the type of the object expression. Note that we do not yet retain information about name lookup into the lexical scope of the member access expression, so several regression tests are still disabled. llvm-svn: 80925
* This patch does the following.Fariborz Jahanian2009-09-032-3/+3
| | | | | | | | | | | 1) Issue digsnostics in non-fragile ABI, when an expression evaluates to an interface type (except when it is used to access a non-fragile ivar). 2) Issue unsupported error in fragile ABI when an expression evaluates to an interface type (except when it is used to access a fragile ivar). llvm-svn: 80860
* Add a wicked little test-case that illustrates what we have to dealDouglas Gregor2009-09-021-0/+48
| | | | | | | | with to properly support member access expressions in templates. This test is XFAIL'd, because we get it completely wrong, but I've made the minimal changes to the representation to at least avoid a crash. llvm-svn: 80856
* Referenced instatiated default constructors Fariborz Jahanian2009-09-021-1/+24
| | | | | | must be defined. Fixed pr4853. llvm-svn: 80846
* Rewrite of our handling of name lookup in C++ member access expressions, e.g.,Douglas Gregor2009-09-023-7/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | x->Base::f We no longer try to "enter" the context of the type that "x" points to. Instead, we drag that object type through the parser and pass it into the Sema routines that need to know how to perform lookup within member access expressions. We now implement most of the crazy name lookup rules in C++ [basic.lookup.classref] for non-templated code, including performing lookup both in the context of the type referred to by the member access and in the scope of the member access itself and then detecting ambiguities when the two lookups collide (p1 and p4; p3 and p7 are still TODO). This change also corrects our handling of name lookup within template arguments of template-ids inside the nested-name-specifier (p6; we used to look into the scope of the object expression for them) and fixes PR4703. I have disabled some tests that involve member access expressions where the object expression has dependent type, because we don't yet have the ability to describe dependent nested-name-specifiers starting with an identifier. llvm-svn: 80843
* Added a FIXME to the test case.Fariborz Jahanian2009-09-021-0/+1
| | | | llvm-svn: 80840
* Fix an assertion when initializing a union using a member initializer. (We ↵Anders Carlsson2009-09-021-0/+12
| | | | | | weren't casting from the union type to the initializer type correctly). llvm-svn: 80837
* Changed abi mode for these test which are dereferencing Fariborz Jahanian2009-09-022-2/+2
| | | | | | an interface pointer. llvm-svn: 80836
* Fix a crash when referencing static data members.Anders Carlsson2009-09-021-0/+8
| | | | llvm-svn: 80835
* Borrow a friend class's previous declaration's access specifier regardless ofJohn McCall2009-09-021-0/+3
| | | | | | | | whether the current context is dependent. Thanks to Anders for pointing this out. llvm-svn: 80828
* Fix a codegen crash when a class template has a constructor that does member ↵Anders Carlsson2009-09-021-0/+10
| | | | | | initialization of an anonymous union. llvm-svn: 80826
* Packed unions should be packed. Fixes an assert Daniel reported.Anders Carlsson2009-09-021-0/+16
| | | | llvm-svn: 80808
* Allow null initialization of scalara data membersFariborz Jahanian2009-09-021-0/+21
| | | | | | in constructors's initializer list. pr4854 llvm-svn: 80802
* Add a few more typename-specifier tests that involve simple-template-ids in ↵Douglas Gregor2009-09-021-0/+14
| | | | | | the nested-name-specifier llvm-svn: 80784
* When parsing typename specifiers (with either the identifier orDouglas Gregor2009-09-021-0/+56
| | | | | | | | | | | | simple-template-id form), check whether the scope specifier is computable as a declaration context rather than checking whether it is dependent, so that we properly cope with members of the current instantiation. Improve testing for typename specifiers that terminate in a simpe-template-id. llvm-svn: 80783
* Implement: <rdar://problem/6337100> CWE-338: Use of cryptographically weak prngTed Kremenek2009-09-021-0/+29
| | | | | | Patch by Geoff Keating! llvm-svn: 80752
* When adding a friend class declaration to the lookup tables, use the access ↵John McCall2009-09-021-0/+4
| | | | | | | | | | specifier of any previous declaration in case we replace it in a class's declaration table. Fixes bug 4858. This sort of thing makes me reconsider putting friend declarations in declaration lists. llvm-svn: 80750
* Fix a little crasher in friend decls. Thanks again to Eli for finding this.John McCall2009-09-021-0/+4
| | | | llvm-svn: 80748
* Ensure that the tag decls of friend decls aren't added to the friending class'sJohn McCall2009-09-022-2/+10
| | | | | | | decl list, and remove some workarounds that were due to this. Thanks to Eli for pointing this out and providing the test case. llvm-svn: 80745
* Test for my last patch.Fariborz Jahanian2009-09-021-0/+12
| | | | llvm-svn: 80740
* Testcase for recent checkin.Mike Stump2009-09-011-3/+3
| | | | llvm-svn: 80725
* Handle member expressions that return references correctly.Anders Carlsson2009-09-011-0/+8
| | | | llvm-svn: 80723
* In CXXBaseOrMemberInitializer, don't confuse CtorTocall withDouglas Gregor2009-09-011-0/+18
| | | | | | AnonUnionMember. Fixes PR4826. llvm-svn: 80721
* Use the correct cast kinds for bit casts and function to pointer decay. ↵Anders Carlsson2009-09-011-0/+5
| | | | | | Fixes PR4827. llvm-svn: 80720
* We can generate constructors/destructors with base classes and non-trivial ↵Anders Carlsson2009-09-011-0/+22
| | | | | | fields just fine now. llvm-svn: 80701
* Add test case from <rdar://problem/7184450>.Ted Kremenek2009-09-011-0/+69
| | | | llvm-svn: 80700
* Implement proper substitution for OverloadedFunctionDecls, but substituting ↵Douglas Gregor2009-09-011-0/+18
| | | | | | each of the functions in the overload set llvm-svn: 80692
* Fixed a property getter ir-gen crash.Fariborz Jahanian2009-09-011-0/+21
| | | | llvm-svn: 80681
* Fix a crasher involving template instantiation of non-dependentDouglas Gregor2009-09-011-0/+14
| | | | | | | expressions making use of an overloaded operator. Thanks for the test case, Anders! llvm-svn: 80679
* Add driver support for -emit-ast and AST compilation steps.Daniel Dunbar2009-09-011-0/+22
| | | | | | - <rdar://problem/7185031> Add 'clang' option '-emit-ast' llvm-svn: 80678
* Move C++ test over to CodeGenCXX, since it requires CodeGen to reproduceDouglas Gregor2009-09-011-0/+0
| | | | llvm-svn: 80672
* Don't assume that a base is always a RecordType, it can also be a ↵Anders Carlsson2009-09-011-4/+2
| | | | | | TemplateSpecializationType. Also, make sure to get the instantiated union member. llvm-svn: 80662
* Handle member initializers that point to fields in anonymous structs.Anders Carlsson2009-09-011-0/+12
| | | | llvm-svn: 80659
* Don't assert when instantiating member references to fields in anonymous ↵Anders Carlsson2009-09-011-0/+13
| | | | | | structs. llvm-svn: 80657
* PR4836, part 2: CodeGen for __builtin_isnan.Eli Friedman2009-09-011-0/+2
| | | | llvm-svn: 80655
* Preliminary AST representation and semantic analysis forDouglas Gregor2009-09-011-1/+1
| | | | | | | | | explicitly-specified template argument lists in member reference expressions, e.g., x->f<int>() llvm-svn: 80646
* Force triple for this test (non-fragile ABI is default on x86_64-apple-darwin9).Daniel Dunbar2009-09-011-1/+1
| | | | llvm-svn: 80645
* Fix bug 4784 and allow friend declarations to properly extendJohn McCall2009-08-311-0/+37
| | | | | | existing declaration chains. llvm-svn: 80636
* Add parsing for references to member function templates with explicitDouglas Gregor2009-08-311-0/+6
| | | | | | | | template argument lists, e.g., x.f<int>(). Semantic analysis will be a separate commit. llvm-svn: 80624
* PR4836, part 1: add Sema support for __builtin_isnan and friends; they Eli Friedman2009-08-311-0/+12
| | | | | | | are apparently used by Solaris libc despite the fact that clang claims to be compatible with gcc 4.2, which doesn't support them. llvm-svn: 80610
* Implement template instantiation for member operator access.Douglas Gregor2009-08-311-0/+16
| | | | llvm-svn: 80609
* Support explicit C++ member operator syntax, from James Porter!Douglas Gregor2009-08-312-0/+50
| | | | llvm-svn: 80608
* Re-implemented generation of objc_memmove_collectableFariborz Jahanian2009-08-311-1/+5
| | | | | | API for copying GC'able aggregates (Next runtime only). llvm-svn: 80607
* Added test cases for presence and absence of ↵David Chisnall2009-08-312-0/+16
| | | | | | __has_feature(objc_nonfragile_abi) with and without -fobjc-nonfragile-abi. llvm-svn: 80593
* Updated GNU runtime non-fragile ABI.David Chisnall2009-08-311-1/+3
| | | | | | | Added -fconstant-string-class= option. Added __has_feature() test for non-fragile ABI. llvm-svn: 80591
* More missing member goodness.Anders Carlsson2009-08-301-0/+10
| | | | llvm-svn: 80491
* Improve missing error messages as suggested by Doug.Anders Carlsson2009-08-301-9/+9
| | | | llvm-svn: 80489
OpenPOWER on IntegriCloud