[all-commits] [llvm/llvm-project] 7febd7: No longer diagnose __auto_type as the auto extensi...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Thu Apr 3 04:13:51 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7febd78f1e6caacb05ea43fa838a3b2b21fdd0bd
      https://github.com/llvm/llvm-project/commit/7febd78f1e6caacb05ea43fa838a3b2b21fdd0bd
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2025-04-03 (Thu, 03 Apr 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaType.cpp
    M clang/test/SemaCXX/cxx98-compat.cpp

  Log Message:
  -----------
  No longer diagnose __auto_type as the auto extension (#134129)

Given:

  __auto_type x = 12;
  decltype(auto) y = 12;

-Wc++98-compat would diagnose both x and y with:

'auto' type specifier is incompatible with C++98

This patch silences the diagnostic in those cases. decltype(auto) is
still diagnosed with:

'decltype(auto)' type specifier is incompatible with C++ standards
before C++14

as expected but no longer produces the extraneous diagnostic about use
of 'auto'.

Fixes #47900



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