[PATCH] D11844: [Modules] More descriptive diagnostics for misplaced import directive
Serge Pavlov via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 13 12:06:53 PDT 2015
sepavloff updated this revision to Diff 32085.
sepavloff added a comment.
Thanks to all for fruitful discussion!
The new version tries to addresses review notes. It differs from the previous version in:
- Method tryParseMisplacedModuleImport now depends only on current token and is used in loop condition. Probably a better name for it is something like skipMisplacedModuleImport.
- BalancedDelimiterTracker is updated so that it prints different message if module ended before closing bracket has been seen.
- If annot_module_begin is seen where it must not, recovery depends on context. Inside a namespace the module is imported as a recovery, a note suggesting to move import to top level is issued. Inside a class of a compound statement fatal error issued, there is no way to handle this case at upper level.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12049 bytes
Desc: not available
More information about the cfe-commits