summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/rtlconstasciimacro.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-05-31 18:50:15 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-05-31 20:00:54 +0200
commitb0a650ff8ab553bf3a86f4dfd85b481ef10bbdff (patch)
tree21034207ff07e7ff3eda5d5231e8b8f8d224047e /compilerplugins/clang/rtlconstasciimacro.cxx
parenta0d320096ceadc64f2b3b1022a3e52f307a4d0f2 (diff)
update for PPCallbacks API changes in Clang3.3
Change-Id: I8493afa8e2264a42fba090c9c72f36f36cb2d165
Diffstat (limited to 'compilerplugins/clang/rtlconstasciimacro.cxx')
-rw-r--r--compilerplugins/clang/rtlconstasciimacro.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/compilerplugins/clang/rtlconstasciimacro.cxx b/compilerplugins/clang/rtlconstasciimacro.cxx
index 331401afbc9c..d3843149b2ea 100644
--- a/compilerplugins/clang/rtlconstasciimacro.cxx
+++ b/compilerplugins/clang/rtlconstasciimacro.cxx
@@ -33,7 +33,12 @@ class RtlConstAsciiMacro
bool VisitCXXConstructExpr( CXXConstructExpr* expr );
bool VisitCXXTemporaryObjectExpr( CXXTemporaryObjectExpr* expr );
bool VisitStringLiteral( const StringLiteral* literal );
+#if __clang_major__ < 3 || __clang_major__ == 3 && __clang_minor__ < 3
virtual void MacroExpands( const Token& macro, const MacroInfo* info, SourceRange range ) override;
+#else
+ virtual void MacroExpands( const Token& macro, const MacroDirective* directive,
+ SourceRange range, const MacroArgs* args ) override;
+#endif
private:
map< SourceLocation, SourceLocation > expansions; // start location -> end location
bool searchingForString;
@@ -53,7 +58,12 @@ void RtlConstAsciiMacro::run()
}
+#if __clang_major__ < 3 || __clang_major__ == 3 && __clang_minor__ < 3
void RtlConstAsciiMacro::MacroExpands( const Token& macro, const MacroInfo*, SourceRange range )
+#else
+void RtlConstAsciiMacro::MacroExpands( const Token& macro, const MacroDirective*,
+ SourceRange range, const MacroArgs* )
+#endif
{
if( macro.getIdentifierInfo()->getName() != "RTL_CONSTASCII_USTRINGPARAM" )
return;