From f45bcabe027821fb7b12b63bb42134f6c2e7bfb2 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 11 Feb 2019 13:30:04 +0000 Subject: Format isInSystemMacro after D55782 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353697 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/SourceManager.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'include/clang/Basic/SourceManager.h') diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index b45357e645..2bdf1d5e39 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -1458,17 +1458,15 @@ public: /// Returns whether \p Loc is expanded from a macro in a system header. bool isInSystemMacro(SourceLocation loc) const { - if(!loc.isMacroID()) + if (!loc.isMacroID()) return false; // This happens when the macro is the result of a paste, in that case // its spelling is the scratch memory, so we take the parent context. - if (isWrittenInScratchSpace(getSpellingLoc(loc))) { + if (isWrittenInScratchSpace(getSpellingLoc(loc))) return isInSystemHeader(getSpellingLoc(getImmediateMacroCallerLoc(loc))); - } - else { - return isInSystemHeader(getSpellingLoc(loc)); - } + + return isInSystemHeader(getSpellingLoc(loc)); } /// The size of the SLocEntry that \p FID represents. -- cgit v1.2.1