[all-commits] [llvm/llvm-project] 6503b0: [clang-cl] Fix value of __FUNCTION__ in MSVC mode....

Zahira Ammarguellat via All-commits all-commits at lists.llvm.org
Tue Mar 19 07:56:10 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6503b015d4a8971dcb69a63de7d8d203e4be79b6
      https://github.com/llvm/llvm-project/commit/6503b015d4a8971dcb69a63de7d8d203e4be79b6
  Author: Zahira Ammarguellat <zahira.ammarguellat at intel.com>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/Expr.h
    M clang/lib/AST/DeclPrinter.cpp
    M clang/lib/AST/Expr.cpp
    M clang/lib/AST/TypePrinter.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/Analysis/eval-predefined-exprs.cpp
    M clang/test/SemaCXX/source_location.cpp
    M clang/unittests/AST/DeclPrinterTest.cpp
    M clang/unittests/AST/TypePrinterTest.cpp

  Log Message:
  -----------
  [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (#84014)

Predefined macro FUNCTION in clang is not returning the same string than
MS for templated functions.

See https://godbolt.org/z/q3EKn5zq4

For the same test case MSVC is returning:

function: TestClass::TestClass
function: TestStruct::TestStruct
function: TestEnum::TestEnum

The initial work for this was in the reverted patch
(https://github.com/llvm/llvm-project/pull/66120). This patch solves the
issues raised in the reverted patch.



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