[clang-tools-extra] r228929 - Fixed incorrect header inclusion tracking resulting in false error reports.

John Thompson John.Thompson.JTSoftware at gmail.com
Thu Feb 12 07:26:18 PST 2015


Author: jtsoftware
Date: Thu Feb 12 09:26:17 2015
New Revision: 228929

URL: http://llvm.org/viewvc/llvm-project?rev=228929&view=rev
Log:
Fixed incorrect header inclusion tracking resulting in false error reports.

Modified:
    clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp

Modified: clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp?rev=228929&r1=228928&r2=228929&view=diff
==============================================================================
--- clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp (original)
+++ clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp Thu Feb 12 09:26:17 2015
@@ -980,9 +980,12 @@ public:
     if (HeaderPath.startswith("<"))
       return;
     HeaderHandle H = findHeaderHandle(HeaderPath);
+    HeaderHandle TH;
     if (isHeaderHandleInStack(H)) {
-      while ((H != getCurrentHeaderHandle()) && (HeaderStack.size() != 0))
+      do {
+        TH = getCurrentHeaderHandle();
         popHeaderHandle();
+      } while ((TH != H) && (HeaderStack.size() != 0));
     }
     InNestedHeader = false;
   }





More information about the cfe-commits mailing list