diff options
author | Francois Pichet <pichet2000@gmail.com> | 2012-04-07 23:09:23 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2012-04-07 23:09:23 +0000 |
commit | b0afd5df3c427c329f6c5e00fe264c5bada3bf36 (patch) | |
tree | 839ff13c6195beba21911d5515a76bd3445f7c02 /lib/Lex/Lexer.cpp | |
parent | 073a780f7cb863cd382d1c966ef11d05c6fad075 (diff) |
ext_reserved_user_defined_literal must not default to Error in MicrosoftMode. Hence create ext_ms_reserved_user_defined_literal that doesn't default to Error; otherwise MSVC headers won't parse.
Fixes PR12383.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r-- | lib/Lex/Lexer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp index a49ab048f6..c817e3f105 100644 --- a/lib/Lex/Lexer.cpp +++ b/lib/Lex/Lexer.cpp @@ -1597,7 +1597,9 @@ const char *Lexer::LexUDSuffix(Token &Result, const char *CurPtr) { // them. if (C != '_') { if (!isLexingRawMode()) - Diag(CurPtr, diag::ext_reserved_user_defined_literal) + Diag(CurPtr, getLangOpts().MicrosoftMode ? + diag::ext_ms_reserved_user_defined_literal : + diag::ext_reserved_user_defined_literal) << FixItHint::CreateInsertion(getSourceLocation(CurPtr), " "); return CurPtr; } |