[PATCH] D32950: Support C++1z features in `__has_extension`

2017-05-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98088. EricWF added a comment. - Correctly report that structured bindings, inline variables, and fold expressions are available in C++03. https://reviews.llvm.org/D32950 Files: docs/LanguageExtensions.rst lib/Lex/PPMacroExpansion.cpp

[PATCH] D32950: Support C++1z features in `__has_extension`

2017-05-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 98087. EricWF added a comment. - Improve documentation https://reviews.llvm.org/D32950 Files: docs/LanguageExtensions.rst lib/Lex/PPMacroExpansion.cpp test/Lexer/has_extension_cxx.cpp test/Lexer/has_feature_cxx0x.cpp

[PATCH] D32950: Support C++1z features in `__has_extension`

2017-05-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch updates `__has_extension` to report the C++1z extensions Clang offers https://reviews.llvm.org/D32950 Files: docs/LanguageExtensions.rst lib/Lex/PPMacroExpansion.cpp test/Lexer/has_extension_cxx.cpp test/Lexer/has_feature_cxx0x.cpp

[PATCH] D32949: [Lexer] Make __has_extension ignore -pedantic-errors inside system headers

2017-05-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. 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

[PATCH] D32948: [C++1z] Add speculative SD-6 feature test macro for pack expansions in using declarations

2017-05-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch adds the `__cpp_variadic_using` feature test macro suggested in P0195r2. Note that this macro is not yet listed by SD-6. https://reviews.llvm.org/D32948 Files: lib/Frontend/InitPreprocessor.cpp test/Lexer/cxx-features.cpp Index:

r302364 - Update LanguageExtensions doc to refer to C++14 instead of C++1y

2017-05-06 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Sat May 6 18:26:04 2017 New Revision: 302364 URL: http://llvm.org/viewvc/llvm-project?rev=302364=rev Log: Update LanguageExtensions doc to refer to C++14 instead of C++1y Modified: cfe/trunk/docs/LanguageExtensions.rst Modified: cfe/trunk/docs/LanguageExtensions.rst

[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-06 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: test/std/language.support/support.exception/propagation/current_exception.pass.cpp:10-11 -// exception_ptr has not been implemented on Windows +// This test needs to be rewritten for the Windows exception_ptr semantics +// which copy

[PATCH] D32927: [libc++] Implement exception_ptr on Windows

2017-05-06 Thread Ben Craig via Phabricator via cfe-commits
bcraig added inline comments. Comment at: test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp:12 + +// This test fails due to a stack overflow // XFAIL: LIBCXX-WINDOWS-FIXME EricWF wrote: > BillyONeal wrote: > > FWIW it does

[libcxx] r302362 - Ensure showbase does not overflow do_put buffers

2017-05-06 Thread Dimitry Andric via cfe-commits
Author: dim Date: Sat May 6 15:58:50 2017 New Revision: 302362 URL: http://llvm.org/viewvc/llvm-project?rev=302362=rev Log: Ensure showbase does not overflow do_put buffers Summary: In https://bugs.freebsd.org/207918, Daniel McRobb describes how using std::showbase with ostreams can cause

[PATCH] D32690: [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple calls

2017-05-06 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar updated this revision to Diff 98073. kuhar added a comment. Herald added a subscriber: xazax.hun. I updated the patch against the current trunk. I also run the modernize-use-emplace check on llvm and verified that there are no new regressions after applying fixits.

[PATCH] D32759: Fix errored return value in CheckFunctionReturnType and add a fixit hint

2017-05-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The difference between returning true and false here is just the way error recovery works: when we return true, we know the type is invalid, so we suppress it, and subsequent errors involving the declaration. Example (Objective-C++) where we currently print two

Re: [PATCH] D32696: More detailed docs for UsingShadowDecl

2017-05-06 Thread Kim Gräsman via cfe-commits
Ping! Any takers? Thanks, - Kim On Mon, May 1, 2017 at 10:27 AM, Kim Gräsman via Phabricator wrote: > kimgr created this revision. > > I couldn't make sense of the docs before, so I sent a question to cfe-dev. > Richard was gracious enough to fill in the blanks: >

[PATCH] D32425: [mips] Make checks in CodeGen/mips-varargs.c less fragile

2017-05-06 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 98059. arichardson retitled this revision from "[mips] Make N32 checks in CodeGen/mips-varargs.c less fragile" to "[mips] Make checks in CodeGen/mips-varargs.c less fragile". arichardson edited the summary of this revision. arichardson added a comment.

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-05-06 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/misc/ThrowWithNoexceptCheck.cpp:22 +void ThrowWithNoexceptCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus11) +return; If we handle throw() then it should be CPlusPlus

[PATCH] D32759: Fix errored return value in CheckFunctionReturnType and add a fixit hint

2017-05-06 Thread Wei-Ren Chen via Phabricator via cfe-commits
chenwj added a comment. @erichkeane Just share what I investigated. In https://reviews.llvm.org/D32759#744769, @erichkeane wrote: > In https://reviews.llvm.org/D32759#744613, @chenwj wrote: > > > > Ah, sorry. "Our Tests" means the lit test SemaObjC/method-bad-param.m > > > (line 11). I ran

[PATCH] D32759: Fix errored return value in CheckFunctionReturnType and add a fixit hint

2017-05-06 Thread Wei-Ren Chen via Phabricator via cfe-commits
chenwj added a subscriber: eli.friedman. chenwj added a comment. @eli.friedman I find you added `isObjCObjectType` check in svn revision 184006 (git commit ddb5a392). Could you confirm returning zero rather than true here is okay? A little explanation would be even better. Thanks.