News for hackers. Stuff that matters.
Re:New things in clang land (5.0.0) by jhasse on Thursday December 07, 2017 @06:29AM (#15869200)
> it should be flagged or not compiled.

It will be, if you use clang-tidy (or clang's static analyzer):

    $ clang-tidy main.cpp -- -std=c++14
    1 warning generated.
    main.cpp:10:5: warning: Forming reference to null pointer [clang-analyzer-core.NonNullParamChecker]
        f_unused_parameter(*i);
        ^
    main.cpp:19:7: note: Passing null pointer value via 1st parameter 'i'
        f(nullptr);
        ^
    main.cpp:19:5: note: Calling 'f'
        f(nullptr);
        ^
    main.cpp:10:5: note: Forming reference to null pointer
        f_unused_parameter(*i);
        ^

There are no comments on this comment yet.