-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
clang-tidy asserts and fails to process valid preprocessed source when in C++20 mode only due to ExpandModularHeadersPPCallbacks #47910
Comments
@llvm/issue-subscribers-c-20 Author: None (41fa9ab2-4e9a-46d3-8102-9366090d3552)
| | |
| --- | --- |
| Bugzilla Link | [48566](https://llvm.org/bz48566) |
| Version | unspecified |
| OS | All |
Extended DescriptionUsing the latest commit as of writing (3fa2d37), clang-tidy fails to process the following preprocessed source: # 1 "main.cpp"
# 1 "usr/include/sys/cdefs.h" 1
# 1 "usr/include/android/api-level.h" 1
# 47 "usr/include/android/api-level.h"
extern "C" {
# 170 "usr/include/android/api-level.h"
#if 1
# 1 "usr/include/bits/get_device_api_level_inlines.h" 1
# 30 "usr/include/bits/get_device_api_level_inlines.h"
# 32 "usr/include/bits/get_device_api_level_inlines.h"
# 33 "usr/include/bits/get_device_api_level_inlines.h"
# 34 "usr/include/bits/get_device_api_level_inlines.h"
# 51 "usr/include/bits/get_device_api_level_inlines.h"
#endif
# 177 "usr/include/android/api-level.h" 2
# 191 "usr/include/android/api-level.h"
}
# 363 "usr/include/sys/cdefs.h" 2
# 1 "main.cpp" 2 The following command line was used:
In Release, clang-tidy outputs this error:
In Debug, clang-tidy crashes with this assert:
This only occurs with -std=c++20. It does not occur with -std=c++17. If I disable the use of llvm-project/clang-tools-extra/clang-tidy/ClangTidy.cpp Lines 414 to 419 in 3fa2d37
|
Extended Description
Using the latest commit as of writing (3fa2d37), clang-tidy fails to process the following preprocessed source:
The following command line was used:
In Release, clang-tidy outputs this error:
In Debug, clang-tidy crashes with this assert:
This only occurs with -std=c++20. It does not occur with -std=c++17.
If I disable the use of
ExpandModularHeadersPPCallbacks
here (llvm-project/clang-tools-extra/clang-tidy/ClangTidy.cpp
Lines 414 to 419 in 3fa2d37
The text was updated successfully, but these errors were encountered: