Ted Kremenek
5fa90e49a9
Fix improper dereference of end() iterator. Patch by Argiris Kirtzidis!
...
llvm-svn: 50012
2008-04-20 23:54:24 +00:00
Nate Begeman
1c906206b8
Fix PR2236
...
Add test
Implement feedback from Chris re: PR1998
llvm-svn: 50001
2008-04-20 20:38:08 +00:00
Chris Lattner
14cd1ee95f
Two improvements to initializer parsing:
...
1. If we hit a semantic error, try harder to recover to emit
diagnostics for later initializer errors (PR2241).
2. Don't leak parsed initializers on an error.
llvm-svn: 49998
2008-04-20 19:07:56 +00:00
Chris Lattner
4885b97664
for exponent-related errors, emit the diagnostic on the 'e' or 'p'.
...
llvm-svn: 49997
2008-04-20 18:47:55 +00:00
Chris Lattner
48a9b9beeb
when emitting diagnostics about some character in a numeric
...
literal, indicate what character the error is about or where
it would be. For example:
pr2241.c:1:17: error: exponent has no digits
float f[] = { 1e , 1ee0 };
^
llvm-svn: 49996
2008-04-20 18:41:46 +00:00
Nate Begeman
8e8d498d34
Only generate code for static functions and global variables that are actually used.
...
Warn about unused static functions and variables.
This fixes PR1998.
llvm-svn: 49987
2008-04-20 06:29:50 +00:00
Chris Lattner
2cc4e23252
Restructure and simplify Sema::ObjCQualifiedIdTypesAreCompatible,
...
deleting dead code, making other code more obvious, and fixing a
bug. This fixes these (bogus) warnings in release mode:
SemaExprObjC.cpp:383: warning: 'RHSProtoE' may be used uninitialized in this function
SemaExprObjC.cpp:383: warning: 'RHSProtoI' may be used uninitialized in this function
llvm-svn: 49984
2008-04-20 02:09:31 +00:00
Ted Kremenek
076d13387d
html::EscapeText (using the Rewriter) now replaces tabs by default.
...
llvm-svn: 49982
2008-04-20 01:02:33 +00:00
Chris Lattner
ff2367c0c9
implement a fixme, add support for ++/-- on long double.
...
llvm-svn: 49980
2008-04-20 00:50:39 +00:00
Chris Lattner
1886e71e47
use simplified ConstantFP:get method.
...
llvm-svn: 49979
2008-04-20 00:45:53 +00:00
Chris Lattner
1e517a78a8
replace form feeds with an <hr> tag.
...
llvm-svn: 49975
2008-04-19 23:56:30 +00:00
Chris Lattner
1a44f7fce9
simplify the return of InitializePreprocessor to be bool instead of a fileid
...
llvm-svn: 49974
2008-04-19 23:25:44 +00:00
Chris Lattner
ba1f37bfdf
simplify ownership of the predefines buffer.
...
llvm-svn: 49973
2008-04-19 23:09:31 +00:00
Ted Kremenek
575f24ef73
Gracefully handle when the receiver of a message expression is not a pointer type.
...
llvm-svn: 49959
2008-04-19 19:12:50 +00:00
Ted Kremenek
31d2176d1e
Pass "-isysroot" option down to clang.
...
llvm-svn: 49956
2008-04-19 18:42:26 +00:00
Ted Kremenek
6267835f57
Fix spelling/grammar in comment.
...
llvm-svn: 49955
2008-04-19 18:07:44 +00:00
Ted Kremenek
b0fa31cefb
Use Digest::MD5 (a Perl module that should come bundled standard with Perl) to compute file digests instead of using the external program "sha1sum" (which may not be present).
...
llvm-svn: 49954
2008-04-19 18:05:48 +00:00
Nate Begeman
faae081131
Generate code for annotation attributes.
...
llvm-svn: 49951
2008-04-19 04:17:09 +00:00
Nate Begeman
7fab578b0d
Add support to module codegen for adding and emitting annotations
...
llvm-svn: 49944
2008-04-18 23:43:57 +00:00
Nate Begeman
46bd037c07
Ignore qualifiers when attempting to match arguments to parameter types for
...
__builtin_overload
llvm-svn: 49943
2008-04-18 23:35:14 +00:00
Nate Begeman
ce4d7fce6b
OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.
...
llvm-svn: 49942
2008-04-18 23:10:10 +00:00
Ted Kremenek
423edc2384
Another bug fix in emitting warnings without a path: construct a unit PathDiagnostic as we did
...
before. This allows the HTMLDiagnostic object to retrieve the bug type, bug description, etc.
llvm-svn: 49939
2008-04-18 22:56:53 +00:00
Nuno Lopes
42dd577238
fix __attribute__(format) for struct function pointer fields
...
llvm-svn: 49938
2008-04-18 22:43:39 +00:00
Steve Naroff
472cf88ef2
Remove bogus cast (<rdar://problem/5874848> clang objc-rewriter: structure with list of protocols has wrong cast).
...
llvm-svn: 49935
2008-04-18 22:15:15 +00:00
Ted Kremenek
bf27dc9659
Reenable using the PathDiagnosticClient for BugReports without paths.
...
llvm-svn: 49934
2008-04-18 22:11:59 +00:00
Ted Kremenek
cf9e9c5554
Use 'clang' binary in the same dir as scan-build; if it isn't there use the one in the path
...
llvm-svn: 49933
2008-04-18 22:00:56 +00:00
Steve Naroff
24840f6748
Implement FIXME discoved by <rdar://problem/5874876> Rewriter: Explicit ivar refs outside a method are being rewritten
...
llvm-svn: 49932
2008-04-18 21:55:08 +00:00
Ted Kremenek
8886b3021e
Turn on CF reference count checker.
...
llvm-svn: 49931
2008-04-18 21:53:01 +00:00
Steve Naroff
dcdcdcdfef
Fix <rdar://problem/5874697> Rewriter: method arguments with complex types not being rewritten properly.
...
llvm-svn: 49925
2008-04-18 21:13:19 +00:00
Ted Kremenek
31484b2477
Generalize caching mechanism for bugs reports. Now individual BugTypes
...
can decide the policy on how to cache related bugs. This allows us to
properly to handle warning about multiple leaks in the same location in the
ref count checker (not yet done).
llvm-svn: 49918
2008-04-18 20:54:29 +00:00
Ted Kremenek
c072b820cf
Fixed more caching bugs related to the one fixed in r49914. Silence
...
compiler warning introduced by a recent patch of mine.
llvm-svn: 49917
2008-04-18 20:35:30 +00:00
Ted Kremenek
acefba896c
Fixed elusive caching bug that led to false positives.
...
llvm-svn: 49914
2008-04-18 19:34:16 +00:00
Ted Kremenek
4d83728a57
Added "GetErrorNodes()" to BugType so that -trim-egraph can recognize errors
...
from registered BugTypes. This helps with debugging.
Add detection of NULL values in ref count checker; this suppresses false positives.
llvm-svn: 49912
2008-04-18 19:23:43 +00:00
Ted Kremenek
3388381993
Added "EvalAssume" virtual method to GRTransferFuncs; this is for evaluating
...
the checker-specific logic of symbolic assumptions.
llvm-svn: 49910
2008-04-18 17:20:23 +00:00
Nate Begeman
65bea23674
Tabs -> spaces
...
llvm-svn: 49909
2008-04-18 17:17:24 +00:00
Ted Kremenek
532ba14fdb
Spelling fix.
...
llvm-svn: 49908
2008-04-18 16:58:34 +00:00
Ted Kremenek
d004c418b6
Fixed bug in GREndPathNodeBuilder: only return a node if it wasn't in the node cache.
...
llvm-svn: 49907
2008-04-18 16:30:14 +00:00
Ted Kremenek
b06817e914
scan-build now fixes permissions of report files and directories, which may
...
be created as "temporary files" that are not world readable.
llvm-svn: 49904
2008-04-18 15:18:20 +00:00
Ted Kremenek
4bf02a0856
Compute a digest of each report file, and nuke reports that have the same
...
digest as a file already added to the index. This a workaround for the
analyzer analyzing the same file more than once, which can happen when building
multiple targets.
llvm-svn: 49903
2008-04-18 15:09:30 +00:00
Nate Begeman
c00bed3871
Initialize default double width and alignment
...
llvm-svn: 49899
2008-04-18 05:49:49 +00:00
Nate Begeman
26ed25253e
Allow targets to override double size, alignment, and semantics, and tie this
...
information into the IR type codegen. This allows a target to codegen the C
'double' type as either double or float.
llvm-svn: 49898
2008-04-18 05:41:31 +00:00
Ted Kremenek
71c41d9561
Restore macro expansion for HTMLPrint by using the original Preprocessor.
...
This is a workaround until we figure out why a freshly create Preprocessor
doesn't expand macros from headers.
llvm-svn: 49897
2008-04-18 05:35:23 +00:00
Ted Kremenek
a960be4bd4
Provide a version of html::HighlightMacros that takes a Preprocessor&.
...
llvm-svn: 49896
2008-04-18 05:34:33 +00:00
Ted Kremenek
f03e07c34d
More grammar fixes.
...
llvm-svn: 49895
2008-04-18 05:32:44 +00:00
Ted Kremenek
ca8892b456
Fix plurality debacle.
...
llvm-svn: 49894
2008-04-18 05:13:26 +00:00
Ted Kremenek
9e48b0c4ed
Fixed range highlighting bug in HTML diagnostics.
...
llvm-svn: 49893
2008-04-18 05:01:33 +00:00
Ted Kremenek
40d601f958
Added path diagnostics for reference counts.
...
llvm-svn: 49892
2008-04-18 04:55:01 +00:00
Chris Lattner
4bbd164a7a
Make tab insertion really right: the number of spaces inserted
...
depends on the column number of the start of the tab.
llvm-svn: 49891
2008-04-18 04:54:20 +00:00
Ted Kremenek
c88fb63da0
Several Expr subclasses did not mark "getSourceRange()" virtual. Fixed.
...
llvm-svn: 49890
2008-04-18 04:18:16 +00:00
Ted Kremenek
396f43620f
BugReport::VisitNode now takes BugReporter& instead of ASTContext&.
...
Shuffled around code in CFRefCount to better pair classes with implementation,
and started adding subclasses of RangedBugReport to handle better diagnostics
for reference count bugs.
llvm-svn: 49889
2008-04-18 03:39:05 +00:00