[clang] [NFC] clang add DiagnosticsTestHelper decl (PR #112820)

2024-10-18 Thread Jinsong Ji via cfe-commits
@@ -1024,6 +1024,9 @@ class DiagnosticsEngine : public RefCountedBase { /// @} }; +/// Declare the friend function for testing to avoid GCC warning. jsji wrote: Sure. https://github.com/llvm/llvm-project/pull/112820 ___

[clang] [NFC] clang add DiagnosticsTestHelper decl (PR #112820)

2024-10-18 Thread Jinsong Ji via cfe-commits
https://github.com/jsji updated https://github.com/llvm/llvm-project/pull/112820 >From 53683a8543bb6a558a778dc1cc15adb3180df7e4 Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Fri, 18 Oct 2024 05:23:19 +0200 Subject: [PATCH 1/4] [NFC] clang add DiagnosticsTestHelper decl MIME-Version: 1.0 Conten

[clang] [NFC] clang add DiagnosticsTestHelper decl (PR #112820)

2024-10-18 Thread Erich Keane via cfe-commits
@@ -1024,6 +1024,9 @@ class DiagnosticsEngine : public RefCountedBase { /// @} }; +/// Declare the friend function for testing to avoid GCC warning. erichkeane wrote: couldn't we just put this at the top of the unittest file where this is defined/used? J

[clang] [NFC] clang add DiagnosticsTestHelper decl (PR #112820)

2024-10-18 Thread Jinsong Ji via cfe-commits
https://github.com/jsji updated https://github.com/llvm/llvm-project/pull/112820 >From 53683a8543bb6a558a778dc1cc15adb3180df7e4 Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Fri, 18 Oct 2024 05:23:19 +0200 Subject: [PATCH 1/2] [NFC] clang add DiagnosticsTestHelper decl MIME-Version: 1.0 Conten

[clang] [NFC] clang add DiagnosticsTestHelper decl (PR #112820)

2024-10-17 Thread via cfe-commits
https://github.com/Sirraide commented: It feels a bit weird to put a function that is only used in a test right in the middle of a header, doubly so considering that GCC is the only compiler that doesn’t like it if the only declaration of a function is a friend declaration... https://github.co

[clang] [NFC] clang add DiagnosticsTestHelper decl (PR #112820)

2024-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jinsong Ji (jsji) Changes This is one of the many PRs to fix errors with LLVM_ENABLE_WERROR=on. Built by GCC 11. Fix warning llvm-project/clang/unittests/Basic/DiagnosticTest.cpp:19:6: error: ‘void clang::DiagnosticsTestHelper(clang::Di

[clang] [NFC] clang add DiagnosticsTestHelper decl (PR #112820)

2024-10-17 Thread Jinsong Ji via cfe-commits
https://github.com/jsji created https://github.com/llvm/llvm-project/pull/112820 This is one of the many PRs to fix errors with LLVM_ENABLE_WERROR=on. Built by GCC 11. Fix warning llvm-project/clang/unittests/Basic/DiagnosticTest.cpp:19:6: error: ‘void clang::DiagnosticsTestHelper(clang::Diag