<div dir="ltr">btw due to the lack of way to testing it on bot environments, I am not sure if specify fobjc-abo-version=2 could solve the problem (could it break builds on 32-bit machines or just skip them). So I played safe to use the old way of declaring ivars in the revision.</div><br><div class="gmail_quote"><div dir="ltr">On Sun, Apr 22, 2018 at 5:55 PM Yan Zhang <<a href="mailto:ynzhang@google.com">ynzhang@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am running tests locally with "<span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px">ninja check-clang-tools</span>" and I am sure it is running this test because I could get error message when I debug it.<div><br></div><div>The problem (according to the error message) is all caused by different architecture. It seems a lot of ObjC features are not supported in old 32-bit OSX (which I believe the test bots are using). I have another revision sent out to see if it can help. Can you take a quick look? <a href="https://reviews.llvm.org/D45936" target="_blank">https://reviews.llvm.org/D45936</a></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Apr 22, 2018 at 5:51 PM Chandler Carruth <<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The commit log here no longer reflects the commit. This is not just updating the test, this is a complete re-application of the original patch in r330492. =[<div><br></div><div>Also, the bots are still complaining:</div><div><a href="http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/17830" target="_blank">http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/17830</a></div><div><a href="http://lab.llvm.org:8011/builders/clang-cmake-armv8-quick/builds/1979" target="_blank">http://lab.llvm.org:8011/builders/clang-cmake-armv8-quick/builds/1979</a></div><div><a href="http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/11659" target="_blank">http://lab.llvm.org:8011/builders/clang-ppc64le-linux-lnt/builds/11659</a><br></div><div><br></div><div>I'm not sure how you're running your tests that you don't see these issues, but they seem to reproduce on many build bots and the error message doesn't seem to be architecture specific at all...</div><div><br></div><div>I suspect something about how you are trying to run tests isn't actually running this test if you aren't able to locally reproduce.</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Apr 22, 2018 at 5:19 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: Sun Apr 22 17:15:15 2018<br>
New Revision: 330559<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=330559&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=330559&view=rev</a><br>
Log:<br>
update test to use ivar in implementation instead of class extension<br>
<br>
Summary: using ivar in class extension is not supported in 32-bit architecture of MacOS.<br>
<br>
Reviewers: alexfh, hokein<br>
<br>
Reviewed By: alexfh<br>
<br>
Subscribers: klimek, cfe-commits<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D45912" rel="noreferrer" target="_blank">https://reviews.llvm.org/D45912</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=330559&r1=330558&r2=330559&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp?rev=330559&r1=330558&r2=330559&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 Sun Apr 22 17:15:15 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=330559&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=330559&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 Sun Apr 22 17:15:15 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>
+@implementation 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>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-780353264203617112gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Best regards<div>Yan Zhang</div></div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Best regards<div>Yan Zhang</div></div></div>