[llvm] r278909 - Restrict the use of the C++17 attribute to C++17 (at least as best we

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 10:19:18 PDT 2016


Justin Bogner <mail at justinbogner.com> writes:
> Chandler Carruth via llvm-commits <llvm-commits at lists.llvm.org> writes:
>> Author: chandlerc
>> Date: Wed Aug 17 02:18:44 2016
>> New Revision: 278909
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=278909&view=rev
>> Log:
>> Restrict the use of the C++17 attribute to C++17 (at least as best we
>> can given the current __cplusplus definitions).
>>
>> Without this, Clang triggers TONS of warnings about using a C++17
>> extension. I tried using LLVM_EXTENSION to turn these off and it doesn't
>> work.
>>
>> Suggestions on a better approach are welcome, but at least this makes
>> the build usable for me again.
>
> Maybe we should just swap the order of attribute checks and prefer
> clang::fallthrough if it's available? That one obviously doesn't warn
> about being a C++17 extension.

We discussed this a little on IRC - it wouldn't really gain us anything
over the current ordering (with C++17 check), and if some other compiler
warns on the C++17 extension we'd end up back in the same boat. This is
pretty good as is.


More information about the llvm-commits mailing list