Remove support for Clang < 3.3
Change-Id: I185852a738bac10dc6d331afccfcbc7ae1225cb1
This commit is contained in:
@@ -440,7 +440,7 @@ bool ConstantFunction::VisitFunctionDecl(const FunctionDecl * pFunctionDecl) {
|
||||
}
|
||||
|
||||
std::string aImmediateMacro = "";
|
||||
if (compat::isMacroBodyExpansion(compiler, pFunctionDecl->getLocStart()) ) {
|
||||
if (compiler.getSourceManager().isMacroBodyExpansion(pFunctionDecl->getLocStart()) ) {
|
||||
StringRef name { Lexer::getImmediateMacroName(
|
||||
pFunctionDecl->getLocStart(), compiler.getSourceManager(), compiler.getLangOpts()) };
|
||||
aImmediateMacro = name;
|
||||
|
@@ -34,12 +34,8 @@ class RtlConstAsciiMacro
|
||||
bool VisitCXXConstructExpr( CXXConstructExpr* expr );
|
||||
bool VisitCXXTemporaryObjectExpr( CXXTemporaryObjectExpr* expr );
|
||||
bool VisitStringLiteral( const StringLiteral* literal );
|
||||
#if CLANG_VERSION < 30300
|
||||
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
|
||||
enum { isPPCallback = true };
|
||||
private:
|
||||
map< SourceLocation, SourceLocation > expansions; // start location -> end location
|
||||
@@ -59,12 +55,8 @@ void RtlConstAsciiMacro::run()
|
||||
TraverseDecl( compiler.getASTContext().getTranslationUnitDecl());
|
||||
}
|
||||
|
||||
#if CLANG_VERSION < 30300
|
||||
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;
|
||||
|
Reference in New Issue
Block a user