aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mutator_aux.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/mutator_aux.cpp b/mutator_aux.cpp
index 9153004..9eac0dd 100644
--- a/mutator_aux.cpp
+++ b/mutator_aux.cpp
@@ -36,7 +36,7 @@ using namespace clang;
namespace Devi {
/*a simple function that checks the sourcelocations for a macro expansion. returns the sourcelocation without
macro expansion address.*/
-SourceLocation SourceLocationHasMacro (SourceLocation SL, Rewriter &Rewrite, std::string Kind)
+SourceLocation SourceLocationHasMacro [[deprecated("doesnt work")]] (SourceLocation SL, Rewriter &Rewrite, std::string Kind)
{
/*does the sourcelocation include a macro expansion?*/
if ( SL.isMacroID() )
@@ -65,6 +65,18 @@ SourceLocation SourceLocationHasMacro (SourceLocation SL, Rewriter &Rewrite, std
return (SL);
}
+
+SourceLocation SourceLocationHasMacro(SourceLocation __sl, Rewriter &__rewrite)
+{
+ if (__sl.isMacroID())
+ {
+ return __rewrite.getSourceMgr().getSpellingLoc(__sl);
+ }
+ else
+ {
+ return __sl;
+ }
+}
/*********************************************************************************************************************/
/*********************************************************************************************************************/
/*********************************************************************************************************************/