Sean Callanan
48b1804e79
Bugfixes for edis. Code to initialize instruction
...
state was being executed too lazily, and the LLVM
assembly syntax for the disassembler was not being
written into the proper disassembler state variable.
llvm-svn: 100830
2010-04-09 00:11:15 +00:00
Dan Gohman
9b5d0bb774
Avoid allocating a value of zero in a register if the initial formula
...
inputs happen to negate each other.
llvm-svn: 100828
2010-04-08 23:36:27 +00:00
Ted Kremenek
e1a38ab422
Use '%clang_cc1' instead of '%clang' to make the warning output more consistent across
...
platforms (for this test).
llvm-svn: 100827
2010-04-08 23:17:16 +00:00
Dan Gohman
7808d490d3
Add a few more lint checks.
...
llvm-svn: 100825
2010-04-08 23:05:57 +00:00
Dan Gohman
4ce1fb1448
Add variants of ult, ule, etc. which take a uint64_t RHS, for convenience.
...
llvm-svn: 100824
2010-04-08 23:03:40 +00:00
Ted Kremenek
212182d12b
For 'open' check in UnixAPIChecker, hard code value of 'O_CREAT' on Darwin.
...
This is still not an ideal solution, but should disable the check for other
targets where the value of O_CREAT is different.
llvm-svn: 100818
2010-04-08 22:15:34 +00:00
Douglas Gregor
5e349b5469
Reorder diagnostics to separate the Sema::AssignmentAction diagnostics from other diagnostics
...
llvm-svn: 100817
2010-04-08 22:07:57 +00:00
Ted Kremenek
769b06cba3
Temporarily only enable 'open' check on Mac OS X to unbreak Windows buildbot. I'm
...
looking into an alternate fix right now.
llvm-svn: 100816
2010-04-08 21:54:13 +00:00
Chris Lattner
80c345927e
delete a forwarding function.
...
llvm-svn: 100815
2010-04-08 21:34:17 +00:00
Douglas Gregor
f19ac0ede9
Downgrade the "declaration does not declare anything" error to a
...
warning. It's not harmful to have such pointless declarations, and GCC
does not diagnose this issue consistently.
llvm-svn: 100814
2010-04-08 21:33:23 +00:00
Fariborz Jahanian
d9235dbc02
Implement method type encoding in the presense
...
of c-style arguments. Completes radar 7445205.
llvm-svn: 100813
2010-04-08 21:29:11 +00:00
Chris Lattner
5418dd5fda
move elf section uniquing to MCContext. Along the way
...
merge XCore's section into MCSectionELF
llvm-svn: 100812
2010-04-08 21:26:26 +00:00
Johnny Chen
75f82345c4
Now that Evan Cheng has fixed the coalescer bug (r100804), the workaround code
...
to avoid memcpy() call is no longer necessary.
llvm-svn: 100811
2010-04-08 21:23:54 +00:00
Ted Kremenek
5c7f596b4c
Match GCC's behavior and do not include '-Wunused-parameter' in '-Wunused'.
...
llvm-svn: 100810
2010-04-08 21:10:56 +00:00
Jeffrey Yasskin
54eba427ed
Explain that a template needs arguments to make it into a type, for
...
variable declarations.
llvm-svn: 100809
2010-04-08 21:04:54 +00:00
Chris Lattner
433d40695b
remove the TargetLoweringObjectFileMachO::getMachoSection
...
api and update clients to use MCContext instead.
llvm-svn: 100808
2010-04-08 20:40:11 +00:00
Chris Lattner
2073112fc0
move macho section uniquing from MCParser and TLOF to MCContext where
...
the compiler and asmparser now unique to the same sections. This fixes
rdar://7835021.
llvm-svn: 100807
2010-04-08 20:30:37 +00:00
John McCall
17762b8a5d
Set access properly on instantiated friend class template declarations.
...
Fixes PR6752.
llvm-svn: 100806
2010-04-08 20:25:50 +00:00
Evan Cheng
b083c47c21
Coalescer should not delete copy instructions whose defs are partially dead. e.g.
...
%RDI<def,dead> = MOV64rr %RAX<kill>, %EDI<imp-def>
llvm-svn: 100804
2010-04-08 20:02:37 +00:00
Ted Kremenek
ea4a5abf61
Add static analyzer check for calls to 'pthread_once()' where the control-flow has
...
automatic storage. This matches the corresponding check for 'dispatch_once()'.
llvm-svn: 100803
2010-04-08 19:53:31 +00:00
Ted Kremenek
7ffb294c5b
Update CMake build.
...
llvm-svn: 100802
2010-04-08 18:52:18 +00:00
Ted Kremenek
a0859f1e7d
Update test case.
...
llvm-svn: 100801
2010-04-08 18:51:47 +00:00
Ted Kremenek
afed24b472
Remove micro-optimization for not issueing CFG-based warnings for 'static inline' functions
...
unless they are used. I discussed this with Daniel Dunbar, and we agreed that this
provides an inconsistent warnings experience for the user and that there were
genuine cases where we wouldn't want to do this optimization.
llvm-svn: 100800
2010-04-08 18:51:44 +00:00
Ted Kremenek
d87bd77586
Fix -Wsign-compare warning (issued by clang++).
...
llvm-svn: 100799
2010-04-08 18:49:30 +00:00
Dan Gohman
98bc4371c7
Add a -lint pass which checks for common sources of undefined or likely
...
unintended behavior.
llvm-svn: 100798
2010-04-08 18:47:09 +00:00
Devang Patel
359b013129
Rename a function.
...
llvm-svn: 100797
2010-04-08 18:43:56 +00:00
Chris Lattner
294a90d87a
implicit defs get added to the end of machine instrs sometimes. Scan the whole instruction for the metadata operand instead of assuming it will be at the end of the instruction.
...
llvm-svn: 100792
2010-04-08 18:20:52 +00:00
Douglas Gregor
01e09d9d91
Introduce an egregious hack to work around a bug in libstdc++ 4.2.x's
...
<tr1/hashtable> header, where a friend class template
std::tr1::__detail::_Map_base is declared with the wrong template
parameters. GCC doesn't catch the problem, so Clang does a little
back-flip to avoid diagnosing just this one instance of the problem.
llvm-svn: 100790
2010-04-08 18:16:15 +00:00
Dan Gohman
cb45bd9cb3
Pointers to zero-sized objects don't point to overlapping objects.
...
llvm-svn: 100789
2010-04-08 18:11:50 +00:00
Fariborz Jahanian
590c3524ac
Fix a misuse of iterators when iterating through block's
...
parameters list for encoding.
llvm-svn: 100788
2010-04-08 18:06:22 +00:00
Dan Gohman
386e01e879
Print empty structs as {} rather than { }.
...
llvm-svn: 100787
2010-04-08 18:03:05 +00:00
Ted Kremenek
a1de6fc575
Include all warnings under '-Wunused' in '-Wmost' and '-Wall'.
...
llvm-svn: 100786
2010-04-08 17:54:28 +00:00
Ted Kremenek
9f6bcf7b45
Sort entries in diagnostic group "Most".
...
llvm-svn: 100785
2010-04-08 17:54:24 +00:00
John McCall
cf75c1e4ed
Maybe we should store template arguments in the position we allocated for them
...
instead of scribbling over random memory. Maybe.
Hopefully this fixes the -vg buildbot.
llvm-svn: 100784
2010-04-08 17:47:15 +00:00
Dan Gohman
b6c29c27da
Fix a comment.
...
llvm-svn: 100783
2010-04-08 17:41:04 +00:00
Jeffrey Yasskin
96f8a4a82f
Touch configure so it regenerates Disassemblers.def to include ARM so
...
people stop seeing a broken build in EDDisassembler.cpp
llvm-svn: 100782
2010-04-08 17:19:20 +00:00
Devang Patel
3ebd8931fb
One instruction may start (or end) multiple lexical scopes.
...
There is no need to remember labels identifying regions marked by such instructions in each scope.
llvm-svn: 100781
2010-04-08 16:50:29 +00:00
Gabor Greif
64d8d1a022
clean up algorithm and remove operand order assumptions
...
llvm-svn: 100780
2010-04-08 16:46:24 +00:00
Jeffrey Yasskin
c76498d409
Make CXXScopeSpec invalid when incomplete, and propagate that into any
...
Declarator that depends on it. This fixes several redundant errors and bad
recoveries.
llvm-svn: 100779
2010-04-08 16:38:48 +00:00
Anders Carlsson
af2a317e05
Rename CGVtable files to CGVTables.
...
llvm-svn: 100778
2010-04-08 16:30:25 +00:00
Anders Carlsson
ae9e9a63bd
Clarify an assert.
...
llvm-svn: 100776
2010-04-08 16:18:36 +00:00
Douglas Gregor
bc6a434773
Unbreak the build
...
llvm-svn: 100775
2010-04-08 16:07:47 +00:00
Dan Gohman
bc048307f3
Fix a comment.
...
llvm-svn: 100774
2010-04-08 15:57:10 +00:00
Benjamin Kramer
31160e8469
CIndex: move extractUSRSuffix out of extern "C" and simplify it.
...
llvm-svn: 100773
2010-04-08 15:54:07 +00:00
Douglas Gregor
eadd3cace9
Eliminate excessive PCH deserialization caused by the search for
...
__cxxabiv1::__fundamental_type_info in every translation
unit. Previously, we would perform name lookup for
__cxxabiv1::__fundamental_type_info at the end of IRGen for a each
translation unit, to determine whether it was present. If so, we we
produce type information for all of the fundamental types. However,
this name lookup causes PCH deserialization of a significant part of the
translation unit, which has a woeful impact on performance.
With this change, we now look at each record type after we've
generated its vtable to see if it is
__cxxabiv1::__fundamental_type_info. If so, we generate type info for
all of the fundamental types. This works because
__cxxabiv1::__fundamental_type_info should always have a key function
(typically the virtual destructor), that will be defined once in the
support library. The fundamental type information will end up there.
Fixes <rdar://problem/7840011>.
llvm-svn: 100772
2010-04-08 15:52:03 +00:00
Devang Patel
2abed283e5
Remove dead code.
...
llvm-svn: 100771
2010-04-08 15:48:02 +00:00
Benjamin Kramer
f41ccef5eb
Remove caseless switch.
...
llvm-svn: 100770
2010-04-08 15:44:22 +00:00
Devang Patel
adfd4df12c
Delete out of date comment.
...
llvm-svn: 100769
2010-04-08 15:41:13 +00:00
Devang Patel
f1d5a1e994
Refactor.
...
llvm-svn: 100768
2010-04-08 15:37:09 +00:00
Benjamin Kramer
53dd088b58
Various MSVC warning fixes about truncated 64 bit shifts and const pointers passed to free.
...
llvm-svn: 100767
2010-04-08 15:25:57 +00:00