1 // RUN: %clang_cc1 -triple i386-unknown-unknown -Eonly -verify %s 2 3 // We warn users if they write an attribute like 4 // [[__clang__::fallthrough]] because __clang__ is a macro that expands to 1. 5 // Instead, we suggest users use [[_Clang::fallthrough]] in this situation. 6 // However, because __has_cpp_attribute (and __has_c_attribute) require 7 // expanding their argument tokens, __clang__ expands to 1 in the feature test 8 // macro as well. We don't currently give users a kind warning in this case, 9 // but we previously did not expand macros and so this would return 0. Now that 10 // we properly expand macros, users will now get an error about using incorrect 11 // syntax. 12 13 __has_cpp_attribute(__clang__::fallthrough) // expected-error {{missing ')' after <numeric_constant>}} \ 14 // expected-note {{to match this '('}} \ 15 // expected-error {{builtin feature check macro requires a parenthesized identifier}} 16 17