File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
lib/StaticAnalyzer/Checkers/WebKit
test/Analysis/Checkers/WebKit Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -666,6 +666,13 @@ class TrivialFunctionAnalysisVisitor
666
666
return IsFunctionTrivial (Callee);
667
667
}
668
668
669
+ bool VisitGCCAsmStmt (const GCCAsmStmt *AS) {
670
+ auto *Asm = AS->getAsmString ();
671
+ if (!Asm)
672
+ return false ;
673
+ return Asm->getString () == " brk #0xc471" ;
674
+ }
675
+
669
676
bool
670
677
VisitSubstNonTypeTemplateParmExpr (const SubstNonTypeTemplateParmExpr *E) {
671
678
// Non-type template paramter is compile time constant and trivial.
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_analyze_cc1 -triple arm-darwin -analyzer-checker=alpha.webkit.UncountedCallArgsChecker -verify %s
2
+ // expected-no-diagnostics
3
+
4
+ void crash ()
5
+ {
6
+ __asm__ volatile (" brk #0xc471" );
7
+ __builtin_unreachable ();
8
+ }
9
+
10
+ class SomeObj {
11
+ public:
12
+ void ref ();
13
+ void deref ();
14
+
15
+ void someWork () { crash (); }
16
+ };
17
+
18
+ SomeObj* provide ();
19
+
20
+ void doSomeWork () {
21
+ provide ()->someWork ();
22
+ }
You can’t perform that action at this time.
0 commit comments