[all-commits] [llvm/llvm-project] 2147e9: Add __builtin_FILE_NAME()

IlyaVir via All-commits all-commits at lists.llvm.org
Fri Mar 17 06:53:00 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2147e940e8a8f85f97f28407989c628886b5cd7e
      https://github.com/llvm/llvm-project/commit/2147e940e8a8f85f97f28407989c628886b5cd7e
  Author: Ilya Karapsin <ilya84050 at gmail.com>
  Date:   2023-03-17 (Fri, 17 Mar 2023)

  Changed paths:
    M clang/docs/LanguageExtensions.rst
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/Expr.h
    M clang/include/clang/Basic/TokenKinds.def
    M clang/include/clang/Lex/Preprocessor.h
    M clang/lib/AST/Expr.cpp
    M clang/lib/Lex/PPMacroExpansion.cpp
    M clang/lib/Parse/ParseExpr.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/Preprocessor/feature_tests.c
    M clang/test/Preprocessor/feature_tests.cpp
    M clang/test/Sema/source_location.c
    M clang/test/SemaCXX/Inputs/source-location-file.h
    M clang/test/SemaCXX/source_location.cpp
    M clang/unittests/AST/ASTImporterTest.cpp

  Log Message:
  -----------
  Add __builtin_FILE_NAME()

Add '__builtin_FILE_NAME()', which expands to the filename because the
full path is not always needed. It corresponds to the '__FILE_NAME__'
predefined macro and is consistent with the other '__builin' functions
added for predefined macros.

Differential Revision: https://reviews.llvm.org/D144878




More information about the All-commits mailing list