diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-28 02:26:04 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-28 02:26:04 +0000 |
commit | b608b987718c6d841115464f79ab2d1820a63e17 (patch) | |
tree | 2c72e1dddc574cb24d3d9a3e9dde350ea5637be7 /lib/Serialization/ASTWriterStmt.cpp | |
parent | 70a21de5b4c6ca4883ed58093e71e7884d5218fb (diff) |
Give OpaqueValueExpr a source location, because its source location
might be queried in places where we absolutely require a valid
location (e.g., for template instantiation). Fixes some major
brokenness in the use of __is_convertible_to.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124465 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | lib/Serialization/ASTWriterStmt.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Serialization/ASTWriterStmt.cpp b/lib/Serialization/ASTWriterStmt.cpp index 3962439ac5..601de6d8f6 100644 --- a/lib/Serialization/ASTWriterStmt.cpp +++ b/lib/Serialization/ASTWriterStmt.cpp @@ -1332,6 +1332,7 @@ void ASTStmtWriter::VisitSubstNonTypeTemplateParmPackExpr( void ASTStmtWriter::VisitOpaqueValueExpr(OpaqueValueExpr *E) { VisitExpr(E); + Writer.AddSourceLocation(E->getLocation(), Record); Code = serialization::EXPR_OPAQUE_VALUE; } |