Introduce Decl::getSourceRange() which, like Stmt::getSourceRange(), represents the range that the declaration covers.

Add initial support for NamespaceDecl, VarDecl, and FunctionDecl:
-NamespaceDecl range is from name to '}'
-VarDecl is from name to possible init expression
-FunctionDecl is from name to last parameter name or to end of its function body.

llvm-svn: 73821
3 files changed
tree: 7dddbf19e8681c42667777d46d4ccd55d0099a56
  1. clang/
  2. compiler-rt/
  3. llvm/