diff options
Diffstat (limited to 'clang/lib/Basic/SourceLocation.cpp')
-rw-r--r-- | clang/lib/Basic/SourceLocation.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp index fde1399..6f64120 100644 --- a/clang/lib/Basic/SourceLocation.cpp +++ b/clang/lib/Basic/SourceLocation.cpp @@ -42,6 +42,14 @@ void PrettyStackTraceLoc::print(raw_ostream &OS) const { // SourceLocation //===----------------------------------------------------------------------===// +static_assert(std::is_trivially_destructible<SourceLocation>::value, + "SourceLocation must be trivially destructible because it is " + "used in unions"); + +static_assert(std::is_trivially_destructible<SourceRange>::value, + "SourceRange must be trivially destructible because it is " + "used in unions"); + unsigned SourceLocation::getHashValue() const { return llvm::DenseMapInfo<unsigned>::getHashValue(ID); } |