[clang] [clang-tools-extra] Suppress pedantic diagnostic for a file not ending in EOL (PR #131794)

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 18 05:48:41 PDT 2025


================
@@ -1,11 +1,16 @@
-// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof -verify %s
-// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
-// RUN: %clang_cc1 -fsyntax-only -x c++ -std=c++03 -pedantic -verify %s
-// RUN: %clang_cc1 -fsyntax-only -Wnewline-eof %s 2>&1 | FileCheck %s
+// Allowing a file to end without a newline was adopted as a Defect Report in
+// WG21 (CWG787) and in WG14 (added to the list of changes which apply to
----------------
cor3ntin wrote:

Can you add a test in the appropriate c++ dr test file ?
I'm happy  with just adding // dr787 : yes + a comment pointing to this test file
(+ rebuilding cxx_dr_status)

https://github.com/llvm/llvm-project/pull/131794


More information about the cfe-commits mailing list