Skip to content

clang-include-cleaner - replaces chrono with bits/chrono #68213

Open
@PiotrZSL

Description

@PiotrZSL

Issues found:

a)

+#include <bits/basic_string.h>
+#include <string>

b)

-#include <chrono>
+#include <bits/chrono.h>

Tested version from LLVM 17.0.2

misc-include-cleaner provide more information:

160   - DiagnosticName:  misc-include-cleaner
161     DiagnosticMessage:
162       Message:         'no header providing "std::operator""s" is directly included'
163       FilePath:        'some-file.cpp'
164       FileOffset:      982
165       Replacements:
166         - FilePath:        'some-file.cpp'
167           Offset:          52
168           Length:          0
169           ReplacementText: "#include <bits/basic_string.h>\n"

And:

304   - DiagnosticName:  misc-include-cleaner
305     DiagnosticMessage:
306       Message:         'no header providing "std::chrono::ceil" is directly included'
307       FilePath:        'some-file.cpp'
308       FileOffset:      3133
309       Replacements:
310         - FilePath:        'some-file.cpp'
311           Offset:          43
312           Length:          0
313           ReplacementText: "#include <bits/chrono.h>\n"

When <chrono> is already included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-include-cleanergood first issuehttps://github.com/llvm/llvm-project/contributehelp wantedIndicates that a maintainer wants help. Not [good first issue].

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions