[clang] Extend -Wnonportable-include-path with a warning about trailing whitespace or dots (PR #96960)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 28 04:36:43 PDT 2024
================
@@ -0,0 +1,11 @@
+// REQUIRES: case-insensitive-filesystem
+// RUN: %clang_cc1 -Wall %s
+
+#include "empty_file_to_include.h " // expected-warning {{non-portable path}}
+#include "empty_file_to_include.h." // expected-warning {{non-portable path}}
+#include "empty_file_to_include.h " // expected-warning {{non-portable path}}
+#include "empty_file_to_include.h......." // expected-warning {{non-portable path}}
+#include "empty_file_to_include.h . . . " // expected-warning {{non-portable path}}
+#include "empty_file_to_include.h.. .. " // expected-warning {{non-portable path}}
+
+#include "empty_file_to_include.h" // No warning
----------------
AaronBallman wrote:
Please add a newline to the end of the file.
https://github.com/llvm/llvm-project/pull/96960
More information about the cfe-commits
mailing list