diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-12-20 19:36:06 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-12-20 19:36:06 +0000 |
commit | b40e99af0843802751c665b8957845d541ad2171 (patch) | |
tree | e28bccc7b029c0ea6a707de41510ac912515fbef /clang/test | |
parent | 45973792275bd73d37ae8aac404aaea3a22e1951 (diff) | |
download | bcm5719-llvm-b40e99af0843802751c665b8957845d541ad2171.tar.gz bcm5719-llvm-b40e99af0843802751c665b8957845d541ad2171.zip |
Revert "[analyzer] pr38668: Do not attempt to cast loaded values..."
This reverts commit r349701.
The patch was incorrect. The whole point of CastRetrievedVal()
is to handle the case in which the type from which the cast is made
(i.e., the "type" of value `V`) has nothing to do with the type of
the region it was loaded from (i.e., `R->getValueType()`).
Differential Revision: https://reviews.llvm.org/D55875
rdar://problem/45062567
llvm-svn: 349798
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Analysis/casts.c | 11 | ||||
-rw-r--r-- | clang/test/Analysis/pointer-to-member.cpp | 7 |
2 files changed, 4 insertions, 14 deletions
diff --git a/clang/test/Analysis/casts.c b/clang/test/Analysis/casts.c index dd14b8a6e30..45ce1940dfa 100644 --- a/clang/test/Analysis/casts.c +++ b/clang/test/Analysis/casts.c @@ -213,14 +213,3 @@ void no_crash_on_symsym_cast_to_long() { } #endif - -char no_crash_SymbolCast_of_float_type_aux(int *p) { - *p += 1; - return *p; -} - -void no_crash_SymbolCast_of_float_type() { - extern float x; - char (*f)() = no_crash_SymbolCast_of_float_type_aux; - f(&x); -} diff --git a/clang/test/Analysis/pointer-to-member.cpp b/clang/test/Analysis/pointer-to-member.cpp index 7f196558400..65882527d2d 100644 --- a/clang/test/Analysis/pointer-to-member.cpp +++ b/clang/test/Analysis/pointer-to-member.cpp @@ -253,10 +253,11 @@ void test() { clang_analyzer_eval(&A::y); // expected-warning{{TRUE}} clang_analyzer_eval(&A::z); // expected-warning{{TRUE}} + // FIXME: These should be true. int A::*l = &A::x, A::*m = &A::y, A::*n = &A::z; - clang_analyzer_eval(l); // expected-warning{{TRUE}} - clang_analyzer_eval(m); // expected-warning{{TRUE}} - clang_analyzer_eval(n); // expected-warning{{TRUE}} + clang_analyzer_eval(l); // expected-warning{{UNKNOWN}} + clang_analyzer_eval(m); // expected-warning{{UNKNOWN}} + clang_analyzer_eval(n); // expected-warning{{UNKNOWN}} // FIXME: These should be true as well. A a; |