[PATCH] D52253: Fix an assert in the implementation of -Wquoted-include-in-framework-header
Erik Pilkington via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 18 22:26:10 PDT 2018
erik.pilkington updated this revision to Diff 166070.
erik.pilkington added a comment.
Sure, the new patch moves the test to double-quotes.m and gives it a more meaningful name.
Thanks!
https://reviews.llvm.org/D52253
Files:
clang/lib/Lex/HeaderSearch.cpp
clang/test/Modules/Inputs/double-quotes/NotAFramework/Headers/Headers/Thing1.h
clang/test/Modules/Inputs/double-quotes/NotAFramework/Headers/Headers/Thing2.h
clang/test/Modules/double-quotes.m
Index: clang/test/Modules/double-quotes.m
===================================================================
--- clang/test/Modules/double-quotes.m
+++ clang/test/Modules/double-quotes.m
@@ -32,6 +32,9 @@
#import "A.h"
#import <Z/Z.h>
+// rdar://43692300
+#import "NotAFramework/Headers/Headers/Thing1.h"
+
int bar() { return foo(); }
// expected-warning at Inputs/double-quotes/A.framework/Headers/A.h:1{{double-quoted include "A0.h" in framework header, expected angle-bracketed instead}}
Index: clang/test/Modules/Inputs/double-quotes/NotAFramework/Headers/Headers/Thing2.h
===================================================================
--- /dev/null
+++ clang/test/Modules/Inputs/double-quotes/NotAFramework/Headers/Headers/Thing2.h
@@ -0,0 +1 @@
+// Empty file!
Index: clang/test/Modules/Inputs/double-quotes/NotAFramework/Headers/Headers/Thing1.h
===================================================================
--- /dev/null
+++ clang/test/Modules/Inputs/double-quotes/NotAFramework/Headers/Headers/Thing1.h
@@ -0,0 +1 @@
+#include "Thing2.h"
Index: clang/lib/Lex/HeaderSearch.cpp
===================================================================
--- clang/lib/Lex/HeaderSearch.cpp
+++ clang/lib/Lex/HeaderSearch.cpp
@@ -648,7 +648,7 @@
++I;
}
- return FoundComp >= 2;
+ return !FrameworkName.empty() && FoundComp >= 2;
}
static void
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52253.166070.patch
Type: text/x-patch
Size: 1373 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180919/1e8efc41/attachment.bin>
More information about the cfe-commits
mailing list