[PATCH] D85033: [clang] Provide a better name for unnamed parameters, lambda classes and lambda captures.

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 31 09:02:52 PDT 2020


riccibruno created this revision.
riccibruno added reviewers: erichkeane, rsmith.
riccibruno added a project: clang.
Herald added subscribers: cfe-commits, arphaman.
riccibruno requested review of this revision.

As a follow up to D84658 <https://reviews.llvm.org/D84658>:

For an unnamed parameter: `(unnamed variable at {{.*}}:<line>:<col> of type <type>)` -> `(unnamed parameter at {{.*}}:<line>:<col> of type <type>)`.

For a lambda object: `(unnamed class at {{.*}}:<line>:<col>)` -> `(lambda at {{.*}}:<line>:<col>)`.

For a variable captured in a lambda-capture: `(unnamed field at {{.*}}:<line>:<col> of type <type>)` -> pretty-printed name of the captured variable (except for now in the uncommon case of a captured VLA; see the comment).

I have also added unit tests for the changes in D84658 <https://reviews.llvm.org/D84658>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85033

Files:
  clang/lib/AST/Decl.cpp
  clang/test/AST/ast-dump-record-definition-data-json.cpp
  clang/test/Analysis/explain-svals.cpp
  clang/test/Index/annotate-tokens.cpp
  clang/test/Index/linkage.c
  clang/test/Index/load-decls.c
  clang/test/Index/load-namespaces.cpp
  clang/test/Index/preamble.c
  clang/test/Index/print-type.c
  clang/test/Index/print-type.cpp
  clang/test/Index/recursive-cxx-member-calls.cpp
  clang/test/Index/usrs.m
  clang/test/Modules/module-private.cpp
  clang/test/SemaCXX/lambda-expressions.cpp
  clang/test/SemaCXX/warn-large-by-value-copy.cpp
  clang/test/Tooling/clang-diff-ast.cpp
  clang/unittests/AST/ASTTraverserTest.cpp
  clang/unittests/AST/NamedDeclPrinterTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85033.282227.patch
Type: text/x-patch
Size: 43882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200731/7bf60ed2/attachment-0001.bin>


More information about the cfe-commits mailing list