aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-06-21 21:02:45 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-06-21 21:02:45 +0000
commit9530a8bf275f91f95147e1fb205dc85bea1ae45c (patch)
tree49e0d3b66a72797987c26c9ee44f9048ff91b4f9 /lib
parent24388333364be0ce9d04a07fa9895baeeff78bda (diff)
VC9 does not like heterogenous compare function objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158936 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/ASTContext.cpp2
-rw-r--r--lib/AST/RawCommentList.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 9f8578bafe..23751a56f2 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -81,7 +81,7 @@ const RawComment *ASTContext::getRawCommentForDeclNoCache(const Decl *D) const {
ArrayRef<RawComment>::iterator Comment
= std::lower_bound(RawComments.begin(),
RawComments.end(),
- SourceRange(DeclLoc),
+ RawComment(SourceMgr, SourceRange(DeclLoc)),
BeforeThanCompare<RawComment>(SourceMgr));
// Decompose the location for the declaration and find the beginning of the
diff --git a/lib/AST/RawCommentList.cpp b/lib/AST/RawCommentList.cpp
index 1baa9b87eb..f32e628caa 100644
--- a/lib/AST/RawCommentList.cpp
+++ b/lib/AST/RawCommentList.cpp
@@ -60,7 +60,7 @@ RawComment::RawComment(const SourceManager &SourceMgr, SourceRange SR,
Range(SR), RawTextValid(false), IsAlmostTrailingComment(false),
BeginLineValid(false), EndLineValid(false) {
// Extract raw comment text, if possible.
- if (getRawText(SourceMgr).empty()) {
+ if (SR.getBegin() == SR.getEnd() || getRawText(SourceMgr).empty()) {
Kind = CK_Invalid;
return;
}