summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/modularize/PreprocessorTracker.cpp
diff options
context:
space:
mode:
authorJohn Thompson <John.Thompson.JTSoftware@gmail.com>2015-02-12 15:26:17 +0000
committerJohn Thompson <John.Thompson.JTSoftware@gmail.com>2015-02-12 15:26:17 +0000
commitf1828ef3c6009fea5d88b3ca116e71cc90df6ff0 (patch)
treef36ae2fc5290d9cd9ab4f78c127917ef3aded34c /clang-tools-extra/modularize/PreprocessorTracker.cpp
parentc08e8f81ec6ef234e85fbe30ce7f9708f6be1177 (diff)
downloadbcm5719-llvm-f1828ef3c6009fea5d88b3ca116e71cc90df6ff0.tar.gz
bcm5719-llvm-f1828ef3c6009fea5d88b3ca116e71cc90df6ff0.zip
Fixed incorrect header inclusion tracking resulting in false error reports.
llvm-svn: 228929
Diffstat (limited to 'clang-tools-extra/modularize/PreprocessorTracker.cpp')
-rw-r--r--clang-tools-extra/modularize/PreprocessorTracker.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang-tools-extra/modularize/PreprocessorTracker.cpp b/clang-tools-extra/modularize/PreprocessorTracker.cpp
index 2a41921cb46..894f3c0f771 100644
--- a/clang-tools-extra/modularize/PreprocessorTracker.cpp
+++ b/clang-tools-extra/modularize/PreprocessorTracker.cpp
@@ -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;
}
OpenPOWER on IntegriCloud