René's URL Explorer Experiment


Title: feat: Ordered search paths for `-I`, `-isystem`, `-F`, `-iframework` + Darwin framework support (with legacy `-I` back-compat) by jcfr · Pull Request #511 · cppcheck-opensource/simplecpp · GitHub

Open Graph Title: feat: Ordered search paths for `-I`, `-isystem`, `-F`, `-iframework` + Darwin framework support (with legacy `-I` back-compat) by jcfr · Pull Request #511 · cppcheck-opensource/simplecpp

X Title: feat: Ordered search paths for `-I`, `-isystem`, `-F`, `-iframework` + Darwin framework support (with legacy `-I` back-compat) by jcfr · Pull Request #511 · cppcheck-opensource/simplecpp

Description: This PR modernizes simplecpp's header lookup to more closely match GCC/Clang, while preserving backward compatibility for existing users. What's new Typed, ordered search paths Introduce DUI::SearchPath with PathKind: Include (for -I) SystemInclude (for -isystem) Framework (for -F, Darwin) SystemFramework (for -iframework, Darwin) If DUI::searchPaths is non-empty, it is honored verbatim in the order provided. If it's empty, legacy includePaths are mirrored as Include entries for back-compat. CLI flags Add support for -F

and -iframework (framework lookups). Add support for -isystem (system include lookups). Keep -I as before. Public API convenience New helpers on DUI: addIncludePath(path, legacy=false) addSystemIncludePath(path) addFrameworkPath(path) addSystemFrameworkPath(path) addIncludePath defaults to legacy=false; tests exercise both modes. Darwin frameworks Framework includes like are resolved to Pkg.framework/{Headers,PrivateHeaders}/Hdr.h. Implement toAppleFrameworkRelatives() returning prioritized candidates (Headers first, then PrivateHeaders). Works for both __has_include and normal #include. Lookup order (summary of actual implementation) For "quotes" includes only: directory of the including file (unchanged). Interleaved searchPaths in left-to-right CLI order: Include (-I) Framework (-F) — using the Headers/PrivateHeaders rewrite when applicable System include paths (SystemInclude, i.e., -isystem) System framework paths (SystemFramework, i.e., -iframework) (Standard library dirs are outside simplecpp's scope; -idirafter/-iquote are not implemented in this series.) Core loader refactors openHeader() and FileDataCache::get() now consult typed, ordered paths and produce candidates accordingly. When resolving framework headers, both Headers and PrivateHeaders are tried in that order. Tests & tooling Integration tests New helpers to build fixtures: generic headers, sources, and minimal framework trees. test_framework_lookup: verifies Headers vs PrivateHeaders and -F vs -iframework. test_searchpath_order: a single parametrized test that validates precedence across -I, -isystem, -F, -iframework, including interleaving and duplicates, asserting on the exact #line path chosen. Unit tests (test.cpp) Framework handling covered for both #include and __has_include. Back-compat exercised by running key tests twice (new ordered API and legacy mode via addIncludePath(..., /*legacy=*/true)). Supersedes the following pull request: #448 Related issues: Fixes #283

Open Graph Description: This PR modernizes simplecpp's header lookup to more closely match GCC/Clang, while preserving backward compatibility for existing users. What's new Typed, ordered search paths Introduc...

X Description: This PR modernizes simplecpp's header lookup to more closely match GCC/Clang, while preserving backward compatibility for existing users. What's new Typed, ordered search paths ...

Opengraph URL: https://github.com/cppcheck-opensource/simplecpp/pull/511

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c641f0d3-f7f4-763f-4e07-76605e6b0917
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBA94:79348:D81C51:12A4455:6A4E889F
html-safe-nonce852453a70aada2b938d07dfd9c67affc513ec8cc122bac54f9e10300f7d8d164
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTk0Ojc5MzQ4OkQ4MUM1MToxMkE0NDU1OjZBNEU4ODlGIiwidmlzaXRvcl9pZCI6IjMzOTI1NDUwNzQ5MDY1NjQ3NjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0344938576aa219e5b6cebad014330000cc43fa30347ae6bdfd330de9dd9d848
hovercard-subject-tagpull_request:2774085911
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/cppcheck-opensource/simplecpp/pull/511/files
twitter:imagehttps://avatars.githubusercontent.com/u/219043?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/219043?s=400&v=4
og:image:altThis PR modernizes simplecpp's header lookup to more closely match GCC/Clang, while preserving backward compatibility for existing users. What's new Typed, ordered search paths Introduc...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/cppcheck-opensource/simplecpp git https://github.com/cppcheck-opensource/simplecpp.git
octolytics-dimension-user_id278097703
octolytics-dimension-user_logincppcheck-opensource
octolytics-dimension-repository_id33434464
octolytics-dimension-repository_nwocppcheck-opensource/simplecpp
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id33434464
octolytics-dimension-repository_network_root_nwocppcheck-opensource/simplecpp
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee6a744804e8e70f97b4d5a18a94dcc63db22f97a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/cppcheck-opensource/simplecpp/pull/511/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcppcheck-opensource%2Fsimplecpp%2Fpull%2F511%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcppcheck-opensource%2Fsimplecpp%2Fpull%2F511%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=cppcheck-opensource%2Fsimplecpp
Reloadhttps://github.com/cppcheck-opensource/simplecpp/pull/511/files
Reloadhttps://github.com/cppcheck-opensource/simplecpp/pull/511/files
Reloadhttps://github.com/cppcheck-opensource/simplecpp/pull/511/files
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/511/files
cppcheck-opensource https://github.com/cppcheck-opensource
simplecpphttps://github.com/cppcheck-opensource/simplecpp
Notifications https://github.com/login?return_to=%2Fcppcheck-opensource%2Fsimplecpp
Fork 104 https://github.com/login?return_to=%2Fcppcheck-opensource%2Fsimplecpp
Star 263 https://github.com/login?return_to=%2Fcppcheck-opensource%2Fsimplecpp
Code https://github.com/cppcheck-opensource/simplecpp
Issues 82 https://github.com/cppcheck-opensource/simplecpp/issues
Pull requests 31 https://github.com/cppcheck-opensource/simplecpp/pulls
Actions https://github.com/cppcheck-opensource/simplecpp/actions
Wiki https://github.com/cppcheck-opensource/simplecpp/wiki
Security and quality 0 https://github.com/cppcheck-opensource/simplecpp/security
Insights https://github.com/cppcheck-opensource/simplecpp/pulse
Code https://github.com/cppcheck-opensource/simplecpp
Issues https://github.com/cppcheck-opensource/simplecpp/issues
Pull requests https://github.com/cppcheck-opensource/simplecpp/pulls
Actions https://github.com/cppcheck-opensource/simplecpp/actions
Wiki https://github.com/cppcheck-opensource/simplecpp/wiki
Security and quality https://github.com/cppcheck-opensource/simplecpp/security
Insights https://github.com/cppcheck-opensource/simplecpp/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fcppcheck-opensource%2Fsimplecpp%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcppcheck-opensource%2Fsimplecpp%2Fissues%2Fnew%2Fchoose
jcfrhttps://github.com/jcfr
cppcheck-opensource:masterhttps://github.com/cppcheck-opensource/simplecpp/tree/master
jcfr:apple-framework-header-supporthttps://github.com/jcfr/simplecpp/tree/apple-framework-header-support
Conversation 32 https://github.com/cppcheck-opensource/simplecpp/pull/511
Commits 7 https://github.com/cppcheck-opensource/simplecpp/pull/511/commits
Checks 13 https://github.com/cppcheck-opensource/simplecpp/pull/511/checks
Files changed https://github.com/cppcheck-opensource/simplecpp/pull/511/files
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/511/files
feat: Ordered search paths for -I, -isystem, -F, -iframework + Darwin framework support (with legacy -I back-compat) https://github.com/cppcheck-opensource/simplecpp/pull/511/files#top
Show all changes 7 commits https://github.com/cppcheck-opensource/simplecpp/pull/511/files
9739f7e tests: Add docstrings to __test_relative_header_create_* helper funct… jcfr Aug 30, 2025 https://github.com/cppcheck-opensource/simplecpp/pull/511/commits/9739f7e8511062f873cf46d0414ecf7c026853cd
aa8ef0e feat: Darwin-style framework search (-F, -iframework) with ordered pa… hjmjohnson Jul 16, 2025 https://github.com/cppcheck-opensource/simplecpp/pull/511/commits/aa8ef0e09b5c53637d4ab0ce716ee21bafcf0894
b92e848 feat: Add convenient API to simplecpp:DUI for adding different type o… jcfr Aug 30, 2025 https://github.com/cppcheck-opensource/simplecpp/pull/511/commits/b92e84854f822666a7cfb9f1002177a4db406258
0269b85 feat: Add support for -isystem jcfr Aug 30, 2025 https://github.com/cppcheck-opensource/simplecpp/pull/511/commits/0269b854fb609ed0bc69c25b96d9f389dd0ea195
d5a9b92 feat: Update DUI::addIncludePath to accept legacy parameter jcfr Aug 30, 2025 https://github.com/cppcheck-opensource/simplecpp/pull/511/commits/d5a9b9225db5741a3f4006cdf27849f6f761b2c1
517d296 tests: Update test cases to use DUI::addIncludePath with legacy mode jcfr Aug 30, 2025 https://github.com/cppcheck-opensource/simplecpp/pull/511/commits/517d2969ccba7bd386d7d1837974a3e540793826
03d7ab0 feat: Set default legacy mode to false in DUI::addIncludePath jcfr Aug 30, 2025 https://github.com/cppcheck-opensource/simplecpp/pull/511/commits/03d7ab08cd182c55ac29436aa84ace05363fa7ff
Clear filters https://github.com/cppcheck-opensource/simplecpp/pull/511/files
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/511/files
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/511/files
integration_test.py https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-1633196318a48ed42103653fbdf6e7c275dcd81969444fc01a47ae28beff077d
main.cpp https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-608d8de3fba954c50110b6d7386988f27295de845e9d7174e40095ba5efcf1bb
simplecpp.cpp https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-c847846a0c414ac05f52e4f9686648f22c76c9bb152579a253b600223c202832
simplecpp.h https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-8feef6892144dbe750ffc83a1525c796968b56cd4d6500fe8bf22bac61cf9174
test.cpp https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-042cc0321bd0d3c8cb8262c89142b3e6aba34345ae77b4294f5e07dd2687ffcf
Foundation.h https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-952e28b6aac95df743c2287d423432aa7dbf3f8b0215a2af56daeecc56485705
testutils.py https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-57a4fbee623b5d3954ca60356bbf656f2a8260dea5eb38b93c3c51e179729d7f
integration_test.pyhttps://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-1633196318a48ed42103653fbdf6e7c275dcd81969444fc01a47ae28beff077d
View file https://github.com/cppcheck-opensource/simplecpp/blob/03d7ab08cd182c55ac29436aa84ace05363fa7ff/integration_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/simplecpp/pull/511/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-1633196318a48ed42103653fbdf6e7c275dcd81969444fc01a47ae28beff077d
https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-1633196318a48ed42103653fbdf6e7c275dcd81969444fc01a47ae28beff077d
https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-1633196318a48ed42103653fbdf6e7c275dcd81969444fc01a47ae28beff077d
https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-1633196318a48ed42103653fbdf6e7c275dcd81969444fc01a47ae28beff077d
main.cpphttps://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-608d8de3fba954c50110b6d7386988f27295de845e9d7174e40095ba5efcf1bb
View file https://github.com/cppcheck-opensource/simplecpp/blob/03d7ab08cd182c55ac29436aa84ace05363fa7ff/main.cpp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/simplecpp/pull/511/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-608d8de3fba954c50110b6d7386988f27295de845e9d7174e40095ba5efcf1bb
danmarhttps://github.com/danmar
Oct 2, 2025https://github.com/cppcheck-opensource/simplecpp/pull/511/files#r2398235242
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/511/files
https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-608d8de3fba954c50110b6d7386988f27295de845e9d7174e40095ba5efcf1bb
https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-608d8de3fba954c50110b6d7386988f27295de845e9d7174e40095ba5efcf1bb
https://github.com/cppcheck-opensource/simplecpp/pull/511/files#diff-608d8de3fba954c50110b6d7386988f27295de845e9d7174e40095ba5efcf1bb
Please reload this pagehttps://github.com/cppcheck-opensource/simplecpp/pull/511/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.