File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
lib/StaticAnalyzer/Checkers/WebKit
test/Analysis/Checkers/WebKit Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -636,6 +636,11 @@ class TrivialFunctionAnalysisVisitor
636636 return true ;
637637 }
638638
639+ bool VisitImplicitValueInitExpr (const ImplicitValueInitExpr *IVIE) {
640+ // An implicit value initialization is trvial.
641+ return true ;
642+ }
643+
639644private:
640645 CacheTy &Cache;
641646 CacheTy RecursiveFn;
Original file line number Diff line number Diff line change @@ -368,6 +368,11 @@ class RefCounted {
368368 }
369369 RefPtr<RefCounted> trivial66 () { return children[0 ]; }
370370 Ref<RefCounted> trivial67 () { return *children[0 ]; }
371+ struct point {
372+ double x;
373+ double y;
374+ };
375+ void trivial68 () { point pt = { 1.0 }; }
371376
372377 static RefCounted& singleton () {
373378 static RefCounted s_RefCounted;
@@ -554,6 +559,7 @@ class UnrelatedClass {
554559 getFieldTrivial ().trivial65 (); // no-warning
555560 getFieldTrivial ().trivial66 ()->trivial6 (); // no-warning
556561 getFieldTrivial ().trivial67 ()->trivial6 (); // no-warning
562+ getFieldTrivial ().trivial68 (); // no-warning
557563
558564 RefCounted::singleton ().trivial18 (); // no-warning
559565 RefCounted::singleton ().someFunction (); // no-warning
You can’t perform that action at this time.
0 commit comments