summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-member-initializers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Parse: use the EOF token method to lex inline method bodiesDavid Majnemer2015-01-131-2/+2
| | | | | | | | Mark the end of the method body with an EOF token, collect it once we expect to be done with method body parsing. No functionality change intended. llvm-svn: 225765
* Parse: It's cleaner to handle cxx_defaultarg_end in SkipUntil directlyDavid Majnemer2015-01-121-2/+2
| | | | llvm-svn: 225616
* Don't crash on surprising tokens in default parameter template lists.Nico Weber2014-12-281-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | Fixes this snippet from SLi's afl fuzzer output: class { i (x = <, enum This parsed i as a function, x as a paramter, and the stuff after < as a template list. This then called TryConsumeDeclarationSpecifier() which called TryAnnotateCXXScopeToken() without checking the preconditions of this function. Check them before calling, like all other callers of TryAnnotateCXXScopeToken() do. A more readable reproducer that causes the same crash is class { void i(int x = MyTemplateClass<int, union int>::foo()); }; The reduced version used an eof token as surprising token, but kw_int works just as well to repro and is easier to insert into a test file. llvm-svn: 224906
* PR16480: Reimplement token-caching for constructor initializer lists. ThisRichard Smith2013-07-041-3/+69
| | | | | | | | | | | | | | | previously didn't work if a mem-initializer-id had a template argument which contained parentheses or braces. We now implement a simple rule: just look for a ') {' or '} {' that is not nested. The '{' is assumed to start the function-body. There are still two cases which we misparse, where the ') {' comes from a compound literal or from a lambda. The former case is not valid C++, and the latter will probably not be valid C++ once DR1607 is resolved, so these seem to be of low value, and we do not regress on them with this change. EDG and g++ also misparse both of these cases. llvm-svn: 185598
* Fix a bug in the token caching for inline constructors in C++11, and improve ↵Sebastian Redl2011-09-301-0/+5
| | | | | | error recovery in both dialects. This should fix the GCC test suite failures as well. llvm-svn: 140847
* 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
* Add RUN line.Daniel Dunbar2009-09-121-0/+2
| | | | llvm-svn: 81654
* Add a test for PR3733.Anders Carlsson2009-09-121-0/+8
llvm-svn: 81622
OpenPOWER on IntegriCloud