aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/AST/CommentLexer.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-01-22 21:31:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-01-22 21:31:48 +0000
commita7dea1671b87c07d2d266f836bfa8b58efc7c134 (patch)
treeff67344b3b18fc14e0cec322849afb4e3b94ea56 /contrib/llvm-project/clang/lib/AST/CommentLexer.cpp
parent5c713029ff7939f90b6f96df914953e758855a7f (diff)
parent519fc96c475680de2cc49e7811dbbfadb912cbcc (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/clang/lib/AST/CommentLexer.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/AST/CommentLexer.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/contrib/llvm-project/clang/lib/AST/CommentLexer.cpp b/contrib/llvm-project/clang/lib/AST/CommentLexer.cpp
index 19485f6018c0..c1ea3eab075e 100644
--- a/contrib/llvm-project/clang/lib/AST/CommentLexer.cpp
+++ b/contrib/llvm-project/clang/lib/AST/CommentLexer.cpp
@@ -850,17 +850,14 @@ again:
}
StringRef Lexer::getSpelling(const Token &Tok,
- const SourceManager &SourceMgr,
- bool *Invalid) const {
+ const SourceManager &SourceMgr) const {
SourceLocation Loc = Tok.getLocation();
std::pair<FileID, unsigned> LocInfo = SourceMgr.getDecomposedLoc(Loc);
bool InvalidTemp = false;
StringRef File = SourceMgr.getBufferData(LocInfo.first, &InvalidTemp);
- if (InvalidTemp) {
- *Invalid = true;
+ if (InvalidTemp)
return StringRef();
- }
const char *Begin = File.data() + LocInfo.second;
return StringRef(Begin, Tok.getLength());