[PATCH] D32081: Add support for editor placeholders to Clang's lexer
Ben Langmuir via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 14 11:27:42 PDT 2017
benlangmuir added a comment.
Rather than stick ranges into the diagnostic engine, I think it would be cleaner to have the identifier have a method like `isEditorPlaceholder()` that can be used to avoid situations like this in a principled way, or to customize behaviour for placeholders in the parser, etc. That's how we are handling it in Swift. Using an API on the placeholder is also better for handling errors that could be caused by the placeholder but not have it as the primary location.
What do you think?
================
Comment at: include/clang/Driver/Options.td:1473
+def fsuppress_editor_placeholder_error : Flag<["-"], "fsuppress-editor-placeholder-error">, Group<f_Group>,
+ Flags<[CC1Option]>,
----------------
How about -fallow-editor-placeholder? It's a little shorter, and not specific to a single error.
Repository:
rL LLVM
https://reviews.llvm.org/D32081
More information about the cfe-commits
mailing list