[PATCH] [Static Analyzer] Fix false positive in Clang Static Analyzer
Anna Zaks
zaks.anna at gmail.com
Thu Jan 22 09:19:56 PST 2015
I'd say this works as expected. We base this heuristic on the fact that "free" cannot be called on "const int*".
Your sample code breaks this assumption, but:
warning: initializing 'int *' with an expression of type 'const int *' discards qualifiers
[-Wincompatible-pointer-types-discards-qualifiers]
int* k = v;
REPOSITORY
rL LLVM
http://reviews.llvm.org/D6793
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list