summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/conversion-function.cpp
Commit message (Collapse)AuthorAgeFilesLines
* change a couple more c++ sema methods to be based on isinvalid bits.Chris Lattner2009-04-251-2/+5
| | | | llvm-svn: 70022
* Fix a crash bug when comparing overload quality of conversion operators with ↵Sebastian Redl2009-04-161-0/+11
| | | | | | | | | | | conversion constructors. Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself. Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere. Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression. And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness. llvm-svn: 69299
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Fix our semantic analysis ofDouglas Gregor2009-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | unqualified-id '(' in C++. The unqualified-id might not refer to any declaration in our current scope, but declarations by that name might be found via argument-dependent lookup. We now do so properly. As part of this change, CXXDependentNameExpr, which was previously designed to express the unqualified-id in the above constructor within templates, has become UnresolvedFunctionNameExpr, which does effectively the same thing but will work for both templates and non-templates. Additionally, we cope with all unqualified-ids, since ADL also applies in cases like operator+(x, y) llvm-svn: 63733
* Make all the 'redefinition' diagnostics more consistent, and make the Chris Lattner2008-11-231-2/+2
| | | | | | "previously defined here" diagnostics all notes. llvm-svn: 59920
* As threatened previously: consolidate name lookup and the creation ofDouglas Gregor2008-11-181-1/+1
| | | | | | | | | | | | | | DeclRefExprs and BlockDeclRefExprs into a single function Sema::ActOnDeclarationNameExpr, eliminating a bunch of duplicate lookup-name-and-check-the-result code. Note that we still have the three parser entry points for identifiers, operator-function-ids, and conversion-function-ids, since the parser doesn't (and shouldn't) know about DeclarationNames. This is a Good Thing (TM), and there will be more entrypoints coming (e.g., for C++ pseudo-destructor expressions). llvm-svn: 59527
* Eliminate all of the placeholder identifiers used for constructors,Douglas Gregor2008-11-171-0/+2
| | | | | | | | | destructors, and conversion functions. The placeholders were used to work around the fact that the parser and some of Sema really wanted declarators to have simple identifiers; now, the code that deals with declarators will use DeclarationNames. llvm-svn: 59469
* Updated IdentifierResolver to deal with DeclarationNames. The names ofDouglas Gregor2008-11-171-0/+8
| | | | | | | | | | | | | | | | | | | | | C++ constructors, destructors, and conversion functions now have a FETokenInfo field that IdentifierResolver can access, so that these special names are handled just like ordinary identifiers. A few other Sema routines now use DeclarationNames instead of IdentifierInfo*'s. To validate this design, this code also implements parsing and semantic analysis for id-expressions that name conversion functions, e.g., return operator bool(); The new parser action ActOnConversionFunctionExpr takes the result of parsing "operator type-id" and turning it into an expression, using the IdentifierResolver with the DeclarationName of the conversion function. ActOnDeclarator pushes those conversion function names into scope so that the IdentifierResolver can find them, of course. llvm-svn: 59462
* Parsing, ASTs, and semantic analysis for the declaration of conversionDouglas Gregor2008-11-071-0/+42
functions in C++, e.g., struct X { operator bool() const; }; Note that these conversions don't actually do anything, since we don't yet have the ability to use them for implicit or explicit conversions. llvm-svn: 58860
OpenPOWER on IntegriCloud