[PATCH] D11844: [Modules] More descriptive diagnostics for misplaced import directive
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 18 11:35:22 PDT 2015
rsmith accepted this revision.
rsmith added a reviewer: rsmith.
================
Comment at: include/clang/Parse/Parser.h:2560-2562
@@ +2559,5 @@
+ bool tryParseMisplacedModuleImport() {
+ tok::TokenKind Kind = Tok.getKind();
+ if (Kind == tok::annot_module_begin || Kind == tok::annot_module_end ||
+ Kind == tok::annot_module_include)
+ return parseMisplacedModuleImport();
----------------
Use `Tok.isOneOf` here.
http://reviews.llvm.org/D11844
More information about the cfe-commits
mailing list