aboutsummaryrefslogtreecommitdiffstats
path: root/cgrep.cpp
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-11-17 14:48:24 +0000
committerbloodstalker <thabogre@gmail.com>2018-11-17 14:48:24 +0000
commit1b8b2d8115f5997f3688242a7a70fa23e32fa50f (patch)
treef8f8d6e89556562a9634f4946be91d9f9271cfb4 /cgrep.cpp
parentreadme build update (diff)
downloadcgrep-1b8b2d8115f5997f3688242a7a70fa23e32fa50f.tar.gz
cgrep-1b8b2d8115f5997f3688242a7a70fa23e32fa50f.zip
update
Diffstat (limited to 'cgrep.cpp')
-rw-r--r--cgrep.cpp5
1 files changed, 5 insertions, 0 deletions
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");