From ce03732ec85296f942ee6644596056ce5e577f89 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 5 May 2017 22:34:07 +0000 Subject: Permit keywords in module names in #pragma clang module *. This is necessary to be able to build a libc++ module from preprocessed source (due to the submodule std.new). llvm-svn: 302312 --- clang/lib/Lex/Pragma.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Lex/Pragma.cpp') diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp index 51da2baac9e..99d56182c1b 100644 --- a/clang/lib/Lex/Pragma.cpp +++ b/clang/lib/Lex/Pragma.cpp @@ -1307,7 +1307,7 @@ static bool LexModuleName( &ModuleName) { while (true) { PP.LexUnexpandedToken(Tok); - if (Tok.isNot(tok::identifier)) { + if (Tok.isAnnotation() || !Tok.getIdentifierInfo()) { PP.Diag(Tok.getLocation(), diag::err_pp_expected_module_name) << ModuleName.empty(); return true; -- cgit v1.2.3