Commit Graph

130283 Commits

Author SHA1 Message Date
Richard Barton 5beef2d242 Oops - correct broken disassembly for VMOV
llvm-svn: 159945
2012-07-09 18:20:02 +00:00
Fariborz Jahanian dbed9d42fd objective-c: yank any use of "non-fragile abi" phrase
from diagnostics. // rdar://9657485

llvm-svn: 159943
2012-07-09 17:54:36 +00:00
Chad Rosier 6213549751 80-column and whitespace.
llvm-svn: 159942
2012-07-09 17:31:28 +00:00
Jordan Rose 12e730c6e3 Better parser recovery in Objective-C containers.
Previously it was possible to get an infinite-loop-on-invalid with a namespace
decl within @interface. Since 'namespace' is normally a safe place to retry
top-level parsing, we just didn't consume the token.

This adds a flag that tracks whether we have temporarily left Objective-C
scope to parse a C-like declaration, and uses that to better recover from
parse problems by stopping at possible method declarations and at @end. To
fix the original problem, we do /not/ stop at 'namespace' when in an
Objective-C @interface or @protocol context (but still do in @implementation).

llvm-svn: 159941
2012-07-09 16:54:53 +00:00
Jordan Rose e04395e2f4 [analyzer] When inlining, make sure we use the definition decl.
This was a regression introduced during the CallEvent changes; a call to
FunctionDecl::hasBody was also being used to replace the decl found by
lookup with the actual definition. To keep from making this mistake again
(particularly if/when we start inlining Objective-C methods), this commit
adds a "getDefinition()" method to CallEvent, which should do the right
thing under any circumstances.

llvm-svn: 159940
2012-07-09 16:54:49 +00:00
Jordan Rose f919803001 Downgrade the "direct comparison" error for ObjC literals to a warning.
Chris pointed out that while the comparison is certainly problematic
and does not have well-defined behavior, it isn't any worse than some
of the other abuses that we merely warn about and doesn't need to make
the compilation fail.

Revert the release notes change (r159766) now that this is just a new warning.

llvm-svn: 159939
2012-07-09 16:54:44 +00:00
Richard Barton c9e1c94fae Fix instruction description of VMOV (between two ARM core registers and two single-precision resiters)
llvm-svn: 159938
2012-07-09 16:41:33 +00:00
Richard Barton 35aceb86fe Prevent ARM assembler from losing a right shift by #32 applied to a register
llvm-svn: 159937
2012-07-09 16:31:14 +00:00
Richard Barton d56603722e Spelling!
llvm-svn: 159936
2012-07-09 16:14:28 +00:00
Richard Barton a39625ecc6 Teach the assembler to use the narrow thumb encodings of various three-register dp instructions where permissable.
llvm-svn: 159935
2012-07-09 16:12:24 +00:00
Alexey Samsonov 2467ca5010 [ASan] cleanup: remove dead flag
llvm-svn: 159934
2012-07-09 15:11:28 +00:00
Alexey Samsonov 34efb8e9b9 [ASan] Use common flags parsing machinery.
llvm-svn: 159933
2012-07-09 14:36:04 +00:00
NAKAMURA Takumi d7ba69de90 [CMake] Get rid of unconditional dependency to ClangDiagnosticCommon. Only clangBasic and clangASTMatchers need it.
llvm-svn: 159931
2012-07-09 14:12:20 +00:00
Filipe Cabecinhas 5137f317ce Fixed typos found while reading commit logs.
llvm-svn: 159930
2012-07-09 13:42:24 +00:00
Filipe Cabecinhas 2ada3104ec Fixed errors and warnings on debug code.
llvm-svn: 159929
2012-07-09 13:34:19 +00:00
Alexey Samsonov 2c94cd6e3d [Sanitizer] move flag parsing routines (and unit tests) from tsan runtime to common runtime.
llvm-svn: 159928
2012-07-09 13:21:39 +00:00
Filipe Cabecinhas f065fdcee7 Make error messages more user-friendly for the 'target delete' command.
llvm-svn: 159927
2012-07-09 13:02:17 +00:00
Arnaud A. de Grandmaison 82dd00c5c3 [cindex.py] fix infinite iteration of compilation database CompileCommands
Patch by David Röthlisberger

llvm-svn: 159926
2012-07-09 11:57:30 +00:00
Alexander Kornienko 20f6fc6220 Inline storage of attributes in AttributedStmt.
llvm-svn: 159925
2012-07-09 10:04:07 +00:00
Jason Molenda 75b9cfd1f0 Simplify the CreateDefaultUnwindPlan methods for the x86 and arm unwinders
a bit -- we're creating the UnwindPlan here, we can set the register set to
whatever is convenient for us, no need to handle different register sets.

A handful of small comment fixes I noticed while reading through the code.

llvm-svn: 159924
2012-07-09 07:47:47 +00:00
Manuel Klimek c508a742f7 Links to the python CXCompilationDatabase documentation.
Patch contributed by David Roethlisberger.

llvm-svn: 159923
2012-07-09 05:17:45 +00:00
Richard Smith 34349003cf PR13136:
* When substituting a reference to a non-type template parameter pack where the
   corresponding argument is a pack expansion, transform into an expression
   which contains an unexpanded parameter pack rather than into an expression
   which contains a pack expansion. This causes the SubstNonTypeTemplateParmExpr
   to be inside the PackExpansionExpr, rather than outside, so the expression
   still looks like a pack expansion and can be deduced.

 * Teach MarkUsedTemplateParameters that we can deduce a reference to a template
   parameter if it's wrapped in a SubstNonTypeTemplateParmExpr (such nodes are
   added during alias template substitution).

llvm-svn: 159922
2012-07-09 03:07:20 +00:00
Howard Hinnant 38b99b025c Add test for self-referencing emplace test.
llvm-svn: 159921
2012-07-09 02:47:43 +00:00
Howard Hinnant 598f702b04 Change emplace for vector and deque to create the temporary (when necessary) before any changes to the container are made. Nikolay Ivchenkov deserves the credit for pushing this problem and the solution for it.
llvm-svn: 159918
2012-07-08 23:23:04 +00:00
Richard Smith d636ce5ec1 Halve template depth in an attempt to get this test passing on mingw32.
llvm-svn: 159917
2012-07-08 21:06:29 +00:00
Benjamin Kramer a5e136b613 Remove some trivial copy ctors so the classes become trivially copyable and get the optimized SmallVector implementation.
llvm-svn: 159916
2012-07-08 19:47:51 +00:00
Alexander Potapenko b4e9fd297c Suppress a lint warning.
llvm-svn: 159915
2012-07-08 15:00:06 +00:00
Benjamin Kramer c810a68923 SmallVector: Make use of move semantics to speed up moving objects in erase() and insert()
llvm-svn: 159914
2012-07-08 12:06:35 +00:00
Benjamin Kramer 60d119f7b9 Add missing options for -m(no-){pclmul,fma,xop}.
llvm-svn: 159913
2012-07-08 09:45:00 +00:00
NAKAMURA Takumi c30cc99411 test/SemaTemplate/instantiation-depth-defarg.cpp: Mark as XFAIL:mingw for now.
I'll try to increase stack size later.

llvm-svn: 159912
2012-07-08 09:35:16 +00:00
Simon Atanasyan ecedf3ddec MIPS: Range check __builtin_mips_wrdsp / __builtin_mips_rddsp arguments against the upper/lower values.
llvm-svn: 159911
2012-07-08 09:30:00 +00:00
Simon Atanasyan 21861d23f9 MIPS: Mark arguments of __builtin_mips_wrdsp / __builtin_mips_rddsp as a constant expression.
llvm-svn: 159910
2012-07-08 09:10:14 +00:00
Richard Smith 7ebb07c87c PR13243: When deducing a non-type template parameter which is specified as an
expression, skip over any SubstNonTypeTemplateParmExprs which alias templates
may have inserted before checking for a DeclRefExpr referring to a non-type
template parameter declaration.

llvm-svn: 159909
2012-07-08 04:37:51 +00:00
Richard Smith 74801c8182 PR13293: Defer deduction of an auto type with a dependent declarator, such as "auto (*f)(T t)".
llvm-svn: 159908
2012-07-08 04:13:07 +00:00
Richard Smith 8a874c93d9 PR9793: Treat substitution as an instantiation step for the purpose of the
-ftemplate-depth limit.  There are various ways to get an infinite (or merely
huge) stack of substitutions with no intervening instantiations. This is also
consistent with gcc's behavior.

llvm-svn: 159907
2012-07-08 02:38:24 +00:00
NAKAMURA Takumi 17a2ff2494 ASTMatchers/CMakeLists.txt: Add dependencies to generated headers, or "make clean; make ASTMatchers" would fail.
llvm-svn: 159906
2012-07-07 23:13:30 +00:00
Richard Smith cd3d5d9597 Reject 'int a[1][];' in Sema rather than crashing in IR generation. Found by a
misreduction of PR13290.

llvm-svn: 159905
2012-07-07 23:00:31 +00:00
Richard Smith 1b9f2eb76b PR13290: Constant-evaluation support for CXXConstructExprs which construct a
multidimensional array of class type. Also, preserve zero-initialization when
evaluating an initializer list for an array, in case the initializers refer to
later elements (which have preceding zero-initialization).

llvm-svn: 159904
2012-07-07 22:48:24 +00:00
Howard Hinnant c0937e8add Appy constexpr to <memory>. Picked up a few missing noexcepts as well.
llvm-svn: 159902
2012-07-07 20:56:04 +00:00
Howard Hinnant bfa7990b5a Apply constexpr to the mutex constructor. As a conforming extension, apply constexpr to the condition_variable constructor. These are important because it enables the compiler to construct these types at compile time, even though the object will be non-const. Since they are constructed at compile time, there is no chance of a data race before they are constructed.
llvm-svn: 159901
2012-07-07 20:01:52 +00:00
Howard Hinnant eeac9fcfb7 Apply constexpr to <bitset>.
llvm-svn: 159899
2012-07-07 17:04:52 +00:00
NAKAMURA Takumi 61d9268595 clang/test/CodeGenCXX/cxx0x-initializer-constructors.cpp: Fixup for -Asserts.
llvm-svn: 159898
2012-07-07 10:25:42 +00:00
Benjamin Kramer 1e250395fa Wire up -mrdrnd for X86.
For some reason GCC decided to call the feature rdrnd instead of rdrand,
which requires translating it for LLVM.

llvm-svn: 159897
2012-07-07 09:39:18 +00:00
Richard Smith e20c83d9ed PR12670: Support for initializing an array of non-aggregate class type from an
initializer list. Patch by Olivier Goffart, with extra testcases by Meador Inge
and Daniel Lunow.

llvm-svn: 159896
2012-07-07 08:35:56 +00:00
Richard Smith 4ff9ff974c When marking virtual functions as used for a class' vtable, mark all functions
which will appear in the vtable as used, not just those ones which were
declared within the class itself. Fixes an issue reported as comment#3 in
PR12763 -- we sometimes assert in codegen if we try to emit a reference to a
function declaration which we've not marked as referenced. This also matches
gcc's observed behavior.

llvm-svn: 159895
2012-07-07 06:59:51 +00:00
John McCall 8dda7b27ee Distinguish more carefully between free functions and C++ instance methods
in the ABI arrangement, and leave a hook behind so that we can easily
tweak CCs on platforms that use different CCs by default for C++
instance methods.

llvm-svn: 159894
2012-07-07 06:41:13 +00:00
Ted Kremenek 30105f67b4 Enhance 'diagtool list-warnings' to report number of diagnostics covered directly under -Wpedantic, and enhance warning-flags.c test to test that this set does not grow.
llvm-svn: 159893
2012-07-07 06:30:31 +00:00
Ted Kremenek b22ea2acea Re-apply r159875 with fixes.
- Split pedantic driver flag test into separate test file, and XFAIL on cygwin,mingw32
- Fix bug in tablegen logic where a missing '{' caused errors to be included in -Wpedantic.

llvm-svn: 159892
2012-07-07 05:53:30 +00:00
Andrew Trick 87255e340e I'm introducing a new machine model to simultaneously allow simple
subtarget CPU descriptions and support new features of
MachineScheduler.

MachineModel has three categories of data:
1) Basic properties for coarse grained instruction cost model.
2) Scheduler Read/Write resources for simple per-opcode and operand cost model (TBD).
3) Instruction itineraties for detailed per-cycle reservation tables.

These will all live side-by-side. Any subtarget can use any
combination of them. Instruction itineraries will not change in the
near term. In the long run, I expect them to only be relevant for
in-order VLIW machines that have complex contraints and require a
precise scheduling/bundling model. Once itineraries are only actively
used by VLIW-ish targets, they could be replaced by something more
appropriate for those targets.

This tablegen backend rewrite sets things up for introducing
MachineModel type #2: per opcode/operand cost model.

llvm-svn: 159891
2012-07-07 04:00:00 +00:00
Andrew Trick 91118a6155 whitespace
llvm-svn: 159890
2012-07-07 03:59:51 +00:00