diff options
author | Alexis Hunt <alercah@gmail.com> | 2010-08-29 21:26:48 +0000 |
---|---|---|
committer | Alexis Hunt <alercah@gmail.com> | 2010-08-29 21:26:48 +0000 |
commit | 79eb5469e04aa8906262619d1f7a3a71ba5dbd94 (patch) | |
tree | 6c9a4252f73fd27626204a4de22602dc8802d849 /clang/lib/Parse/ParseStmt.cpp | |
parent | c843fca2fde772c85010123556d3e3abeb75b9ab (diff) | |
download | bcm5719-llvm-79eb5469e04aa8906262619d1f7a3a71ba5dbd94.tar.gz bcm5719-llvm-79eb5469e04aa8906262619d1f7a3a71ba5dbd94.zip |
Implement C++0x user-defined string literals.
The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.
llvm-svn: 112458
Diffstat (limited to 'clang/lib/Parse/ParseStmt.cpp')
-rw-r--r-- | clang/lib/Parse/ParseStmt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp index af927285a49..94b8c3baac7 100644 --- a/clang/lib/Parse/ParseStmt.cpp +++ b/clang/lib/Parse/ParseStmt.cpp @@ -1244,11 +1244,12 @@ StmtResult Parser::FuzzyParseMicrosoftAsmStatement() { Tok.isNot(tok::eof)); } Token t; + t.startToken(); t.setKind(tok::string_literal); t.setLiteralData("\"/*FIXME: not done*/\""); t.clearFlag(Token::NeedsCleaning); t.setLength(21); - ExprResult AsmString(Actions.ActOnStringLiteral(&t, 1)); + ExprResult AsmString(Actions.ActOnStringLiteral(getCurScope(), &t, 1)); ExprVector Constraints(Actions); ExprVector Exprs(Actions); ExprVector Clobbers(Actions); |