]> granicus.if.org Git - clang/commit
[PCH] Make sure that the SourceExpr of a OpaqueValueExpr is always initialized
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 3 Dec 2011 03:49:52 +0000 (03:49 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 3 Dec 2011 03:49:52 +0000 (03:49 +0000)
commit8bc27822fc867d43399d4474bccbb58b7b7c7ad7
treec2f70b8b1461eb509604f1538c98e4ec336973de
parentd977e6b0eb4c9b57b0aad6e9e0be39cc67b3a8c7
[PCH] Make sure that the SourceExpr of a OpaqueValueExpr is always initialized
when deserialized, fixing random crashes in libclang.

Also simplifies how OpaqueValueExprs are [de]serialized.
The reader/writer automatically retains pointer equality of sub-statements (when a
statement node is referenced in multiple nodes), so no need to manually handle it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145752 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Serialization/ASTReader.h
include/clang/Serialization/ASTWriter.h
lib/Serialization/ASTReaderStmt.cpp
lib/Serialization/ASTWriterStmt.cpp
test/Index/pch-opaque-value.cpp [new file with mode: 0644]