Commit Graph

122390 Commits

Author SHA1 Message Date
Richard Smith 1002d10aaa Reject continue/break statements within members of local functions nested within
loop and switch statements, by teaching Scope that a function scope never has
a continue/break parent for the purposes of control flow. Remove the hack in
block and lambda expressions which worked around this by pretending that such
expressions were continue/break scopes.

Remove Scope::ControlParent, since it's unused.

In passing, teach default statements to recover properly from a missing ';', and
add a fixit for same to both default and case labels (the latter already
recovered correctly).

llvm-svn: 150776
2012-02-17 01:35:32 +00:00
Jia Liu dd6c1cd4e8 add Emacs tag and fix some comment error in file headers
llvm-svn: 150775
2012-02-17 01:23:50 +00:00
Chad Rosier fcd29ae390 [fast-isel] Add support for returning non-legal types with no sign- or zero-
entend flag.

llvm-svn: 150774
2012-02-17 01:21:28 +00:00
Lang Hames d9f2152a2e MachineScheduler shouldn't use/preserve LiveDebugVariables.
llvm-svn: 150773
2012-02-17 01:11:37 +00:00
Sean Callanan 95e5c63012 Added a new disassembler plugin, DisassemblerLLVMC,
which uses the Disassembler.h interface to the LLVM
disassemblers rather than the EnhancedDisassembly.h
interface.  Disassembler.h is a better-maintained
API and will be stabler in the long term.

Currently the output from Disassembler.h does not
provide for symbolic disassembly in all the places
that the old disassembler did, so I have gated (and
disabled) the disassembler.  It'll be easy to flip
the switch later.

In the meantime, to enable the new disassembler,
uncomment "#define USE_NEW_DISASSEMBLER" in
lldb.cpp.

llvm-svn: 150772
2012-02-17 00:53:45 +00:00
Lang Hames def9c61e4b Oops - isRegLiveIntoSuccessor is used in non-assert builds now. Remove NDEBUG guards.
llvm-svn: 150771
2012-02-17 00:51:32 +00:00
Richard Smith 5d108606cc PR12012: Fix a regression in r150419 where we would try (and fail) to
zero-initialize class types with virtual bases when constant-evaluating an
initializer.

llvm-svn: 150770
2012-02-17 00:44:16 +00:00
Lang Hames 5bade3dc6e Re-enable 150652 and 150654 - Make FPSCR non-reserved, and make MachineCSE bail on reserved registers. This *should* be safe as of r150786.
llvm-svn: 150769
2012-02-17 00:27:16 +00:00
Lang Hames 0d72bb49f0 Turn off assertion, conservatively compute liveness for live-in un-allocatable registers.
llvm-svn: 150768
2012-02-17 00:18:18 +00:00
Fariborz Jahanian e7a0c93cd9 objective-c translator. More stuff for modern meta-data.
llvm-svn: 150767
2012-02-17 00:06:14 +00:00
Johnny Chen 3517d12826 memory read -f X doesn't print anything (lldb should warn when encountering an unsupported byte size)
Also add a test sequence for it.

rdar://problem/10876841

llvm-svn: 150766
2012-02-16 23:09:08 +00:00
Eric Christopher 4c006e557d Reapply r150631:
"Add a completed/incomplete type difference. This allows us to have
    partial types for contexts and forward decls while allowing us to
    complete types later on for debug purposes.

    This piggy-backs on the metadata replacement and rauw changes
    for temporary nodes and takes advantage of the incremental
    support I added in earlier. This allows us to, if we decide,
    to limit adding methods and variables to structures in order
    to limit the amount of debug information output into a .o file.

    The caching is a bit complicated though so any thoughts on
    untangling that are welcome."

with a fix:

 - Remove all RAUW during type construction by adding stub versions
   of types that we later complete.

and some TODOs:

 - Add an RAUW cache for forward declared types so that we can replace
   them at the end of compilation.
 - Remove the code that updates on completed types because we no
   longer need to have that happen. We emit incomplete types on
   purpose and only want to know when we want to complete them.

