summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2012-04-07 23:09:23 +0000
committerFrancois Pichet <pichet2000@gmail.com>2012-04-07 23:09:23 +0000
commit7ebc4c191058805c847730f9996c70d3ef1d8cb4 (patch)
tree165007125dfdf43f6f15eb7cd9f533aeeefa828c /clang/lib/Lex/Lexer.cpp
parentd024cef233a8f542d2fef4dfb82bd3a97a3a6b83 (diff)
downloadbcm5719-llvm-7ebc4c191058805c847730f9996c70d3ef1d8cb4.tar.gz
bcm5719-llvm-7ebc4c191058805c847730f9996c70d3ef1d8cb4.zip
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. llvm-svn: 154273
Diffstat (limited to 'clang/lib/Lex/Lexer.cpp')
-rw-r--r--clang/lib/Lex/Lexer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index a49ab048f68..c817e3f1056 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud