From 3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 27 May 2015 18:47:56 +0000 Subject: Vendor import of clang trunk r238337: https://llvm.org/svn/llvm-project/cfe/trunk@238337 --- lib/Sema/SemaFixItUtils.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib/Sema/SemaFixItUtils.cpp') diff --git a/lib/Sema/SemaFixItUtils.cpp b/lib/Sema/SemaFixItUtils.cpp index 32b56bc..2e327ec 100644 --- a/lib/Sema/SemaFixItUtils.cpp +++ b/lib/Sema/SemaFixItUtils.cpp @@ -161,11 +161,8 @@ bool ConversionFixItGenerator::tryToFixConversion(const Expr *FullExpr, } static bool isMacroDefined(const Sema &S, SourceLocation Loc, StringRef Name) { - const IdentifierInfo *II = &S.getASTContext().Idents.get(Name); - if (!II->hadMacroDefinition()) return false; - - MacroDirective *Macro = S.PP.getMacroDirectiveHistory(II); - return Macro && Macro->findDirectiveAtLoc(Loc, S.getSourceManager()); + return (bool)S.PP.getMacroDefinitionAtLoc(&S.getASTContext().Idents.get(Name), + Loc); } static std::string getScalarZeroExpressionForType( -- cgit v1.1