[all-commits] [llvm/llvm-project] 32db24: [clang] Provide a more specific diagnostic for a m...

Bruno Ricci via All-commits all-commits at lists.llvm.org
Sat Jul 18 12:46:14 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 32db24a7f24236d78beaeb5cfd96b115d67a5c21
      https://github.com/llvm/llvm-project/commit/32db24a7f24236d78beaeb5cfd96b115d67a5c21
  Author: Bruno Ricci <riccibrun at gmail.com>
  Date:   2020-07-18 (Sat, 18 Jul 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticParseKinds.td
    M clang/lib/Parse/ParseExprCXX.cpp
    A clang/test/Parser/lambda-misplaced-capture-default.cpp

  Log Message:
  -----------
  [clang] Provide a more specific diagnostic for a misplaced lambda capture-default.

Currently a capture-default which is not the first element in the lambda-capture
is diagnosed with a generic expected variable name or 'this' in lambda capture
list, which is true but not very helpful.

If we don't have already parsed a capture-default then a lone "&" or "=" is
likely to be a misplaced capture-default, so diagnose it as such.

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

Reviewed By: aaron.ballman


  Commit: be8e5fee91b44522056f1e780cdc861427f8738f
      https://github.com/llvm/llvm-project/commit/be8e5fee91b44522056f1e780cdc861427f8738f
  Author: Bruno Ricci <riccibrun at gmail.com>
  Date:   2020-07-18 (Sat, 18 Jul 2020)

  Changed paths:
    M clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p7.cpp
    M clang/test/SemaCXX/attr-unused.cpp
    M clang/test/SemaCXX/default2.cpp
    M clang/test/SemaCXX/incomplete-call.cpp
    M clang/test/SemaCXX/lambda-expressions.cpp

  Log Message:
  -----------
  [clang][NFC] Tests showing the problems with some uses of NamedDecl::getDeclName in diagnostics, SemaExpr.cpp part


  Commit: acf3bdc283ecf6e2c3a85a391a24becc4814b8b8
      https://github.com/llvm/llvm-project/commit/acf3bdc283ecf6e2c3a85a391a24becc4814b8b8
  Author: Bruno Ricci <riccibrun at gmail.com>
  Date:   2020-07-18 (Sat, 18 Jul 2020)

  Changed paths:
    M clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.noreturn/p1.cpp
    A clang/test/Sema/return-non-void.c
    M clang/test/SemaCXX/constant-expression-cxx11.cpp
    A clang/test/SemaCXX/consteval-return-void.cpp
    A clang/test/SemaCXX/return-void.cpp
    M clang/test/SemaCXX/return.cpp
    M clang/test/SemaCXX/warn-pure-virtual-call-from-ctor-dtor.cpp
    M clang/test/SemaCXX/warn-pure-virtual-kext.cpp
    A clang/test/SemaObjC/method-return-void.m

  Log Message:
  -----------
  [clang][NFC] Tests showing the problems with some uses of NamedDecl::getDeclName in diagnostics, SemaOverload.cpp+SemaStmt.cpp part


Compare: https://github.com/llvm/llvm-project/compare/cbff0c75b9ea...acf3bdc283ec


More information about the All-commits mailing list