LCOV - code coverage report
Current view: top level - build-llvm/tools/clang/include/clang/Basic - AttrHasAttributeImpl.inc (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 406 410 99.0 %
Date: 2018-06-17 00:07:59 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
       2             : |*                                                                            *|
       3             : |* Code to implement the __has_attribute logic                                *|
       4             : |*                                                                            *|
       5             : |* Automatically generated file, do not edit!                                 *|
       6             : |*                                                                            *|
       7             : \*===----------------------------------------------------------------------===*/
       8             : 
       9             : const llvm::Triple &T = Target.getTriple();
      10        1232 : switch (Syntax) {
      11         137 : case AttrSyntax::GNU:
      12         137 :   return llvm::StringSwitch<int>(Name)
      13             :     .Case("amdgpu_flat_work_group_size", 1)
      14             :     .Case("amdgpu_num_sgpr", 1)
      15             :     .Case("amdgpu_num_vgpr", 1)
      16             :     .Case("amdgpu_waves_per_eu", 1)
      17         137 :     .Case("interrupt", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb) ? 1 : 0)
      18         137 :     .Case("interrupt", true && (T.getArch() == llvm::Triple::avr) ? 1 : 0)
      19         137 :     .Case("signal", true && (T.getArch() == llvm::Triple::avr) ? 1 : 0)
      20             :     .Case("abi_tag", 1)
      21             :     .Case("acquire_capability", 1)
      22             :     .Case("acquire_shared_capability", 1)
      23             :     .Case("exclusive_lock_function", 1)
      24             :     .Case("shared_lock_function", 1)
      25             :     .Case("acquire_capability", 1)
      26             :     .Case("acquire_shared_capability", 1)
      27             :     .Case("exclusive_lock_function", 1)
      28             :     .Case("shared_lock_function", 1)
      29             :     .Case("acquire_capability", 1)
      30             :     .Case("acquire_shared_capability", 1)
      31             :     .Case("exclusive_lock_function", 1)
      32             :     .Case("shared_lock_function", 1)
      33             :     .Case("acquire_capability", 1)
      34             :     .Case("acquire_shared_capability", 1)
      35             :     .Case("exclusive_lock_function", 1)
      36             :     .Case("shared_lock_function", 1)
      37             :     .Case("acquired_after", 1)
      38             :     .Case("acquired_before", 1)
      39             :     .Case("address_space", 1)
      40             :     .Case("alias", 1)
      41             :     .Case("align_value", 1)
      42             :     .Case("aligned", 1)
      43             :     .Case("alloc_align", 1)
      44             :     .Case("alloc_size", 1)
      45             :     .Case("always_inline", 1)
      46             :     .Case("analyzer_noreturn", 1)
      47             :     .Case("annotate", 1)
      48         137 :     .Case("interrupt", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0)
      49         137 :     .Case("no_caller_saved_registers", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0)
      50         137 :     .Case("nocf_check", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0)
      51             :     .Case("objc_arc_weak_reference_unavailable", 1)
      52             :     .Case("argument_with_type_tag", 1)
      53             :     .Case("pointer_with_type_tag", 1)
      54             :     .Case("argument_with_type_tag", 1)
      55             :     .Case("pointer_with_type_tag", 1)
      56             :     .Case("artificial", 1)
      57             :     .Case("assert_capability", 1)
      58             :     .Case("assert_shared_capability", 1)
      59             :     .Case("assert_capability", 1)
      60             :     .Case("assert_shared_capability", 1)
      61             :     .Case("assert_exclusive_lock", 1)
      62             :     .Case("assert_shared_lock", 1)
      63             :     .Case("assume_aligned", 1)
      64             :     .Case("availability", 1)
      65             :     .Case("blocks", 1)
      66             :     .Case("bounded", 1)
      67             :     .Case("cdecl", 1)
      68             :     .Case("cf_audited_transfer", 1)
      69             :     .Case("cf_consumed", 1)
      70             :     .Case("cf_returns_not_retained", 1)
      71             :     .Case("cf_returns_retained", 1)
      72             :     .Case("cf_unknown_transfer", 1)
      73             :     .Case("constant", 1)
      74             :     .Case("cudart_builtin", 1)
      75             :     .Case("device", 1)
      76             :     .Case("device_builtin", 1)
      77             :     .Case("device_builtin_surface_type", 1)
      78             :     .Case("device_builtin_texture_type", 1)
      79             :     .Case("global", 1)
      80             :     .Case("host", 1)
      81             :     .Case("launch_bounds", 1)
      82             :     .Case("shared", 1)
      83             :     .Case("callable_when", 1)
      84             :     .Case("capability", 1)
      85             :     .Case("shared_capability", 1)
      86             :     .Case("capability", 1)
      87             :     .Case("shared_capability", 1)
      88             :     .Case("carries_dependency", 1)
      89             :     .Case("cleanup", 1)
      90             :     .Case("cold", 1)
      91             :     .Case("common", 1)
      92             :     .Case("const", 1)
      93             :     .Case("__const", 1)
      94             :     .Case("const", 1)
      95             :     .Case("__const", 1)
      96             :     .Case("constructor", 1)
      97             :     .Case("consumable", 1)
      98             :     .Case("consumable_auto_cast_state", 1)
      99             :     .Case("consumable_set_state_on_read", 1)
     100             :     .Case("convergent", 1)
     101         137 :     .Case("dllexport", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64 || T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::aarch64) && (T.getOS() == llvm::Triple::Win32) ? 1 : 0)
     102         137 :     .Case("dllimport", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64 || T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::aarch64) && (T.getOS() == llvm::Triple::Win32) ? 1 : 0)
     103             :     .Case("deprecated", 1)
     104             :     .Case("destructor", 1)
     105             :     .Case("diagnose_if", 1)
     106             :     .Case("disable_tail_calls", 1)
     107             :     .Case("enable_if", 1)
     108             :     .Case("enum_extensibility", 1)
     109             :     .Case("exclusive_trylock_function", 1)
     110             :     .Case("ext_vector_type", 1)
     111             :     .Case("external_source_symbol", 1)
     112             :     .Case("fastcall", 1)
     113             :     .Case("flag_enum", 1)
     114             :     .Case("flatten", 1)
     115             :     .Case("format", 1)
     116             :     .Case("format_arg", 1)
     117             :     .Case("gnu_inline", 1)
     118             :     .Case("guarded_by", 1)
     119             :     .Case("guarded_var", 1)
     120             :     .Case("hot", 1)
     121             :     .Case("ibaction", 1)
     122             :     .Case("iboutlet", 1)
     123             :     .Case("iboutletcollection", 1)
     124         137 :     .Case("ifunc", true && (T.getObjectFormat() == llvm::Triple::ELF) ? 1 : 0)
     125             :     .Case("init_priority", 1)
     126             :     .Case("intel_ocl_bicc", 1)
     127             :     .Case("internal_linkage", 1)
     128             :     .Case("lto_visibility_public", 1)
     129             :     .Case("lock_returned", 1)
     130             :     .Case("lockable", 1)
     131             :     .Case("locks_excluded", 1)
     132             :     .Case("ms_abi", 1)
     133         137 :     .Case("interrupt", true && (T.getArch() == llvm::Triple::msp430) ? 1 : 0)
     134             :     .Case("ms_struct", 1)
     135             :     .Case("may_alias", 1)
     136         137 :     .Case("micromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0)
     137             :     .Case("minsize", 1)
     138         137 :     .Case("mips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0)
     139         137 :     .Case("interrupt", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0)
     140         137 :     .Case("long_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0)
     141         137 :     .Case("far", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0)
     142         137 :     .Case("long_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0)
     143         137 :     .Case("far", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0)
     144         137 :     .Case("short_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0)
     145         137 :     .Case("near", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0)
     146         137 :     .Case("short_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0)
     147         137 :     .Case("near", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0)
     148             :     .Case("mode", 1)
     149             :     .Case("ns_consumed", 1)
     150             :     .Case("ns_consumes_self", 1)
     151             :     .Case("ns_returns_autoreleased", 1)
     152             :     .Case("ns_returns_not_retained", 1)
     153             :     .Case("ns_returns_retained", 1)
     154             :     .Case("naked", 1)
     155             :     .Case("neon_polyvector_type", 1)
     156             :     .Case("neon_vector_type", 1)
     157             :     .Case("nocommon", 1)
     158             :     .Case("nodebug", 1)
     159             :     .Case("noduplicate", 1)
     160             :     .Case("noescape", 1)
     161             :     .Case("noinline", 1)
     162             :     .Case("no_instrument_function", 1)
     163         137 :     .Case("nomicromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0)
     164         137 :     .Case("nomips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0)
     165             :     .Case("noreturn", 1)
     166             :     .Case("no_sanitize", 1)
     167             :     .Case("no_address_safety_analysis", 1)
     168             :     .Case("no_sanitize_address", 1)
     169             :     .Case("no_sanitize_thread", 1)
     170             :     .Case("no_sanitize_memory", 1)
     171             :     .Case("no_address_safety_analysis", 1)
     172             :     .Case("no_sanitize_address", 1)
     173             :     .Case("no_sanitize_thread", 1)
     174             :     .Case("no_sanitize_memory", 1)
     175             :     .Case("no_address_safety_analysis", 1)
     176             :     .Case("no_sanitize_address", 1)
     177             :     .Case("no_sanitize_thread", 1)
     178             :     .Case("no_sanitize_memory", 1)
     179             :     .Case("no_address_safety_analysis", 1)
     180             :     .Case("no_sanitize_address", 1)
     181             :     .Case("no_sanitize_thread", 1)
     182             :     .Case("no_sanitize_memory", 1)
     183             :     .Case("no_split_stack", 1)
     184             :     .Case("no_stack_protector", 1)
     185             :     .Case("no_thread_safety_analysis", 1)
     186             :     .Case("nothrow", 1)
     187             :     .Case("nonnull", 1)
     188             :     .Case("not_tail_called", 1)
     189             :     .Case("nv_weak", 1)
     190             :     .Case("objc_boxable", 1)
     191             :     .Case("objc_bridge", 1)
     192             :     .Case("objc_bridge_mutable", 1)
     193             :     .Case("objc_bridge_related", 1)
     194             :     .Case("objc_designated_initializer", 1)
     195             :     .Case("objc_exception", 1)
     196             :     .Case("objc_protocol_requires_explicit_implementation", 1)
     197             :     .Case("objc_gc", 1)
     198             :     .Case("objc_independent_class", 1)
     199             :     .Case("objc_method_family", 1)
     200             :     .Case("NSObject", 1)
     201             :     .Case("objc_ownership", 1)
     202             :     .Case("objc_precise_lifetime", 1)
     203             :     .Case("objc_requires_property_definitions", 1)
     204             :     .Case("objc_requires_super", 1)
     205             :     .Case("objc_returns_inner_pointer", 1)
     206             :     .Case("objc_root_class", 1)
     207             :     .Case("objc_runtime_name", 1)
     208             :     .Case("objc_runtime_visible", 1)
     209             :     .Case("objc_subclassing_restricted", 1)
     210             :     .Case("intel_reqd_sub_group_size", 1)
     211             :     .Case("nosvm", 1)
     212             :     .Case("opencl_unroll_hint", 1)
     213             :     .Case("optnone", 1)
     214             :     .Case("overloadable", 1)
     215             :     .Case("ownership_holds", 1)
     216             :     .Case("ownership_returns", 1)
     217             :     .Case("ownership_takes", 1)
     218             :     .Case("ownership_holds", 1)
     219             :     .Case("ownership_returns", 1)
     220             :     .Case("ownership_takes", 1)
     221             :     .Case("ownership_holds", 1)
     222             :     .Case("ownership_returns", 1)
     223             :     .Case("ownership_takes", 1)
     224             :     .Case("packed", 1)
     225             :     .Case("param_typestate", 1)
     226             :     .Case("pascal", 1)
     227             :     .Case("pass_object_size", 1)
     228             :     .Case("pcs", 1)
     229             :     .Case("preserve_all", 1)
     230             :     .Case("preserve_most", 1)
     231             :     .Case("pt_guarded_by", 1)
     232             :     .Case("pt_guarded_var", 1)
     233             :     .Case("pure", 1)
     234             :     .Case("regcall", 1)
     235             :     .Case("regparm", 1)
     236             :     .Case("release_capability", 1)
     237             :     .Case("release_shared_capability", 1)
     238             :     .Case("release_generic_capability", 1)
     239             :     .Case("unlock_function", 1)
     240             :     .Case("release_capability", 1)
     241             :     .Case("release_shared_capability", 1)
     242             :     .Case("release_generic_capability", 1)
     243             :     .Case("unlock_function", 1)
     244             :     .Case("release_capability", 1)
     245             :     .Case("release_shared_capability", 1)
     246             :     .Case("release_generic_capability", 1)
     247             :     .Case("unlock_function", 1)
     248             :     .Case("release_capability", 1)
     249             :     .Case("release_shared_capability", 1)
     250             :     .Case("release_generic_capability", 1)
     251             :     .Case("unlock_function", 1)
     252             :     .Case("kernel", 1)
     253             :     .Case("reqd_work_group_size", 1)
     254             :     .Case("require_constant_initialization", 1)
     255             :     .Case("requires_capability", 1)
     256             :     .Case("exclusive_locks_required", 1)
     257             :     .Case("requires_shared_capability", 1)
     258             :     .Case("shared_locks_required", 1)
     259             :     .Case("requires_capability", 1)
     260             :     .Case("exclusive_locks_required", 1)
     261             :     .Case("requires_shared_capability", 1)
     262             :     .Case("shared_locks_required", 1)
     263             :     .Case("requires_capability", 1)
     264             :     .Case("exclusive_locks_required", 1)
     265             :     .Case("requires_shared_capability", 1)
     266             :     .Case("shared_locks_required", 1)
     267             :     .Case("requires_capability", 1)
     268             :     .Case("exclusive_locks_required", 1)
     269             :     .Case("requires_shared_capability", 1)
     270             :     .Case("shared_locks_required", 1)
     271             :     .Case("malloc", 1)
     272             :     .Case("return_typestate", 1)
     273             :     .Case("returns_nonnull", 1)
     274             :     .Case("returns_twice", 1)
     275             :     .Case("scoped_lockable", 1)
     276             :     .Case("section", 1)
     277             :     .Case("selectany", 1)
     278             :     .Case("sentinel", 1)
     279             :     .Case("set_typestate", 1)
     280             :     .Case("shared_trylock_function", 1)
     281             :     .Case("stdcall", 1)
     282             :     .Case("swiftcall", 1)
     283             :     .Case("swift_context", 1)
     284             :     .Case("swift_error_result", 1)
     285             :     .Case("swift_indirect_result", 1)
     286             :     .Case("sysv_abi", 1)
     287             :     .Case("tls_model", 1)
     288             :     .Case("target", 1)
     289             :     .Case("test_typestate", 1)
     290             :     .Case("thiscall", 1)
     291             :     .Case("transparent_union", 1)
     292             :     .Case("trivial_abi", 1)
     293             :     .Case("try_acquire_capability", 1)
     294             :     .Case("try_acquire_shared_capability", 1)
     295             :     .Case("try_acquire_capability", 1)
     296             :     .Case("try_acquire_shared_capability", 1)
     297             :     .Case("type_tag_for_datatype", 1)
     298             :     .Case("type_visibility", 1)
     299             :     .Case("unavailable", 1)
     300             :     .Case("unused", 1)
     301             :     .Case("used", 1)
     302             :     .Case("vecreturn", 1)
     303             :     .Case("vec_type_hint", 1)
     304             :     .Case("vectorcall", 1)
     305             :     .Case("vector_size", 1)
     306             :     .Case("visibility", 1)
     307             :     .Case("warn_unused", 1)
     308             :     .Case("warn_unused_result", 1)
     309             :     .Case("weak", 1)
     310             :     .Case("weak_import", 1)
     311             :     .Case("weakref", 1)
     312             :     .Case("work_group_size_hint", 1)
     313         137 :     .Case("force_align_arg_pointer", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0)
     314             :     .Case("xray_always_instrument", 1)
     315             :     .Case("xray_never_instrument", 1)
     316             :     .Case("xray_always_instrument", 1)
     317             :     .Case("xray_never_instrument", 1)
     318             :     .Case("xray_log_args", 1)
     319             :     .Default(0);
     320         429 : case AttrSyntax::Declspec:
     321         429 :   return llvm::StringSwitch<int>(Name)
     322             :     .Case("align", 1)
     323             :     .Case("__constant__", 1)
     324             :     .Case("__cudart_builtin__", 1)
     325             :     .Case("__device__", 1)
     326             :     .Case("__device_builtin__", 1)
     327             :     .Case("__device_builtin_surface_type__", 1)
     328             :     .Case("__device_builtin_texture_type__", 1)
     329             :     .Case("__global__", 1)
     330             :     .Case("__host__", 1)
     331             :     .Case("__launch_bounds__", 1)
     332             :     .Case("__shared__", 1)
     333         429 :     .Case("dllexport", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64 || T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::aarch64) && (T.getOS() == llvm::Triple::Win32) ? 1 : 0)
     334         429 :     .Case("dllimport", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64 || T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::aarch64) && (T.getOS() == llvm::Triple::Win32) ? 1 : 0)
     335             :     .Case("deprecated", 1)
     336         429 :     .Case("empty_bases", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64 || T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::aarch64) && (Target.getCXXABI().getKind() == TargetCXXABI::Microsoft) ? 1 : 0)
     337         429 :     .Case("layout_version", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64 || T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::aarch64) && (Target.getCXXABI().getKind() == TargetCXXABI::Microsoft) ? 1 : 0)
     338         429 :     .Case("novtable", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64 || T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::aarch64) && (Target.getCXXABI().getKind() == TargetCXXABI::Microsoft) ? 1 : 0)
     339             :     .Case("naked", 1)
     340             :     .Case("noalias", 1)
     341             :     .Case("noinline", 1)
     342             :     .Case("noreturn", 1)
     343             :     .Case("nothrow", 1)
     344             :     .Case("restrict", 1)
     345             :     .Case("allocate", 1)
     346             :     .Case("selectany", 1)
     347             :     .Case("thread", 1)
     348             :     .Case("uuid", 1)
     349             :     .Case("property", 1)
     350             :     .Default(0);
     351           0 : case AttrSyntax::Microsoft:
     352           0 :   return llvm::StringSwitch<int>(Name)
     353             :     .Case("uuid", 1)
     354             :     .Default(0);
     355           0 : case AttrSyntax::Pragma:
     356           0 :   return llvm::StringSwitch<int>(Name)
     357             :     .Case("init_seg", 1)
     358             :     .Case("loop", 1)
     359             :     .Case("unroll", 1)
     360             :     .Case("nounroll", 1)
     361             :     .Case("loop", 1)
     362             :     .Case("unroll", 1)
     363             :     .Case("nounroll", 1)
     364             :     .Case("loop", 1)
     365             :     .Case("unroll", 1)
     366             :     .Case("nounroll", 1)
     367             :     .Case("declare simd", 1)
     368             :     .Case("declare target", 1)
     369             :     .Default(0);
     370         617 : case AttrSyntax::CXX: {
     371         617 : if (!Scope || Scope->getName() == "") {
     372         543 :   return llvm::StringSwitch<int>(Name)
     373         543 :     .Case("noreturn", LangOpts.CPlusPlus11 ? 200809 : 0)
     374         543 :     .Case("carries_dependency", LangOpts.CPlusPlus11 ? 200809 : 0)
     375         543 :     .Case("deprecated", LangOpts.CPlusPlus11 ? 201309 : 0)
     376         543 :     .Case("deprecated", LangOpts.CPlusPlus11 ? 201309 : 0)
     377         543 :     .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0)
     378         543 :     .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0)
     379         543 :     .Case("maybe_unused", LangOpts.CPlusPlus11 ? 201603 : 0)
     380         543 :     .Case("unused", LangOpts.CPlusPlus11 ? 201603 : 0)
     381         543 :     .Case("nodiscard", LangOpts.CPlusPlus11 ? 201603 : 0)
     382         543 :     .Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201603 : 0)
     383         543 :     .Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201603 : 0)
     384             :     .Default(0);
     385          74 : } else if (Scope->getName() == "clang") {
     386          26 :   return llvm::StringSwitch<int>(Name)
     387          26 :     .Case("amdgpu_flat_work_group_size", LangOpts.CPlusPlus11 ? 1 : 0)
     388          26 :     .Case("amdgpu_num_sgpr", LangOpts.CPlusPlus11 ? 1 : 0)
     389          26 :     .Case("amdgpu_num_vgpr", LangOpts.CPlusPlus11 ? 1 : 0)
     390          26 :     .Case("amdgpu_waves_per_eu", LangOpts.CPlusPlus11 ? 1 : 0)
     391          26 :     .Case("acquire_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     392          26 :     .Case("acquire_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     393          26 :     .Case("acquire_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     394          26 :     .Case("acquire_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     395          26 :     .Case("address_space", LangOpts.CPlusPlus11 ? 1 : 0)
     396          26 :     .Case("annotate", LangOpts.CPlusPlus11 ? 1 : 0)
     397          26 :     .Case("objc_arc_weak_reference_unavailable", LangOpts.CPlusPlus11 ? 1 : 0)
     398          26 :     .Case("argument_with_type_tag", LangOpts.CPlusPlus11 ? 1 : 0)
     399          26 :     .Case("pointer_with_type_tag", LangOpts.CPlusPlus11 ? 1 : 0)
     400          26 :     .Case("argument_with_type_tag", LangOpts.CPlusPlus11 ? 1 : 0)
     401          26 :     .Case("pointer_with_type_tag", LangOpts.CPlusPlus11 ? 1 : 0)
     402          26 :     .Case("assert_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     403          26 :     .Case("assert_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     404          26 :     .Case("assert_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     405          26 :     .Case("assert_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     406          26 :     .Case("availability", LangOpts.CPlusPlus11 ? 1 : 0)
     407          26 :     .Case("blocks", LangOpts.CPlusPlus11 ? 1 : 0)
     408          26 :     .Case("cf_audited_transfer", LangOpts.CPlusPlus11 ? 1 : 0)
     409          26 :     .Case("cf_consumed", LangOpts.CPlusPlus11 ? 1 : 0)
     410          26 :     .Case("cf_returns_not_retained", LangOpts.CPlusPlus11 ? 1 : 0)
     411          26 :     .Case("cf_returns_retained", LangOpts.CPlusPlus11 ? 1 : 0)
     412          26 :     .Case("cf_unknown_transfer", LangOpts.CPlusPlus11 ? 1 : 0)
     413          26 :     .Case("callable_when", LangOpts.CPlusPlus11 ? 1 : 0)
     414          26 :     .Case("capability", LangOpts.CPlusPlus11 ? 1 : 0)
     415          26 :     .Case("shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     416          26 :     .Case("capability", LangOpts.CPlusPlus11 ? 1 : 0)
     417          26 :     .Case("shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     418          26 :     .Case("consumable", LangOpts.CPlusPlus11 ? 1 : 0)
     419          26 :     .Case("consumable_auto_cast_state", LangOpts.CPlusPlus11 ? 1 : 0)
     420          26 :     .Case("consumable_set_state_on_read", LangOpts.CPlusPlus11 ? 1 : 0)
     421          26 :     .Case("convergent", LangOpts.CPlusPlus11 ? 1 : 0)
     422          26 :     .Case("disable_tail_calls", LangOpts.CPlusPlus11 ? 1 : 0)
     423          26 :     .Case("enum_extensibility", LangOpts.CPlusPlus11 ? 1 : 0)
     424          26 :     .Case("external_source_symbol", LangOpts.CPlusPlus11 ? 1 : 0)
     425          26 :     .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0)
     426          26 :     .Case("flag_enum", LangOpts.CPlusPlus11 ? 1 : 0)
     427          26 :     .Case("guarded_var", LangOpts.CPlusPlus11 ? 1 : 0)
     428          26 :     .Case("ibaction", LangOpts.CPlusPlus11 ? 1 : 0)
     429          26 :     .Case("iboutlet", LangOpts.CPlusPlus11 ? 1 : 0)
     430          26 :     .Case("iboutletcollection", LangOpts.CPlusPlus11 ? 1 : 0)
     431          26 :     .Case("intel_ocl_bicc", LangOpts.CPlusPlus11 ? 1 : 0)
     432          26 :     .Case("internal_linkage", LangOpts.CPlusPlus11 ? 1 : 0)
     433          26 :     .Case("lto_visibility_public", LangOpts.CPlusPlus11 ? 1 : 0)
     434          26 :     .Case("minsize", LangOpts.CPlusPlus11 ? 1 : 0)
     435          26 :     .Case("ns_consumed", LangOpts.CPlusPlus11 ? 1 : 0)
     436          26 :     .Case("ns_consumes_self", LangOpts.CPlusPlus11 ? 1 : 0)
     437          26 :     .Case("ns_returns_autoreleased", LangOpts.CPlusPlus11 ? 1 : 0)
     438          26 :     .Case("ns_returns_not_retained", LangOpts.CPlusPlus11 ? 1 : 0)
     439          26 :     .Case("ns_returns_retained", LangOpts.CPlusPlus11 ? 1 : 0)
     440          26 :     .Case("neon_polyvector_type", LangOpts.CPlusPlus11 ? 1 : 0)
     441          26 :     .Case("neon_vector_type", LangOpts.CPlusPlus11 ? 1 : 0)
     442          26 :     .Case("noduplicate", LangOpts.CPlusPlus11 ? 1 : 0)
     443          26 :     .Case("noescape", LangOpts.CPlusPlus11 ? 1 : 0)
     444          26 :     .Case("no_sanitize", LangOpts.CPlusPlus11 ? 1 : 0)
     445          26 :     .Case("no_sanitize_memory", LangOpts.CPlusPlus11 ? 1 : 0)
     446          26 :     .Case("no_stack_protector", LangOpts.CPlusPlus11 ? 1 : 0)
     447          26 :     .Case("no_thread_safety_analysis", LangOpts.CPlusPlus11 ? 1 : 0)
     448          26 :     .Case("not_tail_called", LangOpts.CPlusPlus11 ? 1 : 0)
     449          26 :     .Case("objc_boxable", LangOpts.CPlusPlus11 ? 1 : 0)
     450          26 :     .Case("objc_bridge", LangOpts.CPlusPlus11 ? 1 : 0)
     451          26 :     .Case("objc_bridge_mutable", LangOpts.CPlusPlus11 ? 1 : 0)
     452          26 :     .Case("objc_bridge_related", LangOpts.CPlusPlus11 ? 1 : 0)
     453          26 :     .Case("objc_designated_initializer", LangOpts.CPlusPlus11 ? 1 : 0)
     454          26 :     .Case("objc_exception", LangOpts.CPlusPlus11 ? 1 : 0)
     455          26 :     .Case("objc_protocol_requires_explicit_implementation", LangOpts.CPlusPlus11 ? 1 : 0)
     456          26 :     .Case("objc_gc", LangOpts.CPlusPlus11 ? 1 : 0)
     457          26 :     .Case("objc_independent_class", LangOpts.CPlusPlus11 ? 1 : 0)
     458          26 :     .Case("objc_method_family", LangOpts.CPlusPlus11 ? 1 : 0)
     459          26 :     .Case("NSObject", LangOpts.CPlusPlus11 ? 1 : 0)
     460          26 :     .Case("objc_ownership", LangOpts.CPlusPlus11 ? 1 : 0)
     461          26 :     .Case("objc_precise_lifetime", LangOpts.CPlusPlus11 ? 1 : 0)
     462          26 :     .Case("objc_requires_property_definitions", LangOpts.CPlusPlus11 ? 1 : 0)
     463          26 :     .Case("objc_requires_super", LangOpts.CPlusPlus11 ? 1 : 0)
     464          26 :     .Case("objc_returns_inner_pointer", LangOpts.CPlusPlus11 ? 1 : 0)
     465          26 :     .Case("objc_root_class", LangOpts.CPlusPlus11 ? 1 : 0)
     466          26 :     .Case("objc_runtime_name", LangOpts.CPlusPlus11 ? 1 : 0)
     467          26 :     .Case("objc_runtime_visible", LangOpts.CPlusPlus11 ? 1 : 0)
     468          26 :     .Case("objc_subclassing_restricted", LangOpts.CPlusPlus11 ? 1 : 0)
     469          26 :     .Case("optnone", LangOpts.CPlusPlus11 ? 1 : 0)
     470          26 :     .Case("overloadable", LangOpts.CPlusPlus11 ? 1 : 0)
     471          26 :     .Case("ownership_holds", LangOpts.CPlusPlus11 ? 1 : 0)
     472          26 :     .Case("ownership_returns", LangOpts.CPlusPlus11 ? 1 : 0)
     473          26 :     .Case("ownership_takes", LangOpts.CPlusPlus11 ? 1 : 0)
     474          26 :     .Case("ownership_holds", LangOpts.CPlusPlus11 ? 1 : 0)
     475          26 :     .Case("ownership_returns", LangOpts.CPlusPlus11 ? 1 : 0)
     476          26 :     .Case("ownership_takes", LangOpts.CPlusPlus11 ? 1 : 0)
     477          26 :     .Case("ownership_holds", LangOpts.CPlusPlus11 ? 1 : 0)
     478          26 :     .Case("ownership_returns", LangOpts.CPlusPlus11 ? 1 : 0)
     479          26 :     .Case("ownership_takes", LangOpts.CPlusPlus11 ? 1 : 0)
     480          26 :     .Case("param_typestate", LangOpts.CPlusPlus11 ? 1 : 0)
     481          26 :     .Case("pascal", LangOpts.CPlusPlus11 ? 1 : 0)
     482          26 :     .Case("pass_object_size", LangOpts.CPlusPlus11 ? 1 : 0)
     483          26 :     .Case("preserve_all", LangOpts.CPlusPlus11 ? 1 : 0)
     484          26 :     .Case("preserve_most", LangOpts.CPlusPlus11 ? 1 : 0)
     485          26 :     .Case("pt_guarded_var", LangOpts.CPlusPlus11 ? 1 : 0)
     486          26 :     .Case("release_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     487          26 :     .Case("release_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     488          26 :     .Case("release_generic_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     489          26 :     .Case("unlock_function", LangOpts.CPlusPlus11 ? 1 : 0)
     490          26 :     .Case("release_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     491          26 :     .Case("release_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     492          26 :     .Case("release_generic_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     493          26 :     .Case("unlock_function", LangOpts.CPlusPlus11 ? 1 : 0)
     494          26 :     .Case("release_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     495          26 :     .Case("release_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     496          26 :     .Case("release_generic_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     497          26 :     .Case("unlock_function", LangOpts.CPlusPlus11 ? 1 : 0)
     498          26 :     .Case("release_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     499          26 :     .Case("release_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     500          26 :     .Case("release_generic_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     501          26 :     .Case("unlock_function", LangOpts.CPlusPlus11 ? 1 : 0)
     502          26 :     .Case("require_constant_initialization", LangOpts.CPlusPlus11 ? 1 : 0)
     503          26 :     .Case("requires_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     504          26 :     .Case("exclusive_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
     505          26 :     .Case("requires_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     506          26 :     .Case("shared_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
     507          26 :     .Case("requires_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     508          26 :     .Case("exclusive_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
     509          26 :     .Case("requires_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     510          26 :     .Case("shared_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
     511          26 :     .Case("requires_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     512          26 :     .Case("exclusive_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
     513          26 :     .Case("requires_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     514          26 :     .Case("shared_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
     515          26 :     .Case("requires_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     516          26 :     .Case("exclusive_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
     517          26 :     .Case("requires_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     518          26 :     .Case("shared_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
     519          26 :     .Case("return_typestate", LangOpts.CPlusPlus11 ? 1 : 0)
     520          26 :     .Case("scoped_lockable", LangOpts.CPlusPlus11 ? 1 : 0)
     521          26 :     .Case("set_typestate", LangOpts.CPlusPlus11 ? 1 : 0)
     522          26 :     .Case("swiftcall", LangOpts.CPlusPlus11 ? 1 : 0)
     523          26 :     .Case("swift_context", LangOpts.CPlusPlus11 ? 1 : 0)
     524          26 :     .Case("swift_error_result", LangOpts.CPlusPlus11 ? 1 : 0)
     525          26 :     .Case("swift_indirect_result", LangOpts.CPlusPlus11 ? 1 : 0)
     526          26 :     .Case("test_typestate", LangOpts.CPlusPlus11 ? 1 : 0)
     527          26 :     .Case("trivial_abi", LangOpts.CPlusPlus11 ? 1 : 0)
     528          26 :     .Case("try_acquire_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     529          26 :     .Case("try_acquire_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     530          26 :     .Case("try_acquire_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     531          26 :     .Case("try_acquire_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
     532          26 :     .Case("type_tag_for_datatype", LangOpts.CPlusPlus11 ? 1 : 0)
     533          26 :     .Case("type_visibility", LangOpts.CPlusPlus11 ? 1 : 0)
     534          26 :     .Case("unavailable", LangOpts.CPlusPlus11 ? 1 : 0)
     535          26 :     .Case("vecreturn", LangOpts.CPlusPlus11 ? 1 : 0)
     536          26 :     .Case("vectorcall", LangOpts.CPlusPlus11 ? 1 : 0)
     537          26 :     .Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201603 : 0)
     538          26 :     .Case("weak_import", LangOpts.CPlusPlus11 ? 1 : 0)
     539          26 :     .Case("xray_always_instrument", LangOpts.CPlusPlus11 ? 1 : 0)
     540          26 :     .Case("xray_never_instrument", LangOpts.CPlusPlus11 ? 1 : 0)
     541          26 :     .Case("xray_always_instrument", LangOpts.CPlusPlus11 ? 1 : 0)
     542          26 :     .Case("xray_never_instrument", LangOpts.CPlusPlus11 ? 1 : 0)
     543          26 :     .Case("xray_log_args", LangOpts.CPlusPlus11 ? 1 : 0)
     544             :     .Default(0);
     545          48 : } else if (Scope->getName() == "gnu") {
     546          29 :   return llvm::StringSwitch<int>(Name)
     547          29 :     .Case("interrupt", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb) && LangOpts.CPlusPlus11 ? 1 : 0)
     548          29 :     .Case("interrupt", true && (T.getArch() == llvm::Triple::avr) && LangOpts.CPlusPlus11 ? 1 : 0)
     549          29 :     .Case("signal", true && (T.getArch() == llvm::Triple::avr) && LangOpts.CPlusPlus11 ? 1 : 0)
     550          29 :     .Case("abi_tag", LangOpts.CPlusPlus11 ? 1 : 0)
     551          29 :     .Case("alias", LangOpts.CPlusPlus11 ? 1 : 0)
     552          29 :     .Case("aligned", LangOpts.CPlusPlus11 ? 1 : 0)
     553          29 :     .Case("alloc_align", LangOpts.CPlusPlus11 ? 1 : 0)
     554          29 :     .Case("alloc_size", LangOpts.CPlusPlus11 ? 1 : 0)
     555          29 :     .Case("always_inline", LangOpts.CPlusPlus11 ? 1 : 0)
     556          29 :     .Case("interrupt", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0)
     557          29 :     .Case("no_caller_saved_registers", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0)
     558          29 :     .Case("nocf_check", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0)
     559          29 :     .Case("artificial", LangOpts.CPlusPlus11 ? 1 : 0)
     560          29 :     .Case("assume_aligned", LangOpts.CPlusPlus11 ? 1 : 0)
     561          29 :     .Case("cdecl", LangOpts.CPlusPlus11 ? 1 : 0)
     562          29 :     .Case("cleanup", LangOpts.CPlusPlus11 ? 1 : 0)
     563          29 :     .Case("cold", LangOpts.CPlusPlus11 ? 1 : 0)
     564          29 :     .Case("common", LangOpts.CPlusPlus11 ? 1 : 0)
     565          29 :     .Case("const", LangOpts.CPlusPlus11 ? 1 : 0)
     566          29 :     .Case("__const", LangOpts.CPlusPlus11 ? 1 : 0)
     567          29 :     .Case("const", LangOpts.CPlusPlus11 ? 1 : 0)
     568          29 :     .Case("__const", LangOpts.CPlusPlus11 ? 1 : 0)
     569          29 :     .Case("constructor", LangOpts.CPlusPlus11 ? 1 : 0)
     570          29 :     .Case("dllexport", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64 || T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::aarch64) && (T.getOS() == llvm::Triple::Win32) && LangOpts.CPlusPlus11 ? 1 : 0)
     571          29 :     .Case("dllimport", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64 || T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::aarch64) && (T.getOS() == llvm::Triple::Win32) && LangOpts.CPlusPlus11 ? 1 : 0)
     572          29 :     .Case("deprecated", LangOpts.CPlusPlus11 ? 201309 : 0)
     573          29 :     .Case("destructor", LangOpts.CPlusPlus11 ? 1 : 0)
     574          29 :     .Case("fastcall", LangOpts.CPlusPlus11 ? 1 : 0)
     575          29 :     .Case("flatten", LangOpts.CPlusPlus11 ? 1 : 0)
     576          29 :     .Case("format", LangOpts.CPlusPlus11 ? 1 : 0)
     577          29 :     .Case("format_arg", LangOpts.CPlusPlus11 ? 1 : 0)
     578          29 :     .Case("gnu_inline", LangOpts.CPlusPlus11 ? 1 : 0)
     579          29 :     .Case("hot", LangOpts.CPlusPlus11 ? 1 : 0)
     580          29 :     .Case("ifunc", true && (T.getObjectFormat() == llvm::Triple::ELF) && LangOpts.CPlusPlus11 ? 1 : 0)
     581          29 :     .Case("init_priority", LangOpts.CPlusPlus11 ? 1 : 0)
     582          29 :     .Case("ms_abi", LangOpts.CPlusPlus11 ? 1 : 0)
     583          29 :     .Case("interrupt", true && (T.getArch() == llvm::Triple::msp430) && LangOpts.CPlusPlus11 ? 1 : 0)
     584          29 :     .Case("ms_struct", LangOpts.CPlusPlus11 ? 1 : 0)
     585          29 :     .Case("may_alias", LangOpts.CPlusPlus11 ? 1 : 0)
     586          29 :     .Case("micromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0)
     587          29 :     .Case("mips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0)
     588          29 :     .Case("interrupt", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0)
     589          29 :     .Case("long_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0)
     590          29 :     .Case("far", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0)
     591          29 :     .Case("long_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0)
     592          29 :     .Case("far", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0)
     593          29 :     .Case("short_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0)
     594          29 :     .Case("near", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0)
     595          29 :     .Case("short_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0)
     596          29 :     .Case("near", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0)
     597          29 :     .Case("mode", LangOpts.CPlusPlus11 ? 1 : 0)
     598          29 :     .Case("naked", LangOpts.CPlusPlus11 ? 1 : 0)
     599          29 :     .Case("nocommon", LangOpts.CPlusPlus11 ? 1 : 0)
     600          29 :     .Case("nodebug", LangOpts.CPlusPlus11 ? 1 : 0)
     601          29 :     .Case("noinline", LangOpts.CPlusPlus11 ? 1 : 0)
     602          29 :     .Case("no_instrument_function", LangOpts.CPlusPlus11 ? 1 : 0)
     603          29 :     .Case("nomicromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0)
     604          29 :     .Case("nomips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0)
     605          29 :     .Case("noreturn", LangOpts.CPlusPlus11 ? 1 : 0)
     606          29 :     .Case("no_address_safety_analysis", LangOpts.CPlusPlus11 ? 1 : 0)
     607          29 :     .Case("no_sanitize_address", LangOpts.CPlusPlus11 ? 1 : 0)
     608          29 :     .Case("no_sanitize_thread", LangOpts.CPlusPlus11 ? 1 : 0)
     609          29 :     .Case("no_address_safety_analysis", LangOpts.CPlusPlus11 ? 1 : 0)
     610          29 :     .Case("no_sanitize_address", LangOpts.CPlusPlus11 ? 1 : 0)
     611          29 :     .Case("no_sanitize_thread", LangOpts.CPlusPlus11 ? 1 : 0)
     612          29 :     .Case("no_address_safety_analysis", LangOpts.CPlusPlus11 ? 1 : 0)
     613          29 :     .Case("no_sanitize_address", LangOpts.CPlusPlus11 ? 1 : 0)
     614          29 :     .Case("no_sanitize_thread", LangOpts.CPlusPlus11 ? 1 : 0)
     615          29 :     .Case("no_split_stack", LangOpts.CPlusPlus11 ? 1 : 0)
     616          29 :     .Case("nothrow", LangOpts.CPlusPlus11 ? 1 : 0)
     617          29 :     .Case("nonnull", LangOpts.CPlusPlus11 ? 1 : 0)
     618          29 :     .Case("packed", LangOpts.CPlusPlus11 ? 1 : 0)
     619          29 :     .Case("pcs", LangOpts.CPlusPlus11 ? 1 : 0)
     620          29 :     .Case("pure", LangOpts.CPlusPlus11 ? 1 : 0)
     621          29 :     .Case("regcall", LangOpts.CPlusPlus11 ? 1 : 0)
     622          29 :     .Case("regparm", LangOpts.CPlusPlus11 ? 1 : 0)
     623          29 :     .Case("malloc", LangOpts.CPlusPlus11 ? 1 : 0)
     624          29 :     .Case("returns_nonnull", LangOpts.CPlusPlus11 ? 1 : 0)
     625          29 :     .Case("returns_twice", LangOpts.CPlusPlus11 ? 1 : 0)
     626          29 :     .Case("section", LangOpts.CPlusPlus11 ? 1 : 0)
     627          29 :     .Case("selectany", LangOpts.CPlusPlus11 ? 1 : 0)
     628          29 :     .Case("sentinel", LangOpts.CPlusPlus11 ? 1 : 0)
     629          29 :     .Case("stdcall", LangOpts.CPlusPlus11 ? 1 : 0)
     630          29 :     .Case("sysv_abi", LangOpts.CPlusPlus11 ? 1 : 0)
     631          29 :     .Case("tls_model", LangOpts.CPlusPlus11 ? 1 : 0)
     632          29 :     .Case("target", LangOpts.CPlusPlus11 ? 1 : 0)
     633          29 :     .Case("thiscall", LangOpts.CPlusPlus11 ? 1 : 0)
     634          29 :     .Case("transparent_union", LangOpts.CPlusPlus11 ? 1 : 0)
     635          29 :     .Case("unused", LangOpts.CPlusPlus11 ? 201603 : 0)
     636          29 :     .Case("used", LangOpts.CPlusPlus11 ? 1 : 0)
     637          29 :     .Case("vector_size", LangOpts.CPlusPlus11 ? 1 : 0)
     638          29 :     .Case("visibility", LangOpts.CPlusPlus11 ? 1 : 0)
     639          29 :     .Case("warn_unused", LangOpts.CPlusPlus11 ? 1 : 0)
     640          29 :     .Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201603 : 0)
     641          29 :     .Case("weak", LangOpts.CPlusPlus11 ? 1 : 0)
     642          29 :     .Case("weakref", LangOpts.CPlusPlus11 ? 1 : 0)
     643          29 :     .Case("force_align_arg_pointer", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0)
     644             :     .Default(0);
     645          19 : } else if (Scope->getName() == "gsl") {
     646          11 :   return llvm::StringSwitch<int>(Name)
     647          11 :     .Case("suppress", LangOpts.CPlusPlus11 ? 1 : 0)
     648             :     .Default(0);
     649             : }
     650             : } break;
     651          49 : case AttrSyntax::C: {
     652          49 : if (!Scope || Scope->getName() == "") {
     653           8 :   return llvm::StringSwitch<int>(Name)
     654           8 :     .Case("deprecated", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     655           8 :     .Case("fallthrough", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     656           8 :     .Case("maybe_unused", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     657           8 :     .Case("nodiscard", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     658             :     .Default(0);
     659          41 : } else if (Scope->getName() == "clang") {
     660          41 :   return llvm::StringSwitch<int>(Name)
     661          41 :     .Case("address_space", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     662          41 :     .Case("annotate", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     663          41 :     .Case("objc_arc_weak_reference_unavailable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     664          41 :     .Case("argument_with_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     665          41 :     .Case("pointer_with_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     666          41 :     .Case("argument_with_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     667          41 :     .Case("pointer_with_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     668          41 :     .Case("availability", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     669          41 :     .Case("blocks", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     670          41 :     .Case("cf_audited_transfer", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     671          41 :     .Case("cf_consumed", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     672          41 :     .Case("cf_returns_not_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     673          41 :     .Case("cf_returns_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     674          41 :     .Case("cf_unknown_transfer", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     675          41 :     .Case("convergent", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     676          41 :     .Case("disable_tail_calls", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     677          41 :     .Case("enum_extensibility", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     678          41 :     .Case("external_source_symbol", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     679          41 :     .Case("flag_enum", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     680          41 :     .Case("ibaction", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     681          41 :     .Case("iboutlet", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     682          41 :     .Case("iboutletcollection", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     683          41 :     .Case("internal_linkage", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     684          41 :     .Case("lto_visibility_public", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     685          41 :     .Case("minsize", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     686          41 :     .Case("ns_consumed", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     687          41 :     .Case("ns_consumes_self", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     688          41 :     .Case("ns_returns_autoreleased", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     689          41 :     .Case("ns_returns_not_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     690          41 :     .Case("ns_returns_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     691          41 :     .Case("neon_polyvector_type", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     692          41 :     .Case("neon_vector_type", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     693          41 :     .Case("noduplicate", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     694          41 :     .Case("noescape", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     695          41 :     .Case("no_sanitize", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     696          41 :     .Case("no_sanitize_memory", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     697          41 :     .Case("no_stack_protector", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     698          41 :     .Case("no_thread_safety_analysis", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     699          41 :     .Case("not_tail_called", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     700          41 :     .Case("objc_boxable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     701          41 :     .Case("objc_bridge", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     702          41 :     .Case("objc_bridge_mutable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     703          41 :     .Case("objc_bridge_related", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     704          41 :     .Case("objc_designated_initializer", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     705          41 :     .Case("objc_exception", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     706          41 :     .Case("objc_protocol_requires_explicit_implementation", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     707          41 :     .Case("objc_gc", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     708          41 :     .Case("objc_independent_class", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     709          41 :     .Case("objc_method_family", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     710          41 :     .Case("NSObject", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     711          41 :     .Case("objc_ownership", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     712          41 :     .Case("objc_precise_lifetime", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     713          41 :     .Case("objc_requires_property_definitions", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     714          41 :     .Case("objc_requires_super", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     715          41 :     .Case("objc_returns_inner_pointer", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     716          41 :     .Case("objc_root_class", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     717          41 :     .Case("objc_runtime_name", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     718          41 :     .Case("objc_runtime_visible", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     719          41 :     .Case("objc_subclassing_restricted", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     720          41 :     .Case("optnone", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     721          41 :     .Case("overloadable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     722          41 :     .Case("ownership_holds", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     723          41 :     .Case("ownership_returns", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     724          41 :     .Case("ownership_takes", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     725          41 :     .Case("ownership_holds", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     726          41 :     .Case("ownership_returns", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     727          41 :     .Case("ownership_takes", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     728          41 :     .Case("ownership_holds", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     729          41 :     .Case("ownership_returns", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     730          41 :     .Case("ownership_takes", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     731          41 :     .Case("pascal", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     732          41 :     .Case("pass_object_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     733          41 :     .Case("preserve_all", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     734          41 :     .Case("preserve_most", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     735          41 :     .Case("swiftcall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     736          41 :     .Case("swift_context", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     737          41 :     .Case("swift_error_result", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     738          41 :     .Case("swift_indirect_result", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     739          41 :     .Case("type_tag_for_datatype", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     740          41 :     .Case("type_visibility", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     741          41 :     .Case("unavailable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     742          41 :     .Case("vectorcall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     743          41 :     .Case("weak_import", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     744          41 :     .Case("xray_always_instrument", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     745          41 :     .Case("xray_never_instrument", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     746          41 :     .Case("xray_always_instrument", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     747          41 :     .Case("xray_never_instrument", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     748          41 :     .Case("xray_log_args", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
     749             :     .Default(0);
     750             : }
     751             : } break;
     752             : }

Generated by: LCOV version 1.13