diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/AST/CommentLexer.h | 10 | ||||
-rw-r--r-- | include/clang/Basic/DiagnosticLexKinds.td | 6 |
2 files changed, 14 insertions, 2 deletions
diff --git a/include/clang/AST/CommentLexer.h b/include/clang/AST/CommentLexer.h index 4179f45e80..f152c778c9 100644 --- a/include/clang/AST/CommentLexer.h +++ b/include/clang/AST/CommentLexer.h @@ -15,6 +15,7 @@ #define LLVM_CLANG_AST_COMMENT_LEXER_H #include "clang/Basic/SourceManager.h" +#include "clang/Basic/Diagnostic.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" @@ -227,6 +228,8 @@ private: /// computed (for example, resolved decimal character references). llvm::BumpPtrAllocator &Allocator; + DiagnosticsEngine &Diags; + const CommandTraits &Traits; const char *const BufferStart; @@ -316,6 +319,10 @@ private: return FileLoc.getLocWithOffset(CharNo); } + DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID) { + return Diags.Report(Loc, DiagID); + } + /// Eat string matching regexp \code \s*\* \endcode. void skipLineStartingDecorations(); @@ -346,7 +353,8 @@ private: void lexHTMLEndTag(Token &T); public: - Lexer(llvm::BumpPtrAllocator &Allocator, const CommandTraits &Traits, + Lexer(llvm::BumpPtrAllocator &Allocator, DiagnosticsEngine &Diags, + const CommandTraits &Traits, SourceLocation FileLoc, const char *BufferStart, const char *BufferEnd); diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td index 548823f1f0..fb0ab3c1a4 100644 --- a/include/clang/Basic/DiagnosticLexKinds.td +++ b/include/clang/Basic/DiagnosticLexKinds.td @@ -27,6 +27,10 @@ def backslash_newline_space : Warning< "backslash and newline separated by space">, InGroup<DiagGroup<"backslash-newline-escape">>; +// comment parsing +def warn_unknown_comment_command_name : Warning< + "unknown command tag name">, InGroup<DiagGroup<"comment-command-tag">>; + // Digraphs. def warn_cxx98_compat_less_colon_colon : Warning< "'<::' is treated as digraph '<:' (aka '[') followed by ':' in C++98">, @@ -586,4 +590,4 @@ def warn_uncovered_module_header : Warning< def err_expected_id_building_module : Error< "expected a module name in '__building_module' expression">; -} +}
\ No newline at end of file |