]> granicus.if.org Git - clang/commit
User-defined literals: reject string and character UDLs in all places where the
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 6 Mar 2012 03:21:47 +0000 (03:21 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 6 Mar 2012 03:21:47 +0000 (03:21 +0000)
commit99831e4677a7e2e051af636221694d60ba31fcdb
tree4684bde38a7659db0c97673dcab98cffce576f9b
parentc1b0f7fa9b755ab59129ae85187d0d4f91379995
User-defined literals: reject string and character UDLs in all places where the
grammar requires a string-literal and not a user-defined-string-literal. The
two constructs are still represented by the same TokenKind, in order to prevent
a combinatorial explosion of different kinds of token. A flag on Token tracks
whether a ud-suffix is present, in order to prevent clients from needing to look
at the token's spelling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152098 91177308-0d34-0410-b5e6-96231b3b80d8
24 files changed:
include/clang/Basic/DiagnosticCommonKinds.td
include/clang/Basic/DiagnosticLexKinds.td
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Lex/Token.h
include/clang/Parse/Parser.h
lib/Lex/Lexer.cpp
lib/Lex/ModuleMap.cpp
lib/Lex/PPDirectives.cpp
lib/Lex/PPExpressions.cpp
lib/Lex/PPMacroExpansion.cpp
lib/Lex/Pragma.cpp
lib/Lex/TokenConcatenation.cpp
lib/Parse/ParseDeclCXX.cpp
lib/Parse/ParseExpr.cpp
lib/Parse/ParseExprCXX.cpp
lib/Parse/ParseObjc.cpp
lib/Parse/ParseStmt.cpp
lib/Parse/Parser.cpp
lib/Rewrite/HTMLRewrite.cpp
test/CXX/over/over.oper/over.literal/p8.cpp
test/Lexer/token-concat.cpp [new file with mode: 0644]
test/Parser/asm.cpp [new file with mode: 0644]
test/Parser/cxx11-user-defined-literals.cpp [new file with mode: 0644]
test/Parser/objcxx11-user-defined-literal.mm [new file with mode: 0644]