[all-commits] [llvm/llvm-project] dbd82f: [clang] NNS: don't print trailing scope resolution...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Mon Mar 10 05:38:00 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dbd82f33b57814125932dbb84e9449ac05404a6e
      https://github.com/llvm/llvm-project/commit/dbd82f33b57814125932dbb84e9449ac05404a6e
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-03-10 (Mon, 10 Mar 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/NestedNameSpecifier.h
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/AST/ASTDiagnostic.cpp
    M clang/lib/AST/NestedNameSpecifier.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaTemplate.cpp
    M clang/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp
    M clang/test/CXX/class.access/class.access.dcl/p1.cpp
    M clang/test/CXX/class.access/class.friend/p3-cxx0x.cpp
    M clang/test/CXX/class.access/class.friend/p6.cpp
    M clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p3.cpp
    M clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p4.cpp
    M clang/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp
    M clang/test/CXX/drs/cwg14xx.cpp
    M clang/test/CXX/drs/cwg18xx.cpp
    M clang/test/CXX/drs/cwg19xx.cpp
    M clang/test/CXX/drs/cwg1xx.cpp
    M clang/test/CXX/drs/cwg28xx.cpp
    M clang/test/CXX/drs/cwg2xx.cpp
    M clang/test/CXX/drs/cwg3xx.cpp
    M clang/test/CXX/drs/cwg4xx.cpp
    M clang/test/CXX/drs/cwg5xx.cpp
    M clang/test/CXX/drs/cwg6xx.cpp
    M clang/test/CXX/special/class.inhctor/elsewhere.cpp
    M clang/test/CXX/temp/temp.res/temp.dep/p3.cpp
    M clang/test/Parser/cxx-attributes.cpp
    M clang/test/Parser/cxx2c-variadic-friends.cpp
    M clang/test/SemaCXX/PR62533.cpp
    M clang/test/SemaCXX/cxx0x-defaulted-functions.cpp
    M clang/test/SemaCXX/cxx11-user-defined-literals.cpp
    M clang/test/SemaCXX/pr25181-crash-on-invalid.cpp
    M clang/test/SemaCXX/pr36536.cpp
    M clang/test/SemaCXX/using-decl-templates.cpp
    M clang/test/SemaObjCXX/propert-dot-error.mm
    M clang/test/SemaTemplate/friend-template.cpp
    M clang/test/SemaTemplate/ms-sizeof-missing-typename.cpp
    M clang/test/SemaTemplate/nested-template.cpp
    M clang/test/SemaTemplate/qualified-id.cpp
    M clang/test/SemaTemplate/template-id-expr.cpp
    M clang/test/SemaTemplate/typename-specifier-3.cpp

  Log Message:
  -----------
  [clang] NNS: don't print trailing scope resolution operator in diagnostics (#130529)

This clears up the printing of a NestedNameSpecifier so a trailing '::'
is not printed, unless it refers into the global scope.

This fixes a bunch of diagnostics where the trailing :: was awkward.
This also prints the NNS quoted consistenty.

There is a drive-by improvement to error recovery, where now we print
the actual type instead of `<dependent type>`.

This will clear up further uses of NNS printing in further patches.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list