Skip to content
Commit 85d3a702 authored by Volodymyr Sapsai's avatar Volodymyr Sapsai
Browse files

Emit an error when include <atomic> after <stdatomic.h>

C11 defines `kill_dependency` as a macro in <stdatomic.h>. When you
include <atomic> after <stdatomic.h>, the macro clashes with
`std::kill_dependency` and causes multiple errors. Explicit error should
help in diagnosing those errors.

No change for working code that includes <atomic> before <stdatomic.h>.

rdar://problem/27435938

Reviewers: rsmith, EricWF, mclow.lists, jfb

Reviewed By: jfb

Subscribers: jfb, jkorous-apple, christof, bumblebritches57, JonChesterfield, smeenai, cfe-commits

Differential Revision: https://reviews.llvm.org/D45470

llvm-svn: 332413
parent cfeb646f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment