summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-casting.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Warn when a reference is bound to an empty l-value (dereferenced null pointer).Nick Lewycky2016-05-141-1/+1
| | | | llvm-svn: 269572
* [Lit Test] Updated 20 Lit tests to be C++11 compatible.Charles Li2015-12-101-10/+49
| | | | | | | | This is the 5th Lit test patch. Expanded expected diagnostics to vary by C++ dialect. Expanded RUN line to: default, C++98/03 and C++11. llvm-svn: 255196
* PR19751: (T())++ is not a cast-expression.Richard Smith2014-07-151-0/+6
| | | | llvm-svn: 213022
* PR19748: Make sure we don't lose colon protection after the parenthesized ↵Richard Smith2014-05-151-0/+11
| | | | | | type-id in a cast-expression. llvm-svn: 208843
* Add quotation marks to template names in diagnostics.David Blaikie2013-03-051-3/+3
| | | | llvm-svn: 176474
* PR13619: Make sure we're not at EOF before looking at NextToken().Richard Smith2012-08-201-0/+3
| | | | llvm-svn: 162212
* PR41111, PR5925, PR13210: Teach tentative parsing to annotate identifiers andRichard Smith2012-08-181-5/+4
| | | | | | | | | | | | | | | | | nested names as id-expressions, using the annot_primary_expr annotation, where possible. This removes some redundant lookups, and also allows us to typo-correct within tentative parsing, and to carry on disambiguating past an identifier which we can determine will fail lookup as both a type and as a non-type, allowing us to disambiguate more declarations (and thus offer improved error recovery for such cases). This also introduces to the parser the notion of a tentatively-declared name, which is an identifier which we *might* have seen a declaration for in a tentative parse (but only if we end up disambiguating the tokens as a declaration). This is necessary to correctly disambiguate cases where a variable is used within its own initializer. llvm-svn: 162159
* Fix a problem in digraph handling where "[:" might be treated as "<::" andRichard Trieu2011-09-201-1/+8
| | | | | | | erronously trigger the digraph correction fix-it. Include a new test to catch this in the future. llvm-svn: 140175
* Changes to the name lookup have caused a regression in the digraph fix-it hint.Richard Trieu2011-09-191-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For instance: template <class T> void E() {}; class F {}; void test() { ::E<::F>(); E<::F>(); } Gives the following error messages: error: found '<::' after a template name which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'? ::E<::F>(); ^~~ < :: error: expected expression E<::F>(); ^ error: expected ']' note: to match this '[' E<::F>(); This patch adds the digraph fix-it check right before the name lookup, moves the shared checking code to a new function, and adds new tests to catch future regressions. llvm-svn: 140039
* Detect when the string "<::" is found in code after a cast or template name ↵Richard Smith2011-04-141-2/+32
| | | | | | | | and is interpreted as "[:" because of the digraph "<:". When found, give an error with a fix-it to add whitespace between the "<" and "::". Patch by Richard Trieu! Plus a small tweak from me to deal with one of the tokens coming from a macro. llvm-svn: 129540
* Fix a tentative-parse error with unqualified template ids in cast expressions.John McCall2010-04-301-3/+6
| | | | | | Also resolve a long-working FIXME in the test case I modified. llvm-svn: 102688
* 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-2/+2
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* C++ casts, (static_cast. dynamic_cast, etc.) can have postfix-expression pieces.Argyrios Kyrtzidis2008-08-161-0/+5
| | | | llvm-svn: 54850
* update testsChris Lattner2007-07-121-1/+0
| | | | llvm-svn: 39786
* This testcase bus errors because semantics analysis of these operators isn't ↵Chris Lattner2007-06-081-0/+1
| | | | | | implemented. llvm-svn: 39612
* add a testcase for c++ casting operators, by BillChris Lattner2007-01-231-0/+31
llvm-svn: 39285
OpenPOWER on IntegriCloud