mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 19:49:36 +00:00
cd25c38dc0
In some cases the analyzer didn't expect an array-type variable to be initialized with anything other than a string literal. The patch essentially removes the assertion, and ensures relatively sane behavior. There is a bigger problem with these initializers. Currently our memory model (RegionStore) is being ordered to initialize the array with a region that is assumed to be storing the initializer rvalue, and it guesses to copy the contents of that region to the array variable. However, it would make more sense for RegionStore to receive the correct initializer in the first place. This problem isn't addressed with this patch. rdar://problem/27248428 Differential Revision: https://reviews.llvm.org/D23963 llvm-svn: 315750
10 lines
233 B
Objective-C
10 lines
233 B
Objective-C
// RUN: %clang_cc1 -analyze -analyzer-checker=debug.ExprInspection -verify %s
|
|
// expected-no-diagnostics
|
|
|
|
void clang_analyzer_eval(int);
|
|
|
|
// rdar://problem/34831581: Used to crash.
|
|
void foo(void) {
|
|
char buf1[] = @encode(int **);
|
|
}
|