summaryrefslogtreecommitdiffstats
path: root/clang/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
commit70226dada0bd086b863ee8e5a62c1e68f1b865df (patch)
tree6a55417de6a2ef712eac420ab5fbf2a1704371b5 /clang/lib/AST/Decl.cpp
parent65586fea71effb9ccd302077916f672f8234ed88 (diff)
downloadbcm5719-llvm-70226dada0bd086b863ee8e5a62c1e68f1b865df.tar.gz
bcm5719-llvm-70226dada0bd086b863ee8e5a62c1e68f1b865df.zip
Implement BlockDecl::getSourceRange(). The bogus source-range
information caused token-annotation to fail in funny ways. Fixes <rdar://problem/8595386>. llvm-svn: 122338
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index fe3dbebc1f5..7a35c748737 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud