[all-commits] [llvm/llvm-project] 714429: Fix test added in 849de61 to work when the compile...

dyung via All-commits all-commits at lists.llvm.org
Tue Apr 28 12:18:02 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7144296df29ce2487bbae7c83a8b847e8499438b
      https://github.com/llvm/llvm-project/commit/7144296df29ce2487bbae7c83a8b847e8499438b
  Author: dyung <douglas.yung at sony.com>
  Date:   2026-04-28 (Tue, 28 Apr 2026)

  Changed paths:
    M clang/test/APINotes/unsafe-buffer-usage.cpp

  Log Message:
  -----------
  Fix test added in 849de61 to work when the compiler defaults to C++20. (#193361)

Our downstream compiler defaults to C++20 mode which causes the test
added in #189775 to fail due to some additional notes that are emitted
which causes the `-verify` steps to fail.
```
# .---command stderr------------
# | error: 'cpp20-note' diagnostics seen but not expected:                                                                                                                                                                                                                                        
# |   File /home/dyung/src/git/merge/clang/test/APINotes/unsafe-buffer-usage.cpp Line 59: pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions                                                                                                                              
# |   File /home/dyung/src/git/merge/clang/test/APINotes/unsafe-buffer-usage.cpp Line 64: pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions                                                                                                                              
# |   File /home/dyung/src/git/merge/clang/test/APINotes/unsafe-buffer-usage.cpp Line 65: pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions                                                                                                                              
# |   File /home/dyung/src/git/merge/clang/test/APINotes/unsafe-buffer-usage.cpp Line 66: pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions                                                                                                                              
# | 4 errors generated.                                                                                                                                                                                                                                                                           
# `-----------------------------   
```

This change updates the test to work with both C++17 and C++20 by
explicitly testing both modes and adding the extra expected notes when
in C++20 mode.



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