Summary: Whenever header file is in changed-files-index, it should be captured and analyzed on demand. It was already being captured, but ondemand analysis wasn't triggered for code in header file. This diff does it. Use hacky header->source mapping to go from header to source (cluster) and then analyze everything in that cluster (inlucing code coming from header) Reviewed By: jberdine Differential Revision: D4265495 fbshipit-source-id: 61606f4master
parent
bd0f0cc7fc
commit
0479720c91
@ -1,5 +1,7 @@
|
||||
hello.cpp, test0, 2, NULL_DEREFERENCE, [start of procedure test0()]
|
||||
hello.cpp, test1, 2, NULL_DEREFERENCE, [start of procedure test1(),start of procedure deref1()]
|
||||
lib3.h, test, 1, NULL_DEREFERENCE, [start of procedure test(),start of procedure deref3()]
|
||||
hello.cpp, test0, 2, NULL_DEREFERENCE, [start of procedure test0()]
|
||||
hello.cpp, test1, 2, NULL_DEREFERENCE, [start of procedure test1(),start of procedure deref1()]
|
||||
hello.cpp, test2, 2, NULL_DEREFERENCE, [start of procedure test2(),start of procedure deref2()]
|
||||
lib3.h, test, 1, NULL_DEREFERENCE, [start of procedure test(),start of procedure deref3()]
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required (VERSION 3.1)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
project (HELLO)
|
||||
add_library (Hello hello.cpp lib1.cpp lib2.cpp)
|
||||
add_library (Hello hello.cpp lib1.cpp lib2.cpp lib3.cpp)
|
||||
|
@ -1,2 +1,3 @@
|
||||
hello.cpp
|
||||
lib1.cpp
|
||||
lib3.h
|
||||
|
@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2016 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
#include "lib3.h"
|
||||
|
||||
int deref3(int* p) { return *p; }
|
||||
|
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (c) 2016 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
int deref3(int* p);
|
||||
|
||||
int test() {
|
||||
return deref3(nullptr);
|
||||
}
|
Loading…
Reference in new issue