dcoughlin added a comment.

You should add a test covering the added logic in SValBuilder. For example:

  clang_analyzer_eval(__is_trivial(NonTrivial)); // expected-warning {{FALSE}}

And while we're at it, it would be good to add a test for 
UnaryExprOrTypeTraitExpr as well:

  clang_analyzer_eval(__alignof(NonTrivial) > 0); // expected-warning {{TRUE}}

Other than that, looks good to me. Thanks Ismail!


================
Comment at: lib/StaticAnalyzer/Core/SValBuilder.cpp:264
@@ +263,3 @@
+    const TypeTraitExpr *TE = cast<TypeTraitExpr>(E);
+    return makeTruthVal(TE->getValue(), TE->getType());;
+  }
----------------
Extra semi-colon here.


http://reviews.llvm.org/D12482



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to