aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-05-03 23:15:20 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-05-03 23:15:20 +0000
commitad6fd9f93ce0d328397e8d57ef7117ced24fc8e2 (patch)
treeff65aa9339d215a60b3a59212e7795cc6fcec093 /include/clang/AST
parentcc2b653c319599f502425d2c3de29865d47bb9e4 (diff)
[Doc parsing] Provide diagnostics for unknown documentation
commands. // rdar://12381408 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST')
-rw-r--r--include/clang/AST/CommentLexer.h10
1 files changed, 9 insertions, 1 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);