diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-01-07 01:21:02 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-01-07 01:21:02 +0000 |
commit | 4a2ef80d896c1bac38ce113ec19a8d509a619288 (patch) | |
tree | fb9610d322033e7b2525fe1d5136ce6651ecaf18 /include/clang/Basic/SourceLocation.h | |
parent | 2626a2ad844a762dfda50b861c46918924eb44aa (diff) |
Simplify. No behavior change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceLocation.h')
-rw-r--r-- | include/clang/Basic/SourceLocation.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h index cc7415ce56..edfdafdb03 100644 --- a/include/clang/Basic/SourceLocation.h +++ b/include/clang/Basic/SourceLocation.h @@ -227,20 +227,14 @@ class CharSourceRange { bool IsTokenRange; public: CharSourceRange() : IsTokenRange(false) {} - CharSourceRange(SourceRange R, bool ITR) : Range(R),IsTokenRange(ITR){} + CharSourceRange(SourceRange R, bool ITR) : Range(R), IsTokenRange(ITR) {} static CharSourceRange getTokenRange(SourceRange R) { - CharSourceRange Result; - Result.Range = R; - Result.IsTokenRange = true; - return Result; + return CharSourceRange(R, true); } static CharSourceRange getCharRange(SourceRange R) { - CharSourceRange Result; - Result.Range = R; - Result.IsTokenRange = false; - return Result; + return CharSourceRange(R, false); } static CharSourceRange getTokenRange(SourceLocation B, SourceLocation E) { |