<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
This is a fairly normal compiler error and you should investigate it
as such.<br>
<br>
It might be caused by clang being passed incorrect flags from
scan-build. It may also be caused by clang you're using for analysis
being too old.<br>
<br>
Does the project build fine without scan-build? I.e., just
"xcodebuild ...".<br>
<br>
What's the first reported error?<br>
<br>
Also note that xcodebuild prints all compile commands to standard
output. This means that you can easily investigate this compile
error in isolation from scan-build.<br>
<br>
<div class="moz-cite-prefix">On 6/27/20 8:13 PM, 1789955632 via
cfe-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:tencent_5060A36D2D16D0EA4D15B25DC80F8A007409@qq.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div>hi,</div>
<div>I used clang(v-8.0) scan-build to build a real OC project,
which contains c/cpp/oc code files. Command is "scan-build
xcodebuild -workspace .... " , and an error occurs when build
cpp files. Here is the error message:</div>
<div><br>
</div>
<div>/**a.cpp**/</div>
<div>struct person{</div>
<div> char name;</div>
<div> char tel;</div>
<div> .....</div>
<div>}</div>
<div>....</div>
<div>....</div>
<div>person p ={..}</div>
<div>p.name = ...</div>
<div>p.tel = ...</div>
<div>/**a.cpp**/</div>
<div><br>
</div>
<div> <b>error: <span style=" background-color: rgb(51, 48,
48); color: rgb(255, 255, 255); ; ; ; ; ">no member named
'name' in 'person'</span></b></div>
<div><b> error: <span style=" background-color: rgb(51, 48, 48);
color: rgb(255, 255, 255); ; ; ; ; ">no member named 'tel'
in 'person'</span></b></div>
<div><b> ......</b></div>
<div><b> </b><span style=" background-color: rgb(51, 48, 48);
color: rgb(255, 255, 255); ; ; ; ; "></span><span style="
background-color: rgb(30, 30, 30); color: rgb(255, 255, 255);
; ; ; ; ">fatal error: too many errors emitted, stopping now
[-ferror-limit=]</span></div>
<div><span style=" color: rgb(255, 255, 255); ; ; ; ; ; ">
Command AnalyzeShallow failed with a nonzero exit code</span></div>
<div><br>
</div>
<div>and build failed. I tried to use -ferror-limit=0 to no limit
errors, but it still build failed with many such errors.</div>
<div>What's the problem? And how to solve it?</div>
<div>Thanks.</div>
<div><span style=" background-color: rgb(51, 48, 48); color:
rgb(255, 255, 255); ; ; ; ; "><br>
</span></div>
<div><span style=" background-color: rgb(51, 48, 48); color:
rgb(255, 255, 255); ; ; ; ; "><br>
</span></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>