[all-commits] [llvm/llvm-project] c4fb77: PR48339: Improve diagnostics for invalid dependent...

Richard Smith via All-commits all-commits at lists.llvm.org
Wed Dec 2 18:00:27 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c4fb7720ceb30f25c38d994fb375e4d1978de144
      https://github.com/llvm/llvm-project/commit/c4fb7720ceb30f25c38d994fb375e4d1978de144
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-12-02 (Wed, 02 Dec 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/test/CXX/drs/dr2xx.cpp
    M clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
    M clang/test/SemaTemplate/cxx1z-using-declaration.cpp
    M clang/test/SemaTemplate/dependent-names.cpp
    M clang/test/SemaTemplate/dependent-typos-recovery.cpp
    M clang/test/SemaTemplate/ms-lookup-template-base-classes.cpp
    M clang/test/SemaTemplate/recovery-crash.cpp

  Log Message:
  -----------
  PR48339: Improve diagnostics for invalid dependent unqualified function calls.

Fix bogus diagnostics that would get confused and think a "no viable
fuctions" case was an "undeclared identifiers" case, resulting in an
incorrect diagnostic preceding the correct one. Use overload resolution
to determine which function we should select when we can find call
candidates from a dependent base class. Make the diagnostics for a call
that could call a function from a dependent base class more specific,
and use a different diagnostic message for the case where the call
target is instead declared later in the same class. Plus some minor
diagnostic wording improvements.




More information about the All-commits mailing list