aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-default-args.cpp
AgeCommit message (Collapse)Author
2010-08-09Change warning about incomplete parsing of C++ default arg to error and ↵Argyrios Kyrtzidis
provide a test case; thanks Doug! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110603 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06Introduce a new token kind 'cxx_defaultarg_end' to mark the end of C++ ↵Argyrios Kyrtzidis
default arguments that were part of lexed method declarations. This avoid interference with tokens coming after the point where the default arg tokens were 'injected', e.g. for typedef struct Inst { void m(int x=0); } *InstPtr; when parsing '0' the next token would be '*' and things would be messed up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110436 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30When "delayed parsing" C++ default arguments, if there is an error, there ↵Argyrios Kyrtzidis
may be tokens left in the token stream that will interfere (they will be parsed as if they are after the class' '}') and a crash will occur because the CachedTokens that holds them will be deleted while the lexer is still using them. Make sure that the tokens of default args are removed from the token stream. Fixes PR6647. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99939 91177308-0d34-0410-b5e6-96231b3b80d8