[PATCH] D11844: [Modules] More descriptive diagnostics for misplaced import directive

Serge Pavlov via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 10:48:49 PDT 2015


sepavloff updated this revision to Diff 31831.
sepavloff added a comment.

Fixed module boundary treatment.

This version must fix problems in the treatment of  annot_modulbegin and
annot_module_end. Error recover for the token annot_module_include found
in wrong context can be made as previously, just by ignoring it. To handle
token 'annot_module_end' parser bails out to upper level, where the module
end can be processed, it will complain on missing '}' etc. As for
'annot_module_start', now parser tries to recover by skipping all content
till matching 'annot_module_end'.

Also made changes according to reviewer's notes.


http://reviews.llvm.org/D11844

Files:
  include/clang/Basic/DiagnosticParseKinds.td
  include/clang/Parse/Parser.h
  include/clang/Sema/Sema.h
  lib/Parse/ParseDeclCXX.cpp
  lib/Parse/ParseStmt.cpp
  lib/Parse/Parser.cpp
  lib/Sema/SemaDecl.cpp
  test/Modules/auto-module-import.m
  test/Modules/malformed.cpp
  test/Modules/misplaced.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11844.31831.patch
Type: text/x-patch
Size: 8886 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150811/d92540da/attachment.bin>


More information about the cfe-commits mailing list