llvm-svn: 150752
2012-02-16 22:54:45 +00:00
Akira Hatanaka b4d2ccf2ab Remove comment.
llvm-svn: 150739
2012-02-16 22:52:29 +00:00
Eli Friedman b971d49765 Elide copy construction in new expressions. PR11757.
llvm-svn: 150738
2012-02-16 22:45:48 +00:00
Chad Rosier a0d3c75015 Remove unnecessary assignment to temporary, ResultReg.
llvm-svn: 150737
2012-02-16 22:45:33 +00:00
Bill Wendling ec713ee4b4 Use –mcpu=generic, so that the test will not fail when run on an Intel Atom
processor, due to the Atom scheduler producing an instruction sequence that is
different from that which is expected.
Patch by Michael Spencer!

llvm-svn: 150736
2012-02-16 22:42:48 +00:00
Kaelyn Uhrain 7c019177b0 Avoid infinite mutual recursion in DiagnoseInvalidRedeclaration.
Don't try to typo-correct a method redeclaration to declarations not in
the current record as it could lead to infinite recursion if CorrectTypo
finds more than one correction candidate in a parent record.

llvm-svn: 150735
2012-02-16 22:40:59 +00:00
Anna Zaks 33c364b12b [analyzer] MallocChecker: more tests.
llvm-svn: 150734
2012-02-16 22:26:15 +00:00
Anna Zaks 546c49c3b2 [analyzer] Malloc Checker: Clean up bug naming:
- Rename the category "Logic Error" -> "Memory Error".
 - Shorten all the messages.

llvm-svn: 150733
2012-02-16 22:26:12 +00:00
Anna Zaks 9eb7bc82ae [analyzer] Malloc Checker: Make the diagnostic visitor handle the case
of failing realloc. + Minor cleanups.

llvm-svn: 150732
2012-02-16 22:26:07 +00:00
Matt Beaumont-Gay 2150d38a19 Pacify gcc's -Wreturn-type
llvm-svn: 150731
2012-02-16 22:15:50 +00:00
Johnny Chen 325fa8a77c memory read prints out duplicate entries when using vector formats
DataExtractor::Dump() needs to supply the correct cursor when delegating to the child DataExtractor::Dump() calls.
Add a regression test file.
 
rdar://problem/10872908

llvm-svn: 150729
2012-02-16 22:06:47 +00:00
Fariborz Jahanian c41d828053 fix the property list metadata name.
llvm-svn: 150728
2012-02-16 21:57:59 +00:00
Douglas Gregor 6746c5d487 Improve recovery for lambda expressions that have 'mutable' or a
trailing return type but not a '()'. Recover by inserting the
parentheses. Thanks to Xeo on IRC for the example.

llvm-svn: 150727
2012-02-16 21:53:36 +00:00
Fariborz Jahanian 638252fb5a modern objective-c translator: write the root class meta-data.
llvm-svn: 150726
2012-02-16 21:37:05 +00:00
Douglas Gregor a86bc00d3e Lambda closure types are always considered to be like "local" classes,
even if they are not within a function scope. Teach template
instantiation to treat them as such, and make sure that we have a
local instantiation scope when instantiating default arguments and
static data members.

llvm-svn: 150725
2012-02-16 21:36:18 +00:00
Richard Smith 4fa6aec9fe Make sure we still reject static data members in anonymous unions in C++11.
llvm-svn: 150724
2012-02-16 21:23:54 +00:00
Ted Kremenek 2eef6b9e4b Add checker visitation hooks in ExprEngine::Visit() for common no-op expressions. To be used later.
llvm-svn: 150723
2012-02-16 20:56:01 +00:00
Ted Kremenek 35e55fe49f Revert "Move ExplodedNode reclaimation out of ExprEngine and into CoreEngine. Also have it based on adding predecessors/successors, not node allocation. No measurable performance change."
llvm-svn: 150722
2012-02-16 20:48:04 +00:00
Richard Smith 4297375561 C++11 allows unions to have static data members. Remove the corresponding
restriction and add some tests.

llvm-svn: 150721
2012-02-16 20:41:22 +00:00
Ted Kremenek ea8dbdeefd Move ExplodedNode reclaimation out of ExprEngine and into CoreEngine. Also have it based on adding predecessors/successors, not node allocation. No measurable performance change.
llvm-svn: 150720
2012-02-16 20:19:30 +00:00
Ted Kremenek a2aa929e74 Minor cleanup to node data structures in ExplodedGraph. No functionality change.
llvm-svn: 150719
2012-02-16 20:19:25 +00:00
Hans Wennborg 63cf65f85d Tweak the comment on the 'q' length modifier again.
llvm-svn: 150716
2012-02-16 18:58:32 +00:00
Chad Rosier 42f96b96a2 Update credits.
llvm-svn: 150715
2012-02-16 18:54:41 +00:00
Fariborz Jahanian 0a25688b74 modern objc translator: meta-data generation for first
part of class meta-data.

llvm-svn: 150714
2012-02-16 18:54:09 +00:00
Dan Gohman 7537838499 Fix this test to work with and without Asserts mode.
llvm-svn: 150713
2012-02-16 18:51:05 +00:00
Jakob Stoklund Olesen 0cdf264491 Note x86 regmask operands in release notes.
llvm-svn: 150712
2012-02-16 18:22:39 +00:00
Hans Wennborg b328fe3710 Update comment as per Joerg's comment on r150697.
llvm-svn: 150711
2012-02-16 18:19:51 +00:00
Douglas Gregor 36107ade6f In Objective-C++, allow the keyword 'class' to be used as a property
name for dot syntax, e.g., NSObject.class or foo.class. For other
C++-keywords-as-method-names, use message send syntax. Fixes
<rdar://problem/10794452>.

llvm-svn: 150710
2012-02-16 18:19:22 +00:00
Jakob Stoklund Olesen bc6ba479b6 Remove the YMM_HI_6_15 hack.
Call clobbers are now represented with register mask operands.  The
regmask can easily represent the fact that xmm6 is call-preserved while
ymm6 isn't.  This is automatically computed by TableGen from the
CalleeSavedRegs containing xmm6.

llvm-svn: 150709
2012-02-16 17:56:06 +00:00
Jakob Stoklund Olesen 97e3115dc2 Use the same CALL instructions for Windows as for everything else.
The different calling conventions and call-preserved registers are
represented with regmask operands that are added dynamically.

llvm-svn: 150708
2012-02-16 17:56:02 +00:00
Douglas Gregor 3a5d6c27b2 If code completion patterns are not enabled, use simpler else/else if
completions that don't insert braces. Fixes <rdar://problem/10764168>.

llvm-svn: 150707
2012-02-16 17:49:04 +00:00
Akira Hatanaka 4705b0cc1c Remove trailing whitespace. Add newline.
llvm-svn: 150706
2012-02-16 17:48:20 +00:00
Argyrios Kyrtzidis 6aa70e2c83 Add fixits for ARC casting errors for implicit conversions as well. rdar://10289283
Also fix the fixit (oh the irony) when it uses CFBridgingRetain/CFBridgingRelease;
they are supposed to be calls with the casted expression as parameter, they should
not be inserted into the cast like the __bridge keywords.

llvm-svn: 150705
2012-02-16 17:31:07 +00:00
DeLesley Hutchins 6f13b09a00 Minor fix to template instantiation, which properly instantiates
dependent attributes on static members of templatized classes.

llvm-svn: 150704
2012-02-16 17:30:51 +00:00
Benjamin Kramer b0d75c2f4e Disable machine copy propagation for now. It's known to be buggy (PR11940) and introduces subtle miscompiles in many places.
llvm-svn: 150703
2012-02-16 17:29:50 +00:00
DeLesley Hutchins 3509f29ec5 Thread safety analysis: Don't check for lockable on undefined types.
llvm-svn: 150702
2012-02-16 17:15:51 +00:00
DeLesley Hutchins c2286f6402 Thread-safety analysis: Disable checking inside constructors, destructors, lock, and unlock functions
llvm-svn: 150701
2012-02-16 17:13:43 +00:00
DeLesley Hutchins bc8ffdb68c Thread-Safety: added support for 'this' as a lock expression.
llvm-svn: 150700
2012-02-16 17:03:24 +00:00
Alexey Samsonov fbb50f19ad AddressSanitizer: revert r150683 - we can't get rid of headers that easily
llvm-svn: 150699
2012-02-16 17:00:45 +00:00