-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[analyzer] Crash with "ArrayInitLoopExpr contains unexpected source expression" #112813
Comments
@llvm/issue-subscribers-clang-static-analyzer Author: i80287 (i80287)
Got an error while running clang-tidy. Clang-tidy is executed by CodeChecker, flags and options are generated by the cmake with -DCMAKE_EXPORT_COMPILE_COMMANDS=1. The same error occurs when CodeChecker runs clang static analyzer
Stack dump:
|
Could you please try 19 or Please provide reproducer. |
I had a look, but without a reproducer I can't fix this. |
Reproducer for this error may look like this: #include <string_view>
int main() {
std::string_view pairs[][2] = {
{"ab", "cd"},
};
for (const auto [lhs, rhs] : pairs) {
}
return 0;
} assuming that the code above is put in the file.cpp, the following command exits with error and backtrace as in the first message of this github issue: I will try main branch later: linking binaries when building llvm from source takes eternity on my pc...( |
Result of the
|
Reproduces on trunk, https://compiler-explorer.com/z/KqTn678xn |
…InitLoopExpr` analysis This patch generalizes the way element regions are constructed when an `ArrayInitLoopExpr` is being analyzed. Previously the base region of the `ElementRegion` was determined with pattern matching, which led to crashes, when an unhandled pattern was encountered. Fixes llvm#112813
…InitLoopExpr` analysis This patch generalizes the way element regions are constructed when an `ArrayInitLoopExpr` is being analyzed. Previously the base region of the `ElementRegion` was determined with pattern matching, which led to crashes, when an unhandled pattern was encountered. Fixes llvm#112813
…InitLoopExpr` analysis This patch generalizes the way element regions are constructed when an `ArrayInitLoopExpr` is being analyzed. Previously the base region of the `ElementRegion` was determined with pattern matching, which led to crashes, when an unhandled pattern was encountered. Fixes llvm#112813
…InitLoopExpr` analysis This patch generalizes the way element regions are constructed when an `ArrayInitLoopExpr` is being analyzed. Previously the base region of the `ElementRegion` was determined with pattern matching, which led to crashes, when an unhandled pattern was encountered. Fixes llvm#112813
…InitLoopExpr` analysis This patch generalizes the way element regions are constructed when an `ArrayInitLoopExpr` is being analyzed. Previously the base region of the `ElementRegion` was determined with pattern matching, which led to crashes, when an unhandled pattern was encountered. Fixes llvm#112813
…InitLoopExpr` analysis (#113570) This patch generalizes the way element regions are constructed when an `ArrayInitLoopExpr` is being analyzed. Previously the base region of the `ElementRegion` was determined with pattern matching, which led to crashes, when an unhandled pattern was encountered. Fixes #112813
…InitLoopExpr` analysis (llvm#113570) This patch generalizes the way element regions are constructed when an `ArrayInitLoopExpr` is being analyzed. Previously the base region of the `ElementRegion` was determined with pattern matching, which led to crashes, when an unhandled pattern was encountered. Fixes llvm#112813
Got an error while running clang-tidy. Clang-tidy is executed by CodeChecker, flags and options are generated by the cmake with -DCMAKE_EXPORT_COMPILE_COMMANDS=1. The same error occurs when CodeChecker runs clang static analyzer
The text was updated successfully, but these errors were encountered: