bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land.
LGTM, thanks for the fix! ================ Comment at: tools/libclang/CIndexInclusionStack.cpp:32 @@ -36,13 +31,3 @@ SmallVector<CXSourceLocation, 10> InclusionStack; - unsigned n = SM.local_sloc_entry_size(); - - // In the case where all the SLocEntries are in an external source, traverse - // those SLocEntries as well. This is the case where we are looking - // at the inclusion stack of an AST/PCH file. - const SrcMgr::SLocEntry &(SourceManager::*Getter)(unsigned, bool*) const; - if (n == 1) { - Getter = &SourceManager::getLoadedSLocEntry; - n = SM.loaded_sloc_entry_size(); - } else - Getter = &SourceManager::getLocalSLocEntry; + const bool hasPreamble = SM.getPreambleFileID().isValid(); ---------------- There's already a wild mix of coding styles in this file, let's not add more of them. `bool HasPreamble` is the preferred style. http://reviews.llvm.org/D14329 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits