Define STATIC_ANALYSIS macro when using glog/logging.h

Summary:
There is nice hook inside glog/logging.h for all CHECK_(GT|LT|GE|...) macros.
This simplifies AST significantly which makes infer way more happy:
cda16b3443/src/glog/logging.h.in (L722-L724)

Reviewed By: jberdine

Differential Revision: D3522110

fbshipit-source-id: 70c94cb
master
Andrzej Kotulski 9 years ago committed by Facebook Github Bot
parent 9b07a3e762
commit d1fa1e130d

@ -0,0 +1,20 @@
/*
* 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.
*/
// glog/logging library has functionally equivalent but simpler
// definitions of some CHECK_* macros when STATIC_ANALYSIS is defined.
// Since infer wants those definitions, define the macro before including
// glog/logging.h
#ifndef STATIC_ANALYSIS
#define STATIC_ANALYSIS
#include_next <glog/logging.h>
#undef STATIC_ANALYSIS
#else
#include_next <glog/logging.h>
#endif

@ -59,12 +59,6 @@ let whitelisted_cpp_methods = [
["std"; "max"]; ["std"; "max"];
["std"; "__less"]; ["std"; "__less"];
["google"; "CheckNotNull"]; ["google"; "CheckNotNull"];
["google"; "GetReferenceableValue"];
["google"; "Check_NEImpl"];
["google"; "Check_LEImpl"];
["google"; "Check_GTImpl"];
["google"; "Check_GEImpl"];
["google"; "Check_EQImpl"]
] ]

Loading…
Cancel
Save