[clang] [Clang] Add warning for non-portable include paths with trailing whitespace or dots (PR #190610)

Amelia Jochna via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 7 09:11:54 PDT 2026


================
@@ -2380,6 +2380,11 @@ Preprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(
   // error.
   if (Filename.empty())
     return {ImportAction::None};
+  if (Filename.ends_with(" ") || Filename.ends_with(".")) {
+    unsigned Selection = Filename.ends_with(".") ? 1 : 0;
----------------
ameliajochna wrote:

Fixed.

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


More information about the cfe-commits mailing list