aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-21 16:27:07 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-21 16:27:07 +0000
commit2fcbceff97e065cff499e6cc563ca25c762bf547 (patch)
tree64c50fb9a99f245d107d261190dccd32a52de46d /lib/AST/Decl.cpp
parent55dc95b69846fde1c41aff7e2f3fcfed5d6fc5ab (diff)
Implement BlockDecl::getSourceRange(). The bogus source-range
information caused token-annotation to fail in funny ways. Fixes <rdar://problem/8595386>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122338 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index fe3dbebc1f..7a35c74873 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -2062,6 +2062,9 @@ unsigned BlockDecl::getNumParams() const {
return NumParams;
}
+SourceRange BlockDecl::getSourceRange() const {
+ return SourceRange(getLocation(), Body? Body->getLocEnd() : getLocation());
+}
//===----------------------------------------------------------------------===//
// Other Decl Allocation/Deallocation Method Implementations