[all-commits] [llvm/llvm-project] a57bdc: [clang] Fix leak in LoadFromCommandLineWorkingDire...

Hamish Knight via All-commits all-commits at lists.llvm.org
Fri Jun 30 16:03:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a57bdc8fe68753c341cac0fcecabcd4d35e45466
      https://github.com/llvm/llvm-project/commit/a57bdc8fe68753c341cac0fcecabcd4d35e45466
  Author: Hamish Knight <hamish_knight at apple.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M clang/include/clang/Frontend/ASTUnit.h
    M clang/lib/CrossTU/CrossTranslationUnit.cpp
    M clang/lib/Frontend/ASTUnit.cpp
    M clang/tools/libclang/CIndex.cpp
    M clang/unittests/Frontend/ASTUnitTest.cpp

  Log Message:
  -----------
  [clang] Fix leak in LoadFromCommandLineWorkingDirectory unit test

Change `ASTUnit::LoadFromCommandLine` to return a `std::unique_ptr` instead of a +1 pointer, fixing a leak in the unit test `LoadFromCommandLineWorkingDirectory`.

Reviewed By: bnbarham, benlangmuir

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




More information about the All-commits mailing list