forked from OSchip/llvm-project
parent
8de11bab76
commit
ff371acaa4
|
@ -2197,8 +2197,8 @@ unsigned FieldDecl::getFieldIndex() const {
|
|||
}
|
||||
|
||||
SourceRange FieldDecl::getSourceRange() const {
|
||||
if (isBitField())
|
||||
return SourceRange(getInnerLocStart(), getBitWidth()->getLocEnd());
|
||||
if (const Expr *E = InitializerOrBitWidth.getPointer())
|
||||
return SourceRange(getInnerLocStart(), E->getLocEnd());
|
||||
return DeclaratorDecl::getSourceRange();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
struct S {
|
||||
int field = 2;
|
||||
};
|
||||
|
||||
// RUN: c-index-test -test-load-source all -std=c++0x %s | FileCheck %s
|
||||
// CHECK: 2:7: FieldDecl=field:2:7 (Definition) Extent=[2:3 - 2:16]
|
Loading…
Reference in New Issue