[all-commits] [llvm/llvm-project] e3a795: [clang-format] Exclude kw_decltype in RemoveParent...

Owen via All-commits all-commits at lists.llvm.org
Thu Aug 17 16:05:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e3a79503a30f8c9d8fba79f3e5427bb895f320cf
      https://github.com/llvm/llvm-project/commit/e3a79503a30f8c9d8fba79f3e5427bb895f320cf
  Author: Owen Pan <owenpiano at gmail.com>
  Date:   2023-08-17 (Thu, 17 Aug 2023)

  Changed paths:
    M clang/lib/Format/UnwrappedLineParser.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] Exclude kw_decltype in RemoveParentheses

>From https://en.cppreference.com/w/cpp/language/decltype:
Note that if the name of an object is parenthesized, it is treated as an
ordinary lvalue expression, thus decltype(x) and decltype((x)) are often
different types.

Fixes #64786.

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




More information about the All-commits mailing list