diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp --- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -408,6 +408,12 @@ // Count naming convention errors more aggressively. if (isa(D)) return false; + + // If a function with a _Nullable parameter has at least one caller, the + // checker behaves as though no other parameter value is possible. This is + // because the static analyzer doesn't re-analyse functions as top level. + return false; + // We also want to reanalyze all C++ copy and move assignment operators to // separately check the two cases where 'this' aliases with the parameter and // where it may not. (cplusplus.SelfAssignmentChecker)