From 1b8b2d8115f5997f3688242a7a70fa23e32fa50f Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sat, 17 Nov 2018 18:18:24 +0330 Subject: update --- cgrep.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cgrep.cpp b/cgrep.cpp index d6bb645..21a2a4e 100644 --- a/cgrep.cpp +++ b/cgrep.cpp @@ -532,6 +532,11 @@ public: const clang::Module *Imported, SrcMgr::CharacteristicKind FileType) { #endif + // FIXME-we are not checking whether the header has been found. + // this callback will be called when there is a header inclusion directive in + // the source file we are running through, not when the header is found. + // if the header is not there, we'll be dereferencing a null pointer somewhere + // and segfault. if (CO_HEADER) { CheckSLValidity(HashLoc); SourceLocation SL = Devi::SourceLocationHasMacro(HashLoc, Rewrite, "start"); -- cgit v1.2.3