r353697 - Format isInSystemMacro after D55782
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 11 05:30:05 PST 2019
Author: maskray
Date: Mon Feb 11 05:30:04 2019
New Revision: 353697
URL: http://llvm.org/viewvc/llvm-project?rev=353697&view=rev
Log:
Format isInSystemMacro after D55782
Modified:
cfe/trunk/include/clang/Basic/SourceManager.h
Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=353697&r1=353696&r2=353697&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Mon Feb 11 05:30:04 2019
@@ -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.
More information about the cfe-commits
mailing list