diff clang/lib/Lex/PPLexerChange.cpp @ 174:f935e5e0dbe7

merged
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 12:28:41 +0900
parents e8a9b4f4d755 0572611fdcc8
children 40b1cab18437
line wrap: on
line diff
--- a/clang/lib/Lex/PPLexerChange.cpp	Mon May 25 11:20:42 2020 +0900
+++ b/clang/lib/Lex/PPLexerChange.cpp	Mon May 25 12:28:41 2020 +0900
@@ -24,8 +24,6 @@
 #include "llvm/Support/Path.h"
 using namespace clang;
 
-PPCallbacks::~PPCallbacks() {}
-
 //===----------------------------------------------------------------------===//
 // Miscellaneous Methods.
 //===----------------------------------------------------------------------===//
@@ -417,7 +415,10 @@
     }
 
     if (!isEndOfMacro && CurPPLexer &&
-        SourceMgr.getIncludeLoc(CurPPLexer->getFileID()).isValid()) {
+        (SourceMgr.getIncludeLoc(CurPPLexer->getFileID()).isValid() ||
+         // Predefines file doesn't have a valid include location.
+         (PredefinesFileID.isValid() &&
+          CurPPLexer->getFileID() == PredefinesFileID))) {
       // Notify SourceManager to record the number of FileIDs that were created
       // during lexing of the #include'd file.
       unsigned NumFIDs =