r199307 - Switch this test from needlessly running the clang driver to directly

Jordan Rose jordan_rose at apple.com
Wed Jan 15 09:06:17 PST 2014


--analyze includes a bunch of default checkers, including "core", so changing alpha.core to core is a different change. Usually tests like this are intended to say "do things break under the default configuration but with the alpha checkers on". For this particular test, using the more targeted -cc1 -analyzer-checker is probably okay, but the more integration-y analyzer tests should not be switched.

You're right that there are no tests for noreturn itself, but analyzer_noreturn and things the analyzer treats as noreturn (NSExceptions) are indeed tested here.


On Jan 15, 2014, at 1:07 , Chandler Carruth <chandlerc at gmail.com> wrote:

> Author: chandlerc
> Date: Wed Jan 15 03:07:56 2014
> New Revision: 199307
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=199307&view=rev
> Log:
> Switch this test from needlessly running the clang driver to directly
> test the CC1 layer.
> 
> This actually uncovered that the test semes to no longer be passing for
> the reasons intended. =[ The name of the test would lead me to believe
> that it should be testing the semantics of noreturn in the static
> analyzer.... but there are in fact no -verify assertions about noreturn
> that i can find. And the noreturn checker is no longer in 'alpha.core'.
> It is in 'core.builtins'. The test *does* have one assertion for a null
> dereference warning. This *also* isn't in 'alpha.core', but the driver
> inserts a pile of other checker packages, including 'core' which has
> this warning.
> 
> So I have switch the RUN line to actually do the minimal thing that this
> test currently exercises, but someone who works on the static analyzer
> should probably look at this and either nuke it or move it to actually
> check the noreturn behavior.
> 
> Modified:
>    cfe/trunk/test/Analysis/NoReturn.m
> 
> Modified: cfe/trunk/test/Analysis/NoReturn.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/NoReturn.m?rev=199307&r1=199306&r2=199307&view=diff
> ==============================================================================
> --- cfe/trunk/test/Analysis/NoReturn.m (original)
> +++ cfe/trunk/test/Analysis/NoReturn.m Wed Jan 15 03:07:56 2014
> @@ -1,4 +1,4 @@
> -// RUN: %clang --analyze -Xclang -analyzer-checker=alpha.core -Xclang -verify %s
> +// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s
> 
> #include <stdarg.h>
> 
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list