[all-commits] [llvm/llvm-project] f3761a: [C++20][Modules] Allow using stdarg.h with header ...

Dmitry Polukhin via All-commits all-commits at lists.llvm.org
Thu Aug 1 02:33:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f3761a4bd320e4334315c87b55f882a4ba864caa
      https://github.com/llvm/llvm-project/commit/f3761a4bd320e4334315c87b55f882a4ba864caa
  Author: Dmitry Polukhin <34227995+dmpolukhin at users.noreply.github.com>
  Date:   2024-08-01 (Thu, 01 Aug 2024)

  Changed paths:
    M clang/lib/Serialization/ASTReader.cpp
    A clang/test/Headers/stdarg-cxx-modules.cpp

  Log Message:
  -----------
  [C++20][Modules] Allow using stdarg.h with header units (#100739)

Summary:
Macro like `va_start`/`va_end` marked as builtin functions that makes
these identifiers special and it results in redefinition of the
identifiers as builtins and it hides macro definitions during preloading
C++ modules. In case of modules Clang ignores special identifiers but
`PP.getCurrentModule()` was not set. This diff fixes IsModule detection
logic for this particular case.

Test Plan: check-clang

---------

Co-authored-by: Chuanqi Xu <yedeng.yd at linux.alibaba.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list