aboutsummaryrefslogtreecommitdiffstats
path: root/cgrep.cpp
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2020-03-22 05:44:16 +0000
committerbloodstalker <thabogre@gmail.com>2020-03-22 05:44:16 +0000
commita347be5b890ebf696a046cc182c5ccd163c4c571 (patch)
tree7bae89afadea406290e65839e01f28cb2989591d /cgrep.cpp
parentchanged memvar switch to cdecl and added a new switch, cxxdecl. (diff)
downloadcgrep-a347be5b890ebf696a046cc182c5ccd163c4c571.tar.gz
cgrep-a347be5b890ebf696a046cc182c5ccd163c4c571.zip
updated the README. fixed a bug with declrefexpr where it was checking too late whether the match was expanded from a macro which would result in an assertion failure.
Diffstat (limited to 'cgrep.cpp')
-rw-r--r--cgrep.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cgrep.cpp b/cgrep.cpp
index 2aa6575..e259d08 100644
--- a/cgrep.cpp
+++ b/cgrep.cpp
@@ -576,10 +576,10 @@ public:
const NamedDecl *ND = DRE->getFoundDecl();
std::string name = ND->getNameAsString();
SourceLocation SL = DRE->DEVI_GETLOCSTART();
+ SL = Devi::SourceLocationHasMacro(SL, Rewrite, "start");
SourceLocation SLE = SL.getLocWithOffset(name.length() - 1);
// SourceLocation SLE = DRE->DEVI_GETLOCEND();
CheckSLValidity(SL);
- SL = Devi::SourceLocationHasMacro(SL, Rewrite, "start");
if (Devi::IsTheMatchInSysHeader(CO_SYSHDR, MR, SL))
return void();
if (!Devi::IsTheMatchInMainFile(CO_MAINFILE, MR, SL))