[LLVMbugs] [Bug 11959] New: Add attribute for ObjC "raise" selector
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Feb 9 10:34:14 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=11959
Bug #: 11959
Summary: Add attribute for ObjC "raise" selector
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
AssignedTo: kremenek at apple.com
ReportedBy: tjw at me.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 8026
--> http://llvm.org/bugs/attachment.cgi?id=8026
Test case
Because clang warns on string formatting attempts with no arguments, we cannot
use -[NSException raise:format:] in some cases. So, we have a category that
defines -[NSException raise:reason:] which takes a plain string.
But, it looks like clang-sa has no __attribute__ that we can annotate our
category method with to note that it should be considered an equivalent of
"raise".
lib/StaticAnalyzer/Core/ExprEngineObjC.cpp seems to have a hard coded list it
caches in NSExceptionInstanceRaiseSelectors (though I don't have a full
understanding of the implementation, so maybe this isn't related).
I tried annotating our category method with __attribute__((analyzer_noreturn)),
but that didn't help (though it seems like it should).
See the attached sample case:
--
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