[LLVMbugs] [Bug 15092] New: static analyzer false positive: reports instance variable used while 'self' is not set to the result of [(super or self)] init
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jan 28 13:01:21 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=15092
Bug #: 15092
Summary: static analyzer false positive: reports instance
variable used while 'self' is not set to the result of
[(super or self)] init
Product: new-bugs
Version: 3.1
Platform: All
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: dmaclach at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 9935
--> http://llvm.org/bugs/attachment.cgi?id=9935
Test Files (Xcode project and source).
Analyze the attached code with clang. We are using Apple clang version 4.1
(tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) that shipped with the Xcode
4.6 GM. By code analysis we think it exists in TOT clang. We think the code is
fine and we are getting a false positive with regards to init.
Filed as radar 12838705 Xcode 4.6 Analyzer False Positive on init Method
/Users/dmaclach/Desktop/AnalyzerTest/AnalyzerTest/ANALystTherapist.mm:29:12:
Instance variable used while 'self' is not set to the result of '[(super or
self) init...]'
Analyze AnalyzerTest/ANALystTherapist.mm
cd /Users/dmaclach/Desktop/AnalyzerTest
setenv LANG en_US.US-ASCII
setenv PATH
"/Applications/Xcode46-DP3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode46-DP3.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode46-DP3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-x objective-c++ -arch i386 -fmessage-length=0 -std=gnu++11 -stdlib=libc++
-fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers
-Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties
-Wno-receiver-is-weak -Wno-non-virtual-dtor -Wno-overloaded-virtual
-Wno-exit-time-destructors -Wduplicate-method-match -Wformat
-Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function
-Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value
-Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow
-Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion
-Wenum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-selector
-Wno-strict-selector-match -Wno-undeclared-selector
-Wno-deprecated-implementations -Wno-c++11-extensions -DDEBUG=1 -isysroot
/Applications/Xcode46-DP3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk
-fexceptions -fasm-blocks -fstrict-aliasing -Wprotocol
-Wdeprecated-declarations -Winvalid-offsetof -g -fvisibility-inlines-hidden
-Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -Xclang
-analyzer-output=plist-multi-file -Xclang -analyzer-checker -Xclang
security.insecureAPI.UncheckedReturn -Xclang -analyzer-checker -Xclang
security.insecureAPI.getpw -Xclang -analyzer-checker -Xclang
security.insecureAPI.gets -Xclang -analyzer-checker -Xclang
security.insecureAPI.mkstemp -Xclang -analyzer-checker -Xclang
security.insecureAPI.mktemp -Xclang -analyzer-disable-checker -Xclang
security.insecureAPI.rand -Xclang -analyzer-disable-checker -Xclang
security.insecureAPI.strcpy -Xclang -analyzer-checker -Xclang
security.insecureAPI.vfork -mios-simulator-version-min=6.1 -iquote
/Users/dmaclach/Desktop/AnalyzerTest/DerivedData/AnalyzerTest/Build/Intermediates/AnalyzerTest.build/Debug-iphonesimulator/AnalyzerTest.build/AnalyzerTest-generated-files.hmap
-I/Users/dmaclach/Desktop/AnalyzerTest/DerivedData/AnalyzerTest/Build/Intermediates/AnalyzerTest.build/Debug-iphonesimulator/AnalyzerTest.build/AnalyzerTest-own-target-headers.hmap
-I/Users/dmaclach/Desktop/AnalyzerTest/DerivedData/AnalyzerTest/Build/Intermediates/AnalyzerTest.build/Debug-iphonesimulator/AnalyzerTest.build/AnalyzerTest-all-target-headers.hmap
-iquote
/Users/dmaclach/Desktop/AnalyzerTest/DerivedData/AnalyzerTest/Build/Intermediates/AnalyzerTest.build/Debug-iphonesimulator/AnalyzerTest.build/AnalyzerTest-project-headers.hmap
-I/Users/dmaclach/Desktop/AnalyzerTest/DerivedData/AnalyzerTest/Build/Products/Debug-iphonesimulator/include
-I/Applications/Xcode46-DP3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
-I/Applications/Xcode46-DP3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
-I/Applications/Xcode46-DP3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
-I/Users/dmaclach/Desktop/AnalyzerTest/DerivedData/AnalyzerTest/Build/Intermediates/AnalyzerTest.build/Debug-iphonesimulator/AnalyzerTest.build/DerivedSources/i386
-I/Users/dmaclach/Desktop/AnalyzerTest/DerivedData/AnalyzerTest/Build/Intermediates/AnalyzerTest.build/Debug-iphonesimulator/AnalyzerTest.build/DerivedSources
-F/Users/dmaclach/Desktop/AnalyzerTest/DerivedData/AnalyzerTest/Build/Products/Debug-iphonesimulator
-include
/Users/dmaclach/Desktop/AnalyzerTest/DerivedData/AnalyzerTest/Build/Intermediates/PrecompiledHeaders/AnalyzerTest-Prefix-anksenmdcuygoccglwndlscwldsp/AnalyzerTest-Prefix.pch
-MMD -MT dependencies -MF
/Users/dmaclach/Desktop/AnalyzerTest/DerivedData/AnalyzerTest/Build/Intermediates/AnalyzerTest.build/Debug/AnalyzerTest.build/StaticAnalyzer/normal/i386/ANALystTherapist.d
--analyze /Users/dmaclach/Desktop/AnalyzerTest/AnalyzerTest/ANALystTherapist.mm
-o
/Users/dmaclach/Desktop/AnalyzerTest/DerivedData/AnalyzerTest/Build/Intermediates/AnalyzerTest.build/Debug/AnalyzerTest.build/StaticAnalyzer/normal/i386/ANALystTherapist.plist
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list