[PATCH] D147520: Fix a time-trace issue of incorrect header hierarchy when a header contains a template function for its last symbol.
Ying Yi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 4 04:17:28 PDT 2023
MaggieYi created this revision.
MaggieYi added reviewers: Whitney, jamieschmeiser, MaskRay, rnk, aras-p, anton-afanasyev.
Herald added a subscriber: hiraditya.
Herald added a project: All.
MaggieYi requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.
`HandleEndOfFile` is invoked when the lexer hits the end of the current file. This either returns the EOF token or pops a level off the include stack and
keeps going. If it keeps going, clang parses from one header to another header. This results in incorrect header hierarchy in the time trace.
This patch corrects this, as reported by #56554
Fixes: https://github.com/llvm/llvm-project/issues/56554
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D147520
Files:
clang/lib/Sema/Sema.cpp
clang/test/Driver/Inputs/header5.h
clang/test/Driver/Inputs/header6.h
clang/test/Driver/check-time-trace-header-hierarchy.cpp
clang/test/Driver/check-time-trace-header-hierarchy.py
llvm/include/llvm/Support/TimeProfiler.h
llvm/lib/Support/TimeProfiler.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147520.510744.patch
Type: text/x-patch
Size: 6146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230404/91c4a743/attachment.bin>
More information about the cfe-commits
mailing list