[LLVMbugs] [Executable Attachment Removed] [Bug 15704] New: clang-analyzer 273 in xcode error diagnostic causes failure
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Apr 8 15:07:39 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=15704
Bug ID: 15704
Summary: clang-analyzer 273 in xcode error diagnostic causes
failure
Product: clang
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: puurtuur at me.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
I'm testing the new clang-analyzer v273 under Xcode and got 2 problems. This is
the second.
Xcode just reports the standard "Analyzer skipped this file due to parse
errors" with sub-error:
type 'float' cannot be narrowed to 'Uint8' (aka 'unsigned char') in initializer
list
This file compiles normally under Xcode 4.6.1's clang. It seems to generate an
actual error diagnostic, likely a compiler change, but the error causes the
analysis to fail and it does not generate a diagnostic in Xcode. It does not
crash however.
So I'm not sure if this is a clang problem or an Xcode integration issue, but
it doesn't work either way.
Full Xcode transcript follows:
Analyze Quadrae/GameView.cpp
cd /Users/arthur/Documents/Creations/Quadrae
setenv LANG en_US.US-ASCII
/Users/arthur/Documents/Common/checker-273/bin/clang -x c++ -arch x86_64
-fmessage-length=0 -std=gnu++11 -stdlib=libc++ -Wno-trigraphs -fpascal-strings
-O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type
-Wnon-virtual-dtor -Woverloaded-virtual -Wno-exit-time-destructors -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 -Wshadow
-Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion
-Wenum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions
-DDEBUG=1 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
-fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof
-mmacosx-version-min=10.8 -g -fvisibility-inlines-hidden -Wno-sign-conversion
-Xclang -analyzer-output=plist-multi-file -Xclang -analyzer-checker -Xclang
security.FloatLoopCounter -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-checker -Xclang
security.insecureAPI.rand -Xclang -analyzer-checker -Xclang
security.insecureAPI.strcpy -Xclang -analyzer-checker -Xclang
security.insecureAPI.vfork -iquote
/Users/arthur/Library/Developer/Xcode/DerivedData/Quadrae-abgauznybbsogscxhysxkrhbnxdw/Build/Intermediates/Quadrae.build/Debug/QuadraeBundle.build/QuadraeBundle-generated-files.hmap
-I/Users/arthur/Library/Developer/Xcode/DerivedData/Quadrae-abgauznybbsogscxhysxkrhbnxdw/Build/Intermediates/Quadrae.build/Debug/QuadraeBundle.build/QuadraeBundle-own-target-headers.hmap
-I/Users/arthur/Library/Developer/Xcode/DerivedData/Quadrae-abgauznybbsogscxhysxkrhbnxdw/Build/Intermediates/Quadrae.build/Debug/QuadraeBundle.build/QuadraeBundle-all-target-headers.hmap
-iquote
/Users/arthur/Library/Developer/Xcode/DerivedData/Quadrae-abgauznybbsogscxhysxkrhbnxdw/Build/Intermediates/Quadrae.build/Debug/QuadraeBundle.build/QuadraeBundle-project-headers.hmap
-I/Users/arthur/Library/Developer/Xcode/DerivedData/Quadrae-abgauznybbsogscxhysxkrhbnxdw/Build/Products/Debug/include
-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
-I/Users/arthur/Library/Developer/Xcode/DerivedData/Quadrae-abgauznybbsogscxhysxkrhbnxdw/Build/Intermediates/Quadrae.build/Debug/QuadraeBundle.build/DerivedSources/x86_64
-I/Users/arthur/Library/Developer/Xcode/DerivedData/Quadrae-abgauznybbsogscxhysxkrhbnxdw/Build/Intermediates/Quadrae.build/Debug/QuadraeBundle.build/DerivedSources
-Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded
-Wno-documentation -Wno-global-constructors
-F/Users/arthur/Library/Developer/Xcode/DerivedData/Quadrae-abgauznybbsogscxhysxkrhbnxdw/Build/Products/Debug
-F/Users/arthur/Documents/Creations/Quadrae/../../../Library/Frameworks -MMD
-MT dependencies -MF
/Users/arthur/Library/Developer/Xcode/DerivedData/Quadrae-abgauznybbsogscxhysxkrhbnxdw/Build/Intermediates/Quadrae.build/Debug/QuadraeBundle.build/StaticAnalyzer/Quadrae/QuadraeBundle/normal/x86_64/GameView.d
--analyze /Users/arthur/Documents/Creations/Quadrae/Quadrae/GameView.cpp -o
/Users/arthur/Library/Developer/Xcode/DerivedData/Quadrae-abgauznybbsogscxhysxkrhbnxdw/Build/Intermediates/Quadrae.build/Debug/QuadraeBundle.build/StaticAnalyzer/Quadrae/QuadraeBundle/normal/x86_64/GameView.plist
/Users/arthur/Documents/Creations/Quadrae/Quadrae/GameView.cpp:90:78: error:
type 'float' cannot be narrowed to 'Uint8' (aka 'unsigned char') in initializer
list [-Wc++11-narrowing]
auto border = sf::Shape::Rectangle(24, 24, 24 + 240, 24 + 480, {
142,131,0, 255 * (1.0f - progress) });
^~~~~~~~~~~~~~~~~~~~~~~
/Users/arthur/Documents/Creations/Quadrae/Quadrae/GameView.cpp:90:78: note:
override this message by inserting an explicit cast
auto border = sf::Shape::Rectangle(24, 24, 24 + 240, 24 + 480, {
142,131,0, 255 * (1.0f - progress) });
^~~~~~~~~~~~~~~~~~~~~~~
static_cast<Uint8>( )
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list