1' Copyright (c) 2021-2022 Huawei Device Co., Ltd. 2' Licensed under the Apache License, Version 2.0 (the "License"); 3' you may not use this file except in compliance with the License. 4' You may obtain a copy of the License at 5' 6' http://www.apache.org/licenses/LICENSE-2.0 7' 8' Unless required by applicable law or agreed to in writing, software 9' distributed under the License is distributed on an "AS IS" BASIS, 10' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11' See the License for the specific language governing permissions and 12' limitations under the License. 13 14@startuml 15skinparam monochrome true 16title Creation of files with warnings 17 18start; 19while (iterate over Translation units) 20 :Translation unit; 21 -> 22 :Clang frontend; 23 ->build AST and build CFG; 24 :Clang frontend - Clang Static Analyzer stage; 25 ->build Exploded Graph(symbolic execution of CFG); 26 while (iterate over called functions) 27 if (function in GC FUNCTION LIST) 28 :Apply path-sensitive checker for detection usage 29 raw pointers of ObjectHeader after calling the function: 30 - detect and mark memory regions for ObjectHeader 31 - in case of calling function from GC FUNCTION LIST, mark regions as not safe 32 - in case if it is a store to raw pointer - mark it as safe 33 - in case of reading from them(except cast to bool) generate warning; 34 endif 35 endwhile 36 :Write warnings to the file; 37endwhile 38stop; 39@enduml 40