SuccessChanges

Summary

  1. Thread safety analysis: Document how try-acquire is handled (details)
  2. Set InvalidDecl directly when deserializing a Decl (details)
Commit 8544defdcb09bbbbc25c5958e5f5b5762e9b9046 by aaronpuchert
Thread safety analysis: Document how try-acquire is handled

I don't think this is obvious, since try-acquire seemingly contradicts
our usual requirements of "no conditional locking".

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D87065
The file was modifiedclang/docs/ThreadSafetyAnalysis.rst (diff)
Commit 16975a638df3cda95c677055120b23e689d96dcd by aaronpuchert
Set InvalidDecl directly when deserializing a Decl

When parsing a C++17 binding declaration, we first create the
BindingDecls in Sema::ActOnDecompositionDeclarator, and then build the
DecompositionDecl in Sema::ActOnVariableDeclarator, so the contained
BindingDecls are never null. But when deserializing, we read the
DecompositionDecl with all properties before filling in the Bindings.
Among other things, reading a declaration reads whether it's invalid,
then calling setInvalidDecl which assumes that all bindings of the
DecompositionDecl are available, but that isn't the case.

Deserialization should just set all properties directly without invoking
subsequent functions, so we just set the flag without using the setter.

Fixes PR34960.

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D86207
The file was modifiedclang/lib/Serialization/ASTReaderDecl.cpp (diff)
The file was modifiedclang/test/PCH/cxx1z-decomposition.cpp (diff)