[cfe-commits] r127237 - in /cfe/trunk: include/clang/AST/Decl.h lib/AST/Decl.cpp
Abramo Bagnara
abramo.bagnara at gmail.com
Tue Mar 8 03:07:12 PST 2011
Author: abramo
Date: Tue Mar 8 05:07:11 2011
New Revision: 127237
URL: http://llvm.org/viewvc/llvm-project?rev=127237&view=rev
Log:
Fixed bitfields source range.
Modified:
cfe/trunk/include/clang/AST/Decl.h
cfe/trunk/lib/AST/Decl.cpp
Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=127237&r1=127236&r2=127237&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Tue Mar 8 05:07:11 2011
@@ -1834,7 +1834,9 @@
RecordDecl *getParent() {
return cast<RecordDecl>(getDeclContext());
}
-
+
+ SourceRange getSourceRange() const;
+
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
static bool classof(const FieldDecl *D) { return true; }
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=127237&r1=127236&r2=127237&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Tue Mar 8 05:07:11 2011
@@ -1968,6 +1968,11 @@
return index;
}
+SourceRange FieldDecl::getSourceRange() const {
+ return SourceRange(getInnerLocStart(),
+ isBitField() ? BitWidth->getLocEnd() : getLocation());
+}
+
//===----------------------------------------------------------------------===//
// TagDecl Implementation
//===----------------------------------------------------------------------===//
More information about the cfe-commits
mailing list