aboutsummaryrefslogtreecommitdiffstats
path: root/cgrep.cpp
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2020-03-06 23:13:00 +0000
committerbloodstalker <thabogre@gmail.com>2020-03-06 23:13:00 +0000
commitf38997774cb41fba555347d5d47a08976362c41b (patch)
treeab20080e06d4db784a6dc78f330784be5dc264fd /cgrep.cpp
parentupdated the man and readme. (diff)
downloadcgrep-f38997774cb41fba555347d5d47a08976362c41b.tar.gz
cgrep-f38997774cb41fba555347d5d47a08976362c41b.zip
coverage
Diffstat (limited to 'cgrep.cpp')
-rw-r--r--cgrep.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/cgrep.cpp b/cgrep.cpp
index c654617..d2039e8 100644
--- a/cgrep.cpp
+++ b/cgrep.cpp
@@ -601,8 +601,9 @@ public:
if (!Devi::IsTheMatchInMainFile(CO_MAINFILE, MR, SL))
return void();
const NamedDecl *ND = CE->getDirectCallee();
- if (ND)
+ if (ND == nullptr) {
return void();
+ }
std::string name = ND->getNameAsString();
if (regex_handler(REGEX_PP(CO_REGEX), name)) {
ast_type_traits::DynTypedNode DTN =
@@ -633,8 +634,9 @@ public:
if (!Devi::IsTheMatchInMainFile(CO_MAINFILE, MR, SL))
return void();
const NamedDecl *ND = CE->getDirectCallee();
- if (ND)
+ if (ND == nullptr) {
return void();
+ }
std::string name = ND->getNameAsString();
if (regex_handler(REGEX_PP(CO_REGEX), name)) {
ast_type_traits::DynTypedNode DNode =