You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ClangImporter] Fix stack-use-after-scope in createClangInvocation
ClangDiagnosticConsumer was initialized on the stack in a scope of 'if'
branch, and was passed to the DiagnosticEngine as a pointer. Then the
diagnostic engine was used outside the scope.
Instead, allocate the consumer in the heap, and pass to the engine with
`ShouldOwnClient` true. So the engine takes the ownership.
Speculative fix for rdar://105801504
0 commit comments