[all-commits] [llvm/llvm-project] a1545f: Warn if using `elifdef` & `elifndef` in not C2x & ...

Ken Matsui via All-commits all-commits at lists.llvm.org
Thu May 12 06:27:02 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a1545f51a9ef299ca6c6716bd80b862f360453ab
      https://github.com/llvm/llvm-project/commit/a1545f51a9ef299ca6c6716bd80b862f360453ab
  Author: Ken Matsui <07softy_bride at icloud.com>
  Date:   2022-05-12 (Thu, 12 May 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticLexKinds.td
    M clang/lib/Lex/PPDirectives.cpp
    M clang/test/Lexer/Inputs/unsafe-macro-2.h
    M clang/test/Lexer/deprecate-macro.c
    M clang/test/Preprocessor/elifdef.c
    A clang/test/Preprocessor/ext-pp-directive.c
    M clang/test/Preprocessor/if_warning.c
    M clang/test/Preprocessor/ifdef-recover.c
    M clang/test/Preprocessor/macro_misc.c
    M clang/test/Preprocessor/macro_vaopt_check.cpp

  Log Message:
  -----------
  Warn if using `elifdef` & `elifndef` in not C2x & C++2b mode

This adds an extension warning when using the preprocessor conditionals
in a language mode they're not officially supported in, and an opt-in
warning for compatibility with previous standards.

Fixes #55306
Differential Revision: https://reviews.llvm.org/D125178




More information about the All-commits mailing list