aboutsummaryrefslogtreecommitdiffstats
path: root/cgrep.cpp
diff options
context:
space:
mode:
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 =