GithubHelp home page GithubHelp logo

rizsotto / constantine Goto Github PK

View Code? Open in Web Editor NEW
111.0 111.0 9.0 289 KB

A plugin for Clang compiler

License: GNU General Public License v3.0

CMake 7.51% C++ 90.74% Python 1.75%
checker clang plugin

constantine's People

Contributors

gitter-badger avatar renovate-bot avatar rizsotto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

constantine's Issues

too much warnings

seems that not used variables are got blamed from headers which are included. one option could be to generate warning only on current module.

find most const type declaration

implement a method which returns the most const type of a declaration. this method could have a type declaration like this:

clang::QualType (*f)(clang::QualType declaration, std::set<clang::QualType> usages);

here is the related Clang documentation on types.

function constness check

a member function can not be declared const if,

  • mutate a member variable, which is non mutable
  • call a member function, which is non const
  • were declared as virtual
  • override a virtual member function

port to Clang 3.5

clang::DiagnosticsEngine::getCustomDiagID changed to accept string literals only.
to fix it, we might use clang::DiagnosticsEngine::Report(const StoredDiagnostic &) version, and find out the way to create StoredDiagnostic.

following references are missing

When a reference/pointer is used/modified but the one which was refereed might be not. This case none of these shall be reported as pseudo const.

virtual methods signature shall not mentioned

currently it does blame situation like this:

struct Base {
virtual void method(int &) { }
};

struct MyType : public Base {
void method(int & k) { int const j = k; }
};

this case MyType::method shall not blame to have non const argument

function static check

a member function can not be declared static if,

  • access a member variable
  • call a member function
  • were declared as virtual
  • override a virtual member function

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.