the decl + initializer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71831
91177308-0d34-0410-b5e6-
96231b3b80d8
switch (S->getStmtClass()) {
default:
break;
+ case Stmt::DeclStmtClass: {
+ const DeclStmt *DS = cast<DeclStmt>(S);
+ if (DS->isSingleDecl()) {
+ // Should always be the case, but we'll be defensive.
+ return SourceRange(DS->getLocStart(),
+ DS->getSingleDecl()->getLocation());
+ }
+ break;
+ }
// FIXME: Provide better range information for different
// terminators.
case Stmt::IfStmtClass: