[clang] [clang-tools-extra] Suppress pedantic diagnostic for a file not ending in EOL (PR #131794)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 18 08:07:07 PDT 2025
================
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++23 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++2c %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// expected-no-diagnostics
+
+// This file intentionally does not end with a newline. CWG787 made this
+// well-defined behavior.
+
+// cwg787: 3.0
----------------
AaronBallman wrote:
Because we accept the code and do the right thing with it? AIUI, the Core Issue was that it went from UB to well-defined behavior, but we diagnose well-defined behavior all the time; it doesn't mean we don't implement the DR, right? (I'm fine with changing the marking, it just wasn't clear to me that any changes were needed to conform to the DR.)
https://github.com/llvm/llvm-project/pull/131794
More information about the cfe-commits
mailing list