Libc++ needs to be able to detect and use certain language extensions inside the STL headers. However __has_extension currently return 0 when -pedantic-errors is specified. However libc++ can still safely use these extensions since -pedantic-errors is ignored within system headers.
This patch make __has_extension ignore -pedantic-errors when the expansion occurs in a system header.