Commit Graph

121763 Commits

Author SHA1 Message Date
Ted Kremenek 8d968ad5c0 Move -Wcovered-switch-default out of -Wswitch (and -Wall), and make it an opt-in warning.
This is a great warning, but it was observed that a ton of real world code violates
it all the time for (semi-)legitimate reasons.  This warnings is fairly pedantic, which is good,
but not for everyone.  For example, there is a fair amount of idiomatic code out there
that does "default: abort()", and similar idioms.

Addresses <rdar://problem/10814651>.

llvm-svn: 150055
2012-02-08 05:08:58 +00:00
Ted Kremenek afa6e249cb Change PathDiagnosticPieces to be reference counted (simplifying their management), and introduce 'PathPieces' as a common container for PathDiagnosticPieces.
llvm-svn: 150054
2012-02-08 04:32:34 +00:00
Ted Kremenek 3116c4e5cd Refactor pieces of PathDiagnostic into its own data structure. No functionality change.
llvm-svn: 150053
2012-02-08 04:32:27 +00:00
Sean Callanan c03bdd9c80 Fixed ClangExpressionDeclMap to use the debug
information about the current frame rather than
the debug information about "this" and "self"
when determining the types of those pointers.
This allows expressions to work in frames that
don't have valid "this" and "self" pointers,
working around poor debug information.

llvm-svn: 150051
2012-02-08 03:45:08 +00:00
Eli Friedman 77dcc726de Make sure template argument deduction is consistently performed in an unevaluated context.
llvm-svn: 150049
2012-02-08 03:07:05 +00:00
Argyrios Kyrtzidis 95c0feb5e0 [libclang] Indexing: When suppressing references, suppress references
of bases in C++ classes. rdar://10768707

llvm-svn: 150048
2012-02-08 03:04:33 +00:00
Chad Rosier 0ee8c513f7 [fast-isel] Add support for SUBs with non-legal types.
llvm-svn: 150047
2012-02-08 02:45:44 +00:00
Chad Rosier bfe7393d7d Add comment to test case.
llvm-svn: 150046
2012-02-08 02:30:12 +00:00
Chad Rosier bd471255a9 [fast-isel] Add support for ORs with non-legal types.
llvm-svn: 150045
2012-02-08 02:29:21 +00:00
Andrew Trick 3bc0e0c651 Added MachineInstr::isBundled() to check if an instruction is part of a bundle.
llvm-svn: 150044
2012-02-08 02:17:25 +00:00
Andrew Trick e57583ab19 misched: bug in debug output.
llvm-svn: 150043
2012-02-08 02:17:21 +00:00
Andrew Trick 036fece5bb whitespace
llvm-svn: 150042
2012-02-08 02:17:18 +00:00
Andrew Trick de9f8979c4 stale comment
llvm-svn: 150041
2012-02-08 02:17:16 +00:00
Eric Christopher b2db8e47e2 Constify the getClassName routine and variables that come out of it,
and then use it for forward decl names.

Part of rdar://10209967 and rdar://10400981

llvm-svn: 150040
2012-02-08 01:53:14 +00:00
Johnny Chen 3434b19d63 Clarify the 'frame variable' help message regarding the watchpoint functionality.
llvm-svn: 150039
2012-02-08 01:50:38 +00:00
Chris Lattner 042e3720c3 add an explicit section on static constructors.
llvm-svn: 150037
2012-02-08 01:44:00 +00:00
Johnny Chen 97cdf36171 Update comment.
llvm-svn: 150036
2012-02-08 01:35:38 +00:00
Akira Hatanaka c07c4655f1 Do not return records with non trivial destructors or copy constructors in
registers.

llvm-svn: 150035
2012-02-08 01:31:22 +00:00
Sean Callanan 94a9a39ec4 The IRInterpreter's constant evaluator wasn't
sufficiently general - it could only handle
literals and operations that didn't change the
data.  Now the constant evaluator passes APInt
values around, and can handle GetElementPtr
constants.

llvm-svn: 150034
2012-02-08 01:27:49 +00:00
Argyrios Kyrtzidis a2a299e586 [libclang] For CXXOperatorCallExprs, give a valid source location to the DeclRefExpr
that is referencing the member function, so we can index the referenced function.

Fixes rdar://10762375&10324915 & http://llvm.org/PR11192

llvm-svn: 150033
2012-02-08 01:21:13 +00:00
Johnny Chen 34ddc8db22 Refine the 'watchpoint set' command to now require either the '-v' option (for watching of a variable) or
the '-e' option (for watching of an address) to be present.

Update some existing test cases with the required option and add some more test cases.

Since the '-v' option takes <variable-name> and the '-e' option takes <expr> as the command arg,
the existing infrastructure for generating the option usage can produce confusing help message,
like:

  watchpoint set -e [-w <watch-type>] [-x <byte-size>] <variable-name | expr>
  watchpoint set -v [-w <watch-type>] [-x <byte-size>] <variable-name | expr>

The solution adopted is to provide an extra member field to the struct CommandArgumentData called
(uint32_t)arg_opt_set_association, whose purpose is to link this particular argument data with some
option set(s).  Also modify the signature of CommandObject::GetFormattedCommandArguments() to:

  GetFormattedCommandArguments (Stream &str, uint32_t opt_set_mask = LLDB_OPT_SET_ALL)

it now takes an additional opt_set_mask which can be used to generate a filtered formatted command
args for help message.

Options::GenerateOptionUsage() impl is modified to call the GetFormattedCommandArguments() appropriately.
So that the help message now looks like:

  watchpoint set -e [-w <watch-type>] [-x <byte-size>] <expr>
  watchpoint set -v [-w <watch-type>] [-x <byte-size>] <variable-name>

rdar://problem/10703256

llvm-svn: 150032
2012-02-08 01:13:31 +00:00
Kostya Serebryany 5c3c1286a5 Don't use static CTORs for the Attributes constants, while still keeping the class type-safe
llvm-svn: 150031
2012-02-08 01:11:21 +00:00
Fariborz Jahanian 48985804cd modern objc rewriter: mode metadata stuff. wip.
llvm-svn: 150030
2012-02-08 00:50:52 +00:00
John McCall 5ece54ce3f Only complain about __strong __strong id, not __strong SomeStrongTypedef
or __strong __typeof__(some.strong.thing).

llvm-svn: 150029
2012-02-08 00:46:41 +00:00
John McCall 18ce25e1ec Revise the SplitQualType interface to make it its own thing instead of
a typedef of std::pair.  This slightly improves type-safety, but mostly
makes code using it clearer to read as well as making it possible to add
methods to the type.

Add such a method for efficiently single-step desugaring a split type.
Add a method to single-step desugaring a locally-unqualified type.
Implement both the SplitQualType and QualType methods in terms of that.

Also, fix a typo ("ObjCGLifetime").

llvm-svn: 150028
2012-02-08 00:46:36 +00:00
Kostya Serebryany 9716914b2d [asan] better warning messages for double-free bugs (provide allocation/deallocation stack traces)
llvm-svn: 150027
2012-02-08 00:42:29 +00:00
Eric Christopher f76dd56dd3 Whitespace.
llvm-svn: 150026
2012-02-08 00:23:21 +00:00
Eric Christopher 75b90c4a86 Use the new forward declaration scheme for records. Also add more
caching of results after we create them.

Fixes rdar://10809898

llvm-svn: 150025
2012-02-08 00:23:18 +00:00
Eric Christopher ae56eecf5f Add support for a temporary forward decl type. We want this so we
can rauw forward declarations if we decide to emit the full type.

Part of rdar://10809898

llvm-svn: 150024
2012-02-08 00:22:26 +00:00
Devang Patel a93cc25b79 Remove tabs.
llvm-svn: 150022
2012-02-08 00:17:07 +00:00
Devang Patel 00fca3a106 Remove tabs.
llvm-svn: 150021
2012-02-08 00:10:20 +00:00
Sean Callanan 56c198962c If a struct needs to be laid out, and it has not
been completed yet, then complete it if possible.
This fixes some assertion failures encountered by
LLDB.

llvm-svn: 150020
2012-02-08 00:04:52 +00:00
Chad Rosier ded4c99f2e [fast-isel] Add support for indirect branches.
llvm-svn: 150014
2012-02-07 23:56:08 +00:00
Devang Patel d925d1a8d7 Remove tabs.
llvm-svn: 150012
2012-02-07 23:33:58 +00:00
Fariborz Jahanian 67f7c55a9c modern objc abi rewriter: mode protocol metadata
for modern objc abi.

llvm-svn: 150011
2012-02-07 23:31:52 +00:00
Chad Rosier 849a67bba2 Fix indentation and an 80-column violation.
llvm-svn: 150010
2012-02-07 23:24:49 +00:00
Jean-Daniel Dupas 6567f48fd9 non-literal strftime format string is not unsafe.
llvm-svn: 150009
2012-02-07 23:10:53 +00:00
Evan Cheng 1b81fddd65 Use LEA to adjust stack ptr for Atom. Patch by Andy Zhang.
llvm-svn: 150008
2012-02-07 22:50:41 +00:00
Argyrios Kyrtzidis ea9b81b4c6 [libclang] Do not index implicit C++ member functions. rdar://10769813
llvm-svn: 150007
2012-02-07 22:46:16 +00:00
Benjamin Kramer 7ec12c928a Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line.
This seems to negatively affect compile time onsome ObjC tests
(which use a lot of partial diagnostics I assume). I have to come
up with a way to keep them inline without including Diagnostic.h
everywhere. Now adding a new diagnostic requires a full rebuild
of e.g. the static analyzer which doesn't even use those diagnostics.

This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99.
This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789.
This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7.
This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f.
This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5.

llvm-svn: 150006
2012-02-07 22:29:24 +00:00
Sean Callanan 904febc89c Added a .gitignore so that "git status" isn't
quite as busy.

llvm-svn: 150005
2012-02-07 21:53:52 +00:00
Sean Callanan 8e8072d195 Made SymbolFileDWARF be less strict when looking
for types that can be uniqued to the given type.
This is especially helpful when types are missing
file and line information.

llvm-svn: 150004
2012-02-07 21:13:38 +00:00
Hal Finkel 61f210b5c0 Allow bugpoint to recognize -bb-vectorize
llvm-svn: 150003
2012-02-07 21:11:12 +00:00
Fariborz Jahanian 4aaf8b15c9 objc rewriter: modern metadata for protocol decls. wip.
llvm-svn: 150002
2012-02-07 20:15:08 +00:00
Chad Rosier 4c17fa7620 In r149662, setDiagnosticMapping was modified to not allow warnings mapped to
MAP_ERROR to be remapped to MAP_WARNING.  These new APIs are being added to 
allow the diagnostic mapping's "no Werror" bit to be set, and potentially 
downgrade anything already mapped to be a warning.

llvm-svn: 150001
2012-02-07 19:55:45 +00:00
David Blaikie 09d20eefaa Make use of const-correct ParseCommandLineOptions
llvm-svn: 150000
2012-02-07 19:36:38 +00:00
David Blaikie 0210e97680 Correct use of const in ParseCommandLineOptions
llvm-svn: 149999
2012-02-07 19:36:01 +00:00
Jean-Daniel Dupas 6255bd14f0 Implements support of format_arg attribute on C++ member.
llvm-svn: 149998
2012-02-07 19:01:42 +00:00
Benjamin Kramer 57d2c78572 ocaml bindings: landing pad is now the last opcode.
llvm-svn: 149997
2012-02-07 18:58:19 +00:00
Devang Patel 56a321df0b Remove tabs.
llvm-svn: 149996
2012-02-07 18:55:08 +00:00