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

Generated by: LCOV version 1.13