summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/overloaded-operator-decl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't crash on calling static member overloaded operator, PR14120Nico Weber2012-11-091-0/+10
| | | | | | Patch from Brian Brooks! llvm-svn: 167604
* Diagnose attempts to declare a non-static data member with aDouglas Gregor2011-10-091-0/+5
| | | | | | non-identifier name. Fixes PR10839. llvm-svn: 141513
* A function declarator with a non-identifier name in an anonymous classDouglas Gregor2010-02-051-0/+6
| | | | | | is a constructor for that class, right? Fixes PR6238. llvm-svn: 95367
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Fix a long standard problem with clang retaining "too much" sugar Chris Lattner2009-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | information about types. We often print diagnostics where we say "foo_t" is bad, but the user doesn't know how foo_t is declared (because it is a typedef). Fix this by expanding sugar when present in a diagnostic (and not one of a few special cases, like vectors). Before: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' and 'typeof(F)') MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ After: t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float')) MAX(P, F); ^~~~~~~~~ t.m:1:78: note: instantiated from: #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; }) ^ llvm-svn: 65081
* Don't print canonical types in overloading-related diagnosticsDouglas Gregor2008-11-211-1/+1
| | | | llvm-svn: 59789
* Extend DeclarationName to support C++ overloaded operators, e.g.,Douglas Gregor2008-11-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | operator+, directly, using the same mechanism as all other special names. Removed the "special" identifiers for the overloaded operators from the identifier table and IdentifierInfo data structure. IdentifierInfo is back to representing only real identifiers. Added a new Action, ActOnOperatorFunctionIdExpr, that builds an expression from an parsed operator-function-id (e.g., "operator +"). ActOnIdentifierExpr used to do this job, but operator-function-ids are no longer represented by IdentifierInfo's. Extended Declarator to store overloaded operator names. Sema::GetNameForDeclarator now knows how to turn the operator name into a DeclarationName for the overloaded operator. Except for (perhaps) consolidating the functionality of ActOnIdentifier, ActOnOperatorFunctionIdExpr, and ActOnConversionFunctionExpr into a common routine that builds an appropriate DeclRefExpr by looking up a DeclarationName, all of the work on normalizing declaration names should be complete with this commit. llvm-svn: 59526
* Eliminate all of the placeholder identifiers used for constructors,Douglas Gregor2008-11-171-1/+4
| | | | | | | | | 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
* Some cleanups for C++ operator overloadingDouglas Gregor2008-11-171-6/+6
| | | | llvm-svn: 59443
* Simplify error messages for two-parameter overloaded increment/decrement ↵Douglas Gregor2008-11-171-1/+1
| | | | | | operators llvm-svn: 59442
* Parsing, ASTs, and semantic analysis for the declaration of overloadedDouglas Gregor2008-11-061-0/+37
operators in C++. Overloaded operators can be called directly via their operator-function-ids, e.g., "operator+(foo, bar)", but we don't yet implement the semantics of operator overloading to handle, e.g., "foo + bar". llvm-svn: 58817
OpenPOWER on IntegriCloud