I see Alex already got it, but in the future, that kind of trivial test fix for a failing test is fine to just land, and it is more important to get the bots healthy. =]<br><br><div class="gmail_quote"><div dir="ltr">On Fri, Apr 20, 2018, 22:14 Yan Zhang via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><a href="https://reviews.llvm.org/D45912" target="_blank">https://reviews.llvm.org/D45912</a> need someone to accept <br><br><div>Best regards</div></div><div dir="auto"><div><div>Yan Zhang</div></div></div><div dir="auto"><div><br>On Apr 20, 2018, at 19:08, Chandler Carruth <<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">This has broken most of the build bots. Are you working on a fix or revert?<div><br></div><div>Might be useful to get on the IRC channel to help coordinate this kind of thing.</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Apr 20, 2018 at 4:45 PM Yan Zhang via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: wizard<br>
Date: Fri Apr 20 16:18:09 2018<br>
New Revision: 330492<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=330492&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=330492&view=rev</a><br>
Log:<br>
[clang-tidy] add new check to find out objc ivars which do not have prefix '_'<br>
<br>
Summary:<br>
For code of ivar declaration:<br>
<br>
int barWithoutPrefix;<br>
<br>
The fix will be:<br>
<br>
int _barWithoutPrefix;<br>
<br>
Reviewers: benhamilton, hokein, alexfh, aaron.ballman, ilya-biryukov<br>
<br>
Reviewed By: alexfh<br>
<br>
Subscribers: Eugene.Zelenko, xazax.hun, klimek, mgorny, cfe-commits<br>
<br>
Tags: #clang-tools-extra<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D45392" rel="noreferrer" target="_blank">https://reviews.llvm.org/D45392</a><br>
<br>
Added:<br>
clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming-objc.m<br>
Modified:<br>
clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp<br>
<br>
Modified: clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp?rev=330492&r1=330491&r2=330492&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp?rev=330492&r1=330491&r2=330492&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp (original)<br>
+++ clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp Fri Apr 20 16:18:09 2018<br>
@@ -109,6 +109,7 @@ namespace readability {<br>
m(TemplateParameter) \<br>
m(TypeAlias) \<br>
m(MacroDefinition) \<br>
+ m(ObjcIvar) \<br>
<br>
enum StyleKind {<br>
#define ENUMERATE(v) SK_ ## v,<br>
@@ -384,6 +385,9 @@ static StyleKind findStyleKind(<br>
const NamedDecl *D,<br>
const std::vector<llvm::Optional<IdentifierNamingCheck::NamingStyle>><br>
&NamingStyles) {<br>
+ if (isa<ObjCIvarDecl>(D) && NamingStyles[SK_ObjcIvar])<br>
+ return SK_ObjcIvar;<br>
+<br>
if (isa<TypedefDecl>(D) && NamingStyles[SK_Typedef])<br>
return SK_Typedef;<br>
<br>
<br>
Added: clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming-objc.m<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming-objc.m?rev=330492&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming-objc.m?rev=330492&view=auto</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming-objc.m (added)<br>
+++ clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming-objc.m Fri Apr 20 16:18:09 2018<br>
@@ -0,0 +1,15 @@<br>
+// RUN: %check_clang_tidy %s readability-identifier-naming %t \<br>
+// RUN: -config='{CheckOptions: \<br>
+// RUN: [{key: readability-identifier-naming.ObjcIvarPrefix, value: '_'}]}' \<br>
+// RUN: --<br>
+<br>
+@interface Foo<br>
+@end <br>
+<br>
+@interface Foo () {<br>
+ int _bar;<br>
+ int barWithoutPrefix;<br>
+ // CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for objc ivar 'barWithoutPrefix' [readability-identifier-naming]<br>
+ // CHECK-FIXES: int _barWithoutPrefix;<br>
+}<br>
+@end<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>
</div></blockquote></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>