[all-commits] [llvm/llvm-project] fe2eef: [clang][index] Handle undefined function-like macr...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Wed Apr 9 13:00:38 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fe2eefc4718f57e1753f7bd51c158fc03d70b34f
      https://github.com/llvm/llvm-project/commit/fe2eefc4718f57e1753f7bd51c158fc03d70b34f
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2025-04-09 (Wed, 09 Apr 2025)

  Changed paths:
    M clang/lib/Lex/PPExpressions.cpp
    A clang/test/Index/single-file-parse-undefined-function-like-macro.c

  Log Message:
  -----------
  [clang][index] Handle undefined function-like macros in single file parse mode (#135054)

The single file parse mode is supposed to enter both branches of an
`#if` directive whenever the condition contains undefined identifiers.
This patch adds support for undefined function-like macros, where we
would previously emit an error that doesn't make sense from end-user
perspective.

(I discovered this while working on a very similar feature that parses
single module only and doesn't enter either `#if` branch when the
condition contains undefined identifiers.)



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