llvm-project
7144296d - Fix test added in 849de61 to work when the compiler defaults to C++20. (#193361)

Commit
13 days ago
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.
Author
Parents
Loading