Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recognize source file extensions ".ccm", ".cxxm", and ".c++m" #422

Merged
merged 4 commits into from
Jun 16, 2023

Conversation

15knots
Copy link
Contributor

@15knots 15knots commented Jun 13, 2023

cmake 3.27 release notes: The "CXX" language now treats source file extensions ".ccm", ".cxxm", and ".c++m" as C++.

15knots added 2 commits June 13, 2023 22:18
cmake 3.27 release notes: The "CXX" language now treats source file
extensions ".ccm", ".cxxm", and ".c++m" as C++.

Signed-off-by: 15knots <11367029+15knots@users.noreply.github.com>
cmake 3.27 release notes: The "CXX" language now treats source file
extensions ".ccm", ".cxxm", and ".c++m" as C++.

Signed-off-by: 15knots <11367029+15knots@users.noreply.github.com>
@15knots
Copy link
Contributor Author

15knots commented Jun 13, 2023

Maybe the default preferences in C/C++ | Files Types should be updated, too. But I could not find it.

@jonahgraham
Copy link
Member

Maybe the default preferences in C/C++ | Files Types should be updated, too. But I could not find it.

I think there are multiple places, based on different uses:

File types:

<!-- declares a content type for C++ source files -->
<content-type id="cxxSource" name="%cxxSourceName"
base-type="org.eclipse.cdt.core.cSource"
file-extensions="C,cpp,cxx,cc,c++"
priority="high"/>
<!-- declares a content type for C++ header files -->
<content-type id="cxxHeader" name="%cxxHeaderName"
base-type="org.eclipse.cdt.core.cxxSource"
file-extensions="h,hpp,hh,hxx,inc"
priority="high"/>

Diff viewer with structure:

<viewer
class="org.eclipse.cdt.internal.ui.compare.CContentViewerCreator"
extensions="c,cc,cxx,cpp,c++,h,hh,hxx,hpp,inc,c2"
id="org.eclipse.cdt.ui.compare.CContentViewerCreator">

Managed make builder:

<inputType
sourceContentType="org.eclipse.cdt.core.cxxSource"
sources="c,C,cc,cxx,cpp,cp,CPP"
dependencyContentType="org.eclipse.cdt.core.cxxHeader"
dependencyExtensions="h,H,hpp,hh,hp,hxx,HPP,h++,tcc"
dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2"
id="cdt.managedbuild.tool.gnu.cpp.compiler.input"
languageId="org.eclipse.cdt.core.g++">

@15knots
Copy link
Contributor Author

15knots commented Jun 13, 2023

@jonahgraham Actually source file extensions ".ccm", ".cxxm", and ".c++m" are for C++ 20 module files.
Maybe we should mentions this in the N&N if the indexer support module syntax.

I will look in the places you mentioned tomorrow.

@jonahgraham
Copy link
Member

@jonahgraham Actually source file extensions ".ccm", ".cxxm", and ".c++m" are for C++ 20 module files. Maybe we should mentions this in the N&N if the indexer support module syntax.

I haven't tried, but I doubt CDT indexer supports C++20 modules as I don't recall anyone working on that. More reason for the clangd indexer work being done in cdt-lsp!

cmake 3.27 release notes: The "CXX" language now treats source file
extensions ".ccm", ".cxxm", and ".c++m" as C++.

Signed-off-by: 15knots <11367029+15knots@users.noreply.github.com>
@jonahgraham
Copy link
Member

Needs rebase now that #421 is merged.

@15knots 15knots requested a review from jonahgraham June 15, 2023 20:05
@15knots 15knots merged commit 09728af into eclipse-cdt:main Jun 16, 2023
@jonahgraham
Copy link
Member

This change seems to have introduced a bunch of regressions. I am not sure why the reporting was inconsistent. If I can't quickly fix this I am going to revert it and retry applying it from scratch.

jonahgraham added a commit to jonahgraham/cdt that referenced this pull request Aug 9, 2023
Recently new extensions were added to CDT for C++ modules in eclipse-cdt#422
At the time some test failures were not noticed. This change patches
those failing tests.

Fixes eclipse-cdt#454
jonahgraham added a commit that referenced this pull request Aug 10, 2023
Recently new extensions were added to CDT for C++ modules in #422
At the time some test failures were not noticed. This change patches
those failing tests.

Fixes #454
@jonahgraham jonahgraham added this to the 11.3.0 milestone Sep 13, 2023
@jonahgraham jonahgraham added the noteworthy Pull requests and fixed issues that should be highlighted to users label Sep 13, 2023
davmac314 pushed a commit to davmac314/cdt that referenced this pull request Sep 24, 2023
Recently new extensions were added to CDT for C++ modules in eclipse-cdt#422
At the time some test failures were not noticed. This change patches
those failing tests.

Fixes eclipse-cdt#454
max-leuthaeuser added a commit to joernio/joern that referenced this pull request Dec 10, 2024
To be consistent with latest cmake and CDT (eclipse-cdt/cdt#422).
max-leuthaeuser added a commit to joernio/joern that referenced this pull request Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
noteworthy Pull requests and fixed issues that should be highlighted to users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants