[all-commits] [llvm/llvm-project] d930ed: Disallow use of __has_c_attribute in C++ mode.

AaronBallman via All-commits all-commits at lists.llvm.org
Mon Nov 25 14:35:27 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d930ed1acc0ea49d4b3aae7e95b4c6d9cd310578
      https://github.com/llvm/llvm-project/commit/d930ed1acc0ea49d4b3aae7e95b4c6d9cd310578
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2019-11-25 (Mon, 25 Nov 2019)

  Changed paths:
    M clang/lib/Lex/PPMacroExpansion.cpp
    M clang/test/Preprocessor/has_c_attribute.c
    A clang/test/Preprocessor/has_c_attribute.cpp

  Log Message:
  -----------
  Disallow use of __has_c_attribute in C++ mode.

__has_cpp_attribute is not available in C mode, and __has_c_attribute
should not be available in C++ mode. This also adds a test to
demonstrate that we properly handle scoped attribute tokens even in C
mode.




More information about the All-commits mailing list