[all-commits] [llvm/llvm-project] cca10b: [clangd] Fix a crash bug in AddUsing tweak around ...

Adam Czachorowski via All-commits all-commits at lists.llvm.org
Wed Apr 8 04:59:53 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cca10be3f60dd30055acc70d117649f889da779d
      https://github.com/llvm/llvm-project/commit/cca10be3f60dd30055acc70d117649f889da779d
  Author: Adam Czachorowski <adamcz at google.com>
  Date:   2020-04-08 (Wed, 08 Apr 2020)

  Changed paths:
    M clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
    M clang-tools-extra/clangd/unittests/TweakTests.cpp

  Log Message:
  -----------
  [clangd] Fix a crash bug in AddUsing tweak around template handling.

Summary:
The crash happened on cases like:
template<typename TT> using one = two::three<T^T>;
because we tried to call getName() on getBaseTypeIdentifier(), which can
be nullptr.

Ideally we would support this use case as well, but for now not crashing
will do.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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




More information about the All-commits mailing list