Skip to content

Instantly share code, notes, and snippets.

@SammyJames
Created March 21, 2017 20:41
Show Gist options
  • Save SammyJames/363da1dbfdc170d97473214f064c7674 to your computer and use it in GitHub Desktop.
Save SammyJames/363da1dbfdc170d97473214f064c7674 to your computer and use it in GitHub Desktop.
case AttrSyntax::CXX: {
if (!Scope || Scope->getName() == "") {
return llvm::StringSwitch<int>(Name)
.Case("noreturn", LangOpts.CPlusPlus11 ? 200809 : 0)
.Case("carries_dependency", LangOpts.CPlusPlus11 ? 200809 : 0)
.Case("deprecated", LangOpts.CPlusPlus11 ? 201309 : 0)
.Case("deprecated", LangOpts.CPlusPlus11 ? 201309 : 0)
.Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0)
.Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0)
.Case("maybe_unused", LangOpts.CPlusPlus11 ? 201603 : 0)
.Case("unused", LangOpts.CPlusPlus11 ? 201603 : 0)
.Case("nodiscard", LangOpts.CPlusPlus11 ? 201603 : 0)
.Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201603 : 0)
.Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201603 : 0)
.Default(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment