diff options
author | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2015-02-12 15:26:17 +0000 |
---|---|---|
committer | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2015-02-12 15:26:17 +0000 |
commit | f1828ef3c6009fea5d88b3ca116e71cc90df6ff0 (patch) | |
tree | f36ae2fc5290d9cd9ab4f78c127917ef3aded34c | |
parent | c08e8f81ec6ef234e85fbe30ce7f9708f6be1177 (diff) | |
download | bcm5719-llvm-f1828ef3c6009fea5d88b3ca116e71cc90df6ff0.tar.gz bcm5719-llvm-f1828ef3c6009fea5d88b3ca116e71cc90df6ff0.zip |
Fixed incorrect header inclusion tracking resulting in false error reports.
llvm-svn: 228929
-rw-r--r-- | clang-tools-extra/modularize/PreprocessorTracker.cpp | 5 |
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; } |