Summary:
New clang in the plugin \o/
Changes that were needed:
- (minor) Some extra AST nodes
- defining a lambda and calling it in the same line (`[&x]() { x = 1; }()`) used to get translated as a call of the literal but now an intermediate variable gets created, which confuses uninit in one test. I added another test to showcase the limitation this is hitting: storing the lambda in a variable then calling it will not get caught by the checker.
The controller you requested could not be found.: facebook-clang-plugins
Reviewed By: jeremydubreil
Differential Revision: D10128626
fbshipit-source-id: 8ffd19f3c
master
Jules Villard6 years agocommitted byFacebook Github Bot
codetoanalyze/cpp/errors/models/cmp.cpp, std_not_equal_to_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure std_not_equal_to_bad(),Condition is false,Taking true branch]
codetoanalyze/cpp/errors/models/move.cpp, move::div0_moved_from, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure move::div0_moved_from(),start of procedure X,return from a call to move::X_X,start of procedure X,return from a call to move::X_X]
codetoanalyze/cpp/errors/models/move.cpp, move::div0_moved_to, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure move::div0_moved_to(),start of procedure X,return from a call to move::X_X,start of procedure X,return from a call to move::X_X]
codetoanalyze/cpp/errors/models/pair.cpp, pair::deref_pair_null0_bad, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure pair::deref_pair_null0_bad(),start of procedure pair::pairOfZeroNull(),return from a call to pair::pairOfZeroNull]
codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_ok, 2, MEMORY_LEAK, CPP, ERROR, [start of procedure deref_after_mode_example::deref_ok(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure access_age,return from a call to deref_after_mode_example::Person_access_age,start of procedure ~Person,start of procedure __infer_inner_destructor_~Person,return from a call to deref_after_mode_example::Person___infer_inner_destructor_~Person,return from a call to deref_after_mode_example::Person_~Person]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::aliasing_member_null_bad, 4, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr_constructors::aliasing_member_null_bad(),start of procedure shared_ptr_constructors::aliasing_construct_from_internal(),start of procedure shared_ptr_constructors::internal_null_def(),Skipping shared_ptr_constructors::external_def(): method has no implementation,return from a call to shared_ptr_constructors::internal_null_def,Taking false branch,return from a call to shared_ptr_constructors::aliasing_construct_from_internal]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base1_null_f1_deref, 6, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr_constructors::get_from_base1_null_f1_deref(),start of procedure Base,return from a call to shared_ptr_constructors::Base_Base,start of procedure shared_ptr_constructors::getFromBase1(),return from a call to shared_ptr_constructors::getFromBase1]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base1_nullptr_deref, 0, NULL_DEREFERENCE, B5, ERROR, [start of procedure shared_ptr_constructors::get_from_base1_nullptr_deref(),start of procedure shared_ptr_constructors::getFromBase1(),return from a call to shared_ptr_constructors::getFromBase1]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base1_nullptr_deref, 0, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr_constructors::get_from_base1_nullptr_deref(),start of procedure shared_ptr_constructors::getFromBase1(),return from a call to shared_ptr_constructors::getFromBase1,start of procedure Base]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base2_null_f1_deref, 6, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr_constructors::get_from_base2_null_f1_deref(),start of procedure Base,return from a call to shared_ptr_constructors::Base_Base,start of procedure shared_ptr_constructors::getFromBase2(),return from a call to shared_ptr_constructors::getFromBase2]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base2_nullptr_deref, 0, NULL_DEREFERENCE, B5, ERROR, [start of procedure shared_ptr_constructors::get_from_base2_nullptr_deref(),start of procedure shared_ptr_constructors::getFromBase2(),return from a call to shared_ptr_constructors::getFromBase2]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base2_nullptr_deref, 0, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr_constructors::get_from_base2_nullptr_deref(),start of procedure shared_ptr_constructors::getFromBase2(),return from a call to shared_ptr_constructors::getFromBase2,start of procedure Base]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_derived1_null_f1_deref, 6, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr_constructors::get_from_derived1_null_f1_deref(),start of procedure Derived,start of procedure Base,return from a call to shared_ptr_constructors::Base_Base,return from a call to shared_ptr_constructors::Derived_Derived,start of procedure shared_ptr_constructors::getFromDerived1(),return from a call to shared_ptr_constructors::getFromDerived1]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_derived1_nullptr_deref, 0, NULL_DEREFERENCE, B5, ERROR, [start of procedure shared_ptr_constructors::get_from_derived1_nullptr_deref(),start of procedure shared_ptr_constructors::getFromDerived1(),return from a call to shared_ptr_constructors::getFromDerived1]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_derived1_nullptr_deref, 0, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr_constructors::get_from_derived1_nullptr_deref(),start of procedure shared_ptr_constructors::getFromDerived1(),return from a call to shared_ptr_constructors::getFromDerived1,start of procedure Base]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_derived2_null_f1_deref, 6, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr_constructors::get_from_derived2_null_f1_deref(),start of procedure Derived,start of procedure Base,return from a call to shared_ptr_constructors::Base_Base,return from a call to shared_ptr_constructors::Derived_Derived,start of procedure shared_ptr_constructors::getFromDerived2(),return from a call to shared_ptr_constructors::getFromDerived2]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_derived2_nullptr_deref, 0, NULL_DEREFERENCE, B5, ERROR, [start of procedure shared_ptr_constructors::get_from_derived2_nullptr_deref(),start of procedure shared_ptr_constructors::getFromDerived2(),return from a call to shared_ptr_constructors::getFromDerived2]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_derived2_nullptr_deref, 0, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr_constructors::get_from_derived2_nullptr_deref(),start of procedure shared_ptr_constructors::getFromDerived2(),return from a call to shared_ptr_constructors::getFromDerived2,start of procedure Base]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_derived3_null_f1_deref, 6, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr_constructors::get_from_derived3_null_f1_deref(),start of procedure Derived,start of procedure Base,return from a call to shared_ptr_constructors::Base_Base,return from a call to shared_ptr_constructors::Derived_Derived,start of procedure shared_ptr_constructors::getFromDerived3(),return from a call to shared_ptr_constructors::getFromDerived3]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_derived3_nullptr_deref, 0, NULL_DEREFERENCE, B5, ERROR, [start of procedure shared_ptr_constructors::get_from_derived3_nullptr_deref(),start of procedure shared_ptr_constructors::getFromDerived3(),return from a call to shared_ptr_constructors::getFromDerived3]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_derived3_nullptr_deref, 0, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr_constructors::get_from_derived3_nullptr_deref(),start of procedure shared_ptr_constructors::getFromDerived3(),return from a call to shared_ptr_constructors::getFromDerived3,start of procedure Base]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_deref.cpp, shared_ptr::empty_ptr_deref, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr::empty_ptr_deref()]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_deref.cpp, shared_ptr::empty_ptr_field_deref, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr::empty_ptr_field_deref()]
codetoanalyze/cpp/errors/smart_ptr/shared_ptr_deref.cpp, shared_ptr::empty_ptr_field_deref2, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure shared_ptr::empty_ptr_field_deref2()]