diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-14 03:17:17 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-14 03:17:17 +0000 |
commit | f602c8b6ce1a269c0bf8b3f049e923f4ea5c18e2 (patch) | |
tree | 41762eecd8fc82f1989adf2ddf3687cc85ea5c00 /lib/AST/Decl.cpp | |
parent | 61b5f3e12c0ab5dd2e8b98bb827855420bb9869b (diff) |
Add the SourceLocation for the right brace in TagDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75590 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 40aa030ab3..fe9885ef26 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -658,6 +658,11 @@ void FunctionDecl::setExplicitSpecialization(bool ES) { // TagDecl Implementation //===----------------------------------------------------------------------===// +SourceRange TagDecl::getSourceRange() const { + SourceLocation E = RBraceLoc.isValid() ? RBraceLoc : getLocation(); + return SourceRange(getLocation(), E); +} + void TagDecl::startDefinition() { TagType *TagT = const_cast<TagType *>(TypeForDecl->getAsTagType()); TagT->decl.setPointer(this); |