aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBruno Ricci <riccibrun@gmail.com>2020-06-21 13:02:48 +0100
committerBruno Ricci <riccibrun@gmail.com>2020-06-21 13:59:10 +0100
commite7ce0528202306d8b751f132d9d3a6519ce4e688 (patch)
treeca931bf6339f82ab32e858ce74af87188faab3f3 /clang/lib/Frontend/CompilerInvocation.cpp
parentef3adbfc70bd593e14430c2db31c1426d3834fb4 (diff)
downloadllvm-e7ce0528202306d8b751f132d9d3a6519ce4e688.zip
llvm-e7ce0528202306d8b751f132d9d3a6519ce4e688.tar.gz
llvm-e7ce0528202306d8b751f132d9d3a6519ce4e688.tar.bz2
[clang][Serialization] Fix the serialization of ConstantExpr.
The serialization of ConstantExpr has currently a number of problems: - Some fields are just not serialized (ConstantExprBits.APValueKind and ConstantExprBits.IsImmediateInvocation). - ASTStmtReader::VisitConstantExpr forgets to add the trailing APValue to the list of objects to be destroyed when the APValue needs cleanup. While we are at it, bring the serialization of ConstantExpr more in-line with what is done with the other expressions by doing the following NFCs: - Get rid of ConstantExpr::DefaultInit. It is better to not initialize the fields of an empty ConstantExpr since this will allow msan to detect if a field was not deserialized. - Move the initialization of the fields of ConstantExpr to the constructor; ConstantExpr::Create allocates the memory and ConstantExpr::ConstantExpr is responsible for the initialization. Review after commit since this is a straightforward mechanical fix similar to the other serialization fixes.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions