summaryrefslogtreecommitdiff
path: root/include/clang/AST/Attr.h
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-09-13 16:05:53 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-09-13 16:05:53 +0000
commitffcc3105d223899740e79f3f8199f3881df4d1de (patch)
tree2595e260442f53814cca58ed8db80c1658abc9a7 /include/clang/AST/Attr.h
parentfe522c20516878927e4f90a2aeafeeba2ea31c71 (diff)
downloadclang-ffcc3105d223899740e79f3f8199f3881df4d1de.tar.gz
Record the full source range of an attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Attr.h')
-rw-r--r--include/clang/AST/Attr.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/clang/AST/Attr.h b/include/clang/AST/Attr.h
index 17f0218a8b..7d57cd883f 100644
--- a/include/clang/AST/Attr.h
+++ b/include/clang/AST/Attr.h
@@ -57,7 +57,7 @@ namespace clang {
/// Attr - This represents one attribute.
class Attr {
private:
- SourceLocation Loc;
+ SourceRange Range;
unsigned AttrKind : 16;
protected:
@@ -85,8 +85,8 @@ public:
}
protected:
- Attr(attr::Kind AK, SourceLocation L)
- : Loc(L), AttrKind(AK), Inherited(false) {}
+ Attr(attr::Kind AK, SourceRange R)
+ : Range(R), AttrKind(AK), Inherited(false) {}
public:
@@ -94,8 +94,9 @@ public:
return static_cast<attr::Kind>(AttrKind);
}
- SourceLocation getLocation() const { return Loc; }
- void setLocation(SourceLocation L) { Loc = L; }
+ SourceLocation getLocation() const { return Range.getBegin(); }
+ SourceRange getRange() const { return Range; }
+ void setRange(SourceRange R) { Range = R; }
bool isInherited() const { return Inherited; }