summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_runtime.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2019-04-17 10:36:02 +0000
committerSam McCall <sam.mccall@gmail.com>2019-04-17 10:36:02 +0000
commit62e2472321b7c8c5954a69ecef953b1abf54e538 (patch)
treef75ff2f713edec84f9d0870981896aa27c0ebc7a /openmp/runtime/src/kmp_runtime.cpp
parent6fe637c6f423d0aa1d44f286a75ef3983c364625 (diff)
downloadbcm5719-llvm-62e2472321b7c8c5954a69ecef953b1abf54e538.tar.gz
bcm5719-llvm-62e2472321b7c8c5954a69ecef953b1abf54e538.zip
[clangd] Include insertion: require header guards, drop other heuristics, treat .def like .inc.
Summary: We do have some reports of include insertion behaving badly in some codebases. Requiring header guards both makes sense in principle, and is likely to disable this "nice-to-have" feature in codebases where headers don't follow the expected pattern. With this we can drop some other heuristics, such as looking at file extensions to detect known non-headers - implementation files have no guards. One wrinkle here is #import - objc headers may not have guards because they're intended to be used via #import. If the header is the main file or is #included, we won't collect locations - merge should take care of this if we see the file #imported somewhere. Seems likely to be OK. Headers which have a canonicalization (stdlib, IWYU) are exempt from this check. *.inc files continue to be handled by looking up to the including file. This patch also adds *.def here - tablegen wants this pattern too. In terms of code structure, the division between SymbolCollector and CanonicalIncludes has shifted: SymbolCollector is responsible for more. This is because SymbolCollector has all the SourceManager/HeaderSearch access needed for checking for guards, and we interleave these checks with the *.def checks in a loop (potentially). We could hand all the info into CanonicalIncludes and put the logic there if that's preferable. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60316 llvm-svn: 358571
Diffstat (limited to 'openmp/runtime/src/kmp_runtime.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud