This is an archive of the discontinued LLVM Phabricator instance.

[Lexer] Make __has_extension ignore -pedantic-errors inside system headers
Needs ReviewPublic

Authored by EricWF on May 6 2017, 5:17 PM.

Details

Reviewers
rsmith
Summary

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.

Diff Detail

Event Timeline

EricWF created this revision.May 6 2017, 5:17 PM