[PATCH] D47157: Warning for framework headers using double quote includes

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 31 11:32:24 PDT 2018


dexonsmith added inline comments.


================
Comment at: test/Modules/double-quotes.m:24-25
+
+// The same warnings show up when modules is on but -verify doesn't get it
+// because they only show up under the module A building context.
+// RUN: FileCheck --input-file=%t/stderr %s
----------------
Would using an explicit module build make this any easier?


================
Comment at: test/Modules/double-quotes.m:27-29
+// CHECK: double-quoted include "A0.h" in framework header, expected angle-bracketed include <A/A0.h> instead
+// CHECK: double-quoted include "B.h" in framework header, expected angle-bracketed include <B.h> instead
+// CHECK: double-quoted include "B.h" in framework header, expected angle-bracketed include <B.h> instead
----------------
When there's a fixit, you don't need to list it in the warning text (the fix-it itself is sufficient).  I also feel like "quoted include" is as clear as "double-quoted include" (but more succinct).  So I think these would be better as:

> warning: quoted include "..." in framework header, expected angle-bracketed include instead



https://reviews.llvm.org/D47157





More information about the cfe-commits mailing list