diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-03 14:20:18 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2011-03-03 14:20:18 +0000 |
commit | 21e006e51a7f9889f55f5bc7b3ca8b50d17571ec (patch) | |
tree | 7ee0c0ee73a22c0a3dd56069aaa452bdce20767e /include/clang/AST/Decl.h | |
parent | 67714230a191bc3c01f33378f34f34ef377991a6 (diff) |
Fixed source range for FileScopeAsmDecl. Others source range fixes will follow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126939 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Decl.h')
-rw-r--r-- | include/clang/AST/Decl.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 31cee24df9..686ff23062 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -2519,11 +2519,21 @@ private: class FileScopeAsmDecl : public Decl { StringLiteral *AsmString; - FileScopeAsmDecl(DeclContext *DC, SourceLocation L, StringLiteral *asmstring) - : Decl(FileScopeAsm, DC, L), AsmString(asmstring) {} + SourceLocation RParenLoc; + FileScopeAsmDecl(DeclContext *DC, StringLiteral *asmstring, + SourceLocation StartL, SourceLocation EndL) + : Decl(FileScopeAsm, DC, StartL), AsmString(asmstring), RParenLoc(EndL) {} public: static FileScopeAsmDecl *Create(ASTContext &C, DeclContext *DC, - SourceLocation L, StringLiteral *Str); + StringLiteral *Str, SourceLocation AsmLoc, + SourceLocation RParenLoc); + + SourceLocation getAsmLoc() const { return getLocation(); } + SourceLocation getRParenLoc() const { return RParenLoc; } + void setRParenLoc(SourceLocation L) { RParenLoc = L; } + SourceRange getSourceRange() const { + return SourceRange(getAsmLoc(), getRParenLoc()); + } const StringLiteral *getAsmString() const { return AsmString; } StringLiteral *getAsmString() { return AsmString; } |