Benjamin Kramer
ef14f80e95
Fix MSVC build.
...
llvm-svn: 94809
2010-01-29 15:19:06 +00:00
Benjamin Kramer
b17c58674e
Convert some users of ftostr to raw_ostream.
...
llvm-svn: 94808
2010-01-29 14:42:22 +00:00
Benjamin Kramer
6bee24ae9a
Use llvm::format instead of ftostr (which just calls sprintf).
...
llvm-svn: 94807
2010-01-29 14:40:33 +00:00
Chandler Carruth
7e6c0fcc59
Bring driver link order in CMake into alignment with the order in the Makefile.
...
This includes the fix in r94797 to reflect the new dependency of Sema on
Analysis.
llvm-svn: 94806
2010-01-29 10:03:42 +00:00
Duncan Sands
3327498095
Change the SREM case to match the logic in the IR version ComputeMaskedBits.
...
llvm-svn: 94805
2010-01-29 09:45:26 +00:00
Evan Cheng
297a494f55
Catch more trivial tail call opportunities: no inputs and output types match.
...
llvm-svn: 94804
2010-01-29 06:45:59 +00:00
Anders Carlsson
385ab187e6
Add getters.
...
llvm-svn: 94803
2010-01-29 06:34:33 +00:00
Duncan Sands
c8a3e56870
Having RHSKnownZero and RHSKnownOne be alternative names for KnownZero and KnownOne
...
(via APInt &RHSKnownZero = KnownZero, etc) seems dangerous and confusing to me: it
is easy not to notice this, and then wonder why KnownZero/RHSKnownZero changed
underneath you when you modified RHSKnownZero/KnownZero etc. So get rid of this.
No intended functionality change (tested with "make check" + llvm-gcc bootstrap).
llvm-svn: 94802
2010-01-29 06:18:46 +00:00
Duncan Sands
26cd6bd0b0
It looks like the changes to the SRem logic of SimplifyDemandedUseBits
...
(fix for PR6165) are needed here too.
llvm-svn: 94801
2010-01-29 06:18:37 +00:00
Anders Carlsson
42c876dff2
Use EmitLValueForFieldInitialization when synthesizing the copy ctor as well.
...
llvm-svn: 94800
2010-01-29 05:41:25 +00:00
Anders Carlsson
db78f0ad04
Add a new EmitLValueForFieldInitialization that will be used for initializing fields (and reference type fields in particular).
...
llvm-svn: 94799
2010-01-29 05:24:29 +00:00
Anders Carlsson
5d8645b150
Simplify EmitLValueForField - we can get whether the field is part of a union or not from the FieldDecl (through its DeclContext).
...
llvm-svn: 94798
2010-01-29 05:05:36 +00:00
Zhongxing Xu
0fcbe369aa
Fix linking problem on Linux.
...
llvm-svn: 94797
2010-01-29 03:25:47 +00:00
Daniel Dunbar
45c7ff1d79
ARM/APCS ABI: Fix some problems with bit-fields in structures. After rereading
...
the ABI spec, this turns out to simplify the code. We still have some annoying
code which mismatches the spec with regard to empty structures.
llvm-svn: 94796
2010-01-29 03:22:29 +00:00
Daniel Dunbar
864b1aae63
FileCheck: Switch "possible match" calculation to use StringRef::edit_distance.
...
- Thanks Doug, who is obviously less lazy than me!
llvm-svn: 94795
2010-01-29 03:22:19 +00:00
Ted Kremenek
c22f78ddfd
Alternate format string checking: issue warnings for incomplete format specifiers.
...
In addition, move ParseFormatString() and FormatStringHandler() from
the clang::analyze_printf to the clang namespace. Hopefully this will
resolve some link errors on Linux.
llvm-svn: 94794
2010-01-29 03:16:21 +00:00
Anders Carlsson
a91be641a7
Simplify InitListChecker::CheckReferenceType
...
llvm-svn: 94793
2010-01-29 02:47:33 +00:00
Ted Kremenek
94af575e9c
Alternate format string checking: issue a warning for invalid conversion specifiers.
...
llvm-svn: 94792
2010-01-29 02:40:24 +00:00
Anders Carlsson
ba6c437d52
Add an CXXBindReferenceExpr (not used just yet).
...
llvm-svn: 94791
2010-01-29 02:39:32 +00:00
Ted Kremenek
176f7d6ef0
Yet another attempt to make the Linux buildbots happy. Apparently there are differences on how nested namespaces are handled...
...
llvm-svn: 94790
2010-01-29 02:13:53 +00:00
Anders Carlsson
18c352605f
Update .xcodeproj file (Yes this is getting old and I should really switch to the cmake based project :)
...
llvm-svn: 94789
2010-01-29 01:56:42 +00:00
Fariborz Jahanian
b5f99c3f4f
Fixes rewriter bug rewriting byref related API where a struct
...
definition comes after where it is needed. Fixes radar 7589385.
llvm-svn: 94788
2010-01-29 01:55:49 +00:00
Ted Kremenek
019d224d91
Alternate format string checking: check for excess data arguments.
...
llvm-svn: 94787
2010-01-29 01:50:07 +00:00
John McCall
180ef09371
Do a little magic and a little greasework to make it much more efficient
...
to cast a DeclContext down to a specific implementation class.
There are still lots of calls to Decl::castFromDeclContext left, mostly
arising from DeclContext::getParent().
llvm-svn: 94786
2010-01-29 01:45:37 +00:00
Ted Kremenek
9fcd8305c0
Alternate format string checking: check if the number of format specifiers exceeds the number of arguments.
...
llvm-svn: 94785
2010-01-29 01:43:31 +00:00
Ted Kremenek
559d89a02a
Move definition of FormatStringHandler::~FormatStringHandler() within namespace directives. Hopefully this will make the Linux buildbots happy.
...
llvm-svn: 94784
2010-01-29 01:37:52 +00:00
Eric Christopher
9b3c02b7da
Make strcpy_chk lower to strcpy if we have a safe size.
...
llvm-svn: 94783
2010-01-29 01:37:11 +00:00
Ted Kremenek
d5fd0fac38
Alternate format string checking: warn of '%n' as being potentially insecure.
...
llvm-svn: 94782
2010-01-29 01:35:25 +00:00
Sean Callanan
e8f5e8c9f8
Quick fix to make the header file for the enhanced
...
disassembly information have a better comment (and
better guard macros).
llvm-svn: 94781
2010-01-29 01:34:29 +00:00
Sean Callanan
2444ed4fea
Added a bare-bones Makefile to build the enhanced disassembly
...
library as a static and a shared library. Added dependencies
so the target-specific enhanced disassembly info tables are
built before the library.
llvm-svn: 94780
2010-01-29 01:30:01 +00:00
Ted Kremenek
9d1e666af0
Recognize 'add_executable' when analyzing CMake files.
...
llvm-svn: 94777
2010-01-29 01:10:55 +00:00
Ted Kremenek
ffe9c20eaa
Update CMake build.
...
llvm-svn: 94776
2010-01-29 01:10:25 +00:00
Eric Christopher
997f7ca8c5
Add constant support to object size handling and remove default
...
lowering. We'll either figure it out, or not and be lowered by
SelectionDAGBuild.
Add test.
llvm-svn: 94775
2010-01-29 01:09:57 +00:00
Ted Kremenek
5739de77fa
Add precision/field width checking to AlternateCheckPrintfString().
...
llvm-svn: 94774
2010-01-29 01:06:55 +00:00
Bill Wendling
48816a0b3f
Generic reformatting and comment fixing. No functionality change.
...
llvm-svn: 94771
2010-01-29 00:52:43 +00:00
Douglas Gregor
69ff5dc0cb
Harden the CIndex implementation a bit, so that it does not assert
...
when given bad inputs.
llvm-svn: 94769
2010-01-29 00:47:48 +00:00
Douglas Gregor
60b11f6dfd
When printing diagnostics in c-index-test, also print source ranges
...
and fix-it information, so we can see everything in one place. Along
the way, fix a few bugs with deserialization and query of diagnostics
in CIndex.
llvm-svn: 94768
2010-01-29 00:41:11 +00:00
Bill Wendling
8277838cf8
Add newline to debugging output, and fix some grammar-os in comment.
...
llvm-svn: 94765
2010-01-29 00:27:39 +00:00
Sean Callanan
82436d1666
Added a custom TableGen backend to support the
...
enhanced disassembler, and the necessary makefile
rules to build the table for X86.
llvm-svn: 94764
2010-01-29 00:21:04 +00:00
Victor Hernandez
006b53f199
mem2reg erases the dbg.declare intrinsics that it converts to dbg.val intrinsics
...
llvm-svn: 94763
2010-01-29 00:01:35 +00:00
Ted Kremenek
b5c98ef61e
Fix off-by-one error in ParseFormatSpecifier() when reporting the location of a null character.
...
llvm-svn: 94762
2010-01-28 23:56:52 +00:00
Ted Kremenek
ab278de2d1
Start fleshing out Sema::AlternateCheckPrintfString():
...
- Add an anonymous class 'CheckPrintfHandler' which will do the
checking of specific format specifiers
- Add checking for using the '@' conversion specifier outside
an ObjC string literal
- Add checking for null characters within the string
llvm-svn: 94761
2010-01-28 23:39:18 +00:00
Devang Patel
7bfc596fcf
s/CGDebugInfo::getContext/CGDebugInfo::getContextDescriptor/g to avoid confusion.
...
llvm-svn: 94760
2010-01-28 23:15:27 +00:00
Devang Patel
128aa9d176
Fix indentation.
...
llvm-svn: 94758
2010-01-28 21:54:15 +00:00
Bill Wendling
954cb187e0
Assign the ordering of SDNodes in a much less intrusive fashion. After the
...
"visit*" method is called, take the newly created nodes, walk them in a DFS
fashion, and if they don't have an ordering set, then give it one.
llvm-svn: 94757
2010-01-28 21:51:40 +00:00
Devang Patel
4c3e7e99ca
Static methods do not need "this" pointer argument.
...
llvm-svn: 94756
2010-01-28 21:43:50 +00:00
Devang Patel
946edc1aa6
Emit base classes info first, as expected by the debugger.
...
llvm-svn: 94755
2010-01-28 21:41:35 +00:00
Anders Carlsson
b1ef991097
Fix an incorrect union layout assert. Fixes PR6164.
...
llvm-svn: 94754
2010-01-28 18:22:03 +00:00
Devang Patel
0d61eebd81
s/FunctionNames/DebugInfoNames/g
...
llvm-svn: 94753
2010-01-28 18:21:00 +00:00
Mikhail Glushenkov
04f442c515
Support some more options...
...
llvm-svn: 94752
2010-01-28 18:19:36 +00:00