diff options
Diffstat (limited to 'lib/StaticAnalyzer/Core/CheckerContext.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/CheckerContext.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/StaticAnalyzer/Core/CheckerContext.cpp b/lib/StaticAnalyzer/Core/CheckerContext.cpp index 6aaa377325..47b7c48d45 100644 --- a/lib/StaticAnalyzer/Core/CheckerContext.cpp +++ b/lib/StaticAnalyzer/Core/CheckerContext.cpp @@ -56,13 +56,10 @@ bool CheckerContext::isCLibraryFunction(const FunctionDecl *FD, } StringRef CheckerContext::getMacroNameOrSpelling(SourceLocation &Loc) { - if (!Loc.isMacroID()) { - SmallVector<char, 16> buf; - return Lexer::getSpelling(Loc, buf, getSourceManager(), getLangOptions()); - } else { + if (Loc.isMacroID()) return Lexer::getImmediateMacroName(Loc, getSourceManager(), getLangOptions()); - } - return StringRef(); + SmallVector<char, 16> buf; + return Lexer::getSpelling(Loc, buf, getSourceManager(), getLangOptions()); } |