Commit Graph

136949 Commits

Author SHA1 Message Date
Jordan Rose 9eb409ace9 [analyzer] When invalidating symbolic offset regions, take fields into account.
Previously, RegionStore was being VERY conservative in saying that because
p[i].x and p[i].y have a concrete base region of 'p', they might overlap.
Now, we check the chain of fields back up to the base object and check if
they match.

This only kicks in when dealing with symbolic offset regions because
RegionStore's "base+offset" representation of concrete offset regions loses
all information about fields. In cases where all offsets are concrete
(s.x and s.y), RegionStore will already do the right thing, but mixing
concrete and symbolic offsets can cause bindings to be invalidated that
are known to not overlap (e.g. p[0].x and p[i].y).
This additional refinement is tracked by <rdar://problem/12676180>.

<rdar://problem/12530149>

llvm-svn: 167654
2012-11-10 01:40:08 +00:00
David Blaikie 43df4cc568 Handle redeclarations of catch variables in catch blocks.
Fix to regression caused by r167650, caught by Richard Smith in code review.

llvm-svn: 167653
2012-11-10 01:38:24 +00:00
Craig Topper 9268c94b15 Cleanup pcmp(e/i)str(m/i) instruction definitions and load folding support.
llvm-svn: 167652
2012-11-10 01:23:36 +00:00
Douglas Gregor 6200470112 Diagnostic circular inheritance involving dependent base classes. We
would have diagnosed this at instantiation time anyway, if only we
didn't hang on all of these test cases. Fixes <rdar://problem/12629723>

llvm-svn: 167651
2012-11-10 01:18:17 +00:00
David Blaikie 1c9c90495d PR14296: function parameter name collisions in function try/catch
C++11 3.3.3/2 "A parameter name shall not be redeclared in the outermost block
of the function definition nor in the outermost block of any handler associated
with a function-try-block."

It's not totally clear to me whether the "FIXME" case is covered by this, but
Richard Smith thinks it probably should be. It's just a bit more involved to
fix that case.

llvm-svn: 167650
2012-11-10 01:04:23 +00:00
Eli Friedman c6d2fdbbb1 Make __LDBL_MAX__ etc. have the correct type on targets where long double/double/etc. have the same format. PR14285.
Based on patch by Jeroen Dobbelaere.

llvm-svn: 167649
2012-11-10 00:20:38 +00:00
Jordan Rose e2028139e9 -Wobjc-literal-compare: look through implicit casts.
This warning was failing to fire under ARC because of the implicit
lifetime casts added around the object literal expression.

<rdar://problem/11300873>, again.

llvm-svn: 167648
2012-11-09 23:55:21 +00:00
Justin Holewinski c0cad046b6 [NVPTX] Add __nvvm_* intrinsics as Clang builtins
Fixes bug 13354.

llvm-svn: 167647
2012-11-09 23:50:51 +00:00
Justin Holewinski 2dc9d072e5 [NVPTX] Use ABI alignment for parameters when alignment is not specified.
Affects SM 2.0+.  Fixes bug 13324.

llvm-svn: 167646
2012-11-09 23:50:24 +00:00
Richard Smith e0ae5356fc Document -W in clang --help. Also make the help text more consistent (don't end descriptions in periods, use | to separate possible values).
llvm-svn: 167645
2012-11-09 23:30:30 +00:00
Richard Smith 18915c4eac Don't include the help for -mips* in clang --help. These are just aliases for other options, and not common enough to be worth including here.
llvm-svn: 167644
2012-11-09 23:26:04 +00:00
Richard Smith 4c487827bf -Wlarge-by-value-copy may be awesome, but it really shouldn't be the one and
only -W flag which clang --help lists.

llvm-svn: 167643
2012-11-09 23:18:31 +00:00
Richard Smith de63d36fb2 PR13788: Don't perform checks on the initializer of a dependently-typed
variable. Previously we didn't notice the type was dependent if the only
dependence came from an array bound.

Patch by Brian Brooks!

llvm-svn: 167642
2012-11-09 23:03:14 +00:00
Argyrios Kyrtzidis 069a2df6fd Remove leftover code.
llvm-svn: 167641
2012-11-09 23:02:10 +00:00
Argyrios Kyrtzidis 32f1764d65 Add lldb data formatters for clang classes, starting with SourceLocation.
When installed, instead of getting this:

(lldb) p Tok.Loc
(clang::SourceLocation) $0 = {
  (unsigned int) ID = 123582
}

you'll get:

(lldb) p Tok.Loc
(clang::SourceLocation) $4 = "/usr/include/i386/_types.h:37:1" (offset: 123582, file)

This depends on r167629.

llvm-svn: 167640
2012-11-09 22:59:01 +00:00
Richard Smith b6075f4abd Remove --help text for deprecated sanitizer options, add --help text for -fsanitize=.
llvm-svn: 167639
2012-11-09 22:50:51 +00:00
Richard Smith e70ed8690f PR14303: Add a NoDriverOption flag to those options which are not accepted by
the driver (the options defined in CC1Options.td) and exclude their help from
"clang --help".

llvm-svn: 167638
2012-11-09 22:36:44 +00:00
Greg Clayton 644c62f28f Remove a debugging printf that was left in the code.
llvm-svn: 167637
2012-11-09 22:24:38 +00:00
Filipe Cabecinhas a4342a2bd7 Removed use of non-standard escape character '\%'
llvm-svn: 167636
2012-11-09 21:39:05 +00:00
Evandro Menezes 03789a9ec7 Fix issue with invalid flat operand number
Avoid iterating over list of operands beyond the number of operands in it.

PS: this fixes issue with revision #167634.
llvm-svn: 167635
2012-11-09 21:27:03 +00:00
Evandro Menezes 567698a6ca Fix issue with invalid flat operand number
Avoid iterating over list of operands beyond the number of operands in it.

llvm-svn: 167634
2012-11-09 20:29:37 +00:00
Anton Korobeynikov a305ea5511 Add ARM TARGET2 relocation. The testcase will follow with actualy use-case.
Based on the patch by Logan Chien!

llvm-svn: 167633
2012-11-09 20:20:12 +00:00
Roman Divacky 22135678b9 Switch FreeBSD/i386 back to 4byte stack alignment. This partially
reverts r126226.

llvm-svn: 167632
2012-11-09 20:10:44 +00:00
Chad Rosier c1c3924e14 Add string to try and fix build from r167629.
llvm-svn: 167631
2012-11-09 20:00:52 +00:00
Dmitry Vyukov 317f39290d tsan: intercept gettimeofday()
llvm-svn: 167630
2012-11-09 19:55:06 +00:00
Argyrios Kyrtzidis dc6bb4982f Add a SourceLocation::printToString() that returns in a std::string what dump()
writes to stderr; for debugging purposes.

llvm-svn: 167629
2012-11-09 19:40:48 +00:00
Argyrios Kyrtzidis 6566e23e13 Add a FileCharacteristic parameter to SourceManager::createFileIDForMemBuffer
for completeness and use it in CompilerInstance::InitializeSourceManager if
the input is a memory buffer.

llvm-svn: 167628
2012-11-09 19:40:45 +00:00
Argyrios Kyrtzidis 873c8583e0 Turn FrontendInputFile into an immutable class and have it also accept
a memory buffer instead of only a filename.

llvm-svn: 167627
2012-11-09 19:40:39 +00:00
Argyrios Kyrtzidis 1b3240b0aa Make CompilerInstance::InitializeSourceManager accept a FrontendInputFile,
no functionality change.

llvm-svn: 167626
2012-11-09 19:40:33 +00:00
Jakob Stoklund Olesen 13d5562963 Fix assertions in updateRegMaskSlots().
The RegMaskSlots contains 'r' slots while NewIdx and OldIdx are 'B'
slots. This broke the checks in the assertions.

This fixes PR14302.

llvm-svn: 167625
2012-11-09 19:18:49 +00:00
Rafael Espindola c93b074bda Don't use so many bits.
llvm-svn: 167624
2012-11-09 19:03:35 +00:00
Chad Rosier d87e4f7ad8 Implement -mstrict-align using '-backend-option -arm-strict-align' as this saves
us from having to make any backend changes.

llvm-svn: 167623
2012-11-09 18:27:01 +00:00
Chad Rosier 66bb178eef Revert r167620; this can be implemented using an existing CL option.
llvm-svn: 167622
2012-11-09 18:25:27 +00:00
Chad Rosier 74b5a9891a Add test case for r167619.
llvm-svn: 167621
2012-11-09 17:39:51 +00:00
Chad Rosier 332fc75b2c Add support for -mstrict-align compiler option for ARM targets.
rdar://12340498

llvm-svn: 167620
2012-11-09 17:29:38 +00:00
Chad Rosier 6002702b06 [driver] Add a -mstrict-align compiler option for ARM targets.
rdar://12340498

llvm-svn: 167619
2012-11-09 17:29:19 +00:00
Benjamin Kramer c280f41864 Silence GCC warning about falling off the end of a non-void function.
llvm-svn: 167618
2012-11-09 15:45:22 +00:00
Alexey Samsonov ae9b18b607 [Sanitizer] add sanity checks for communication with external symbolizer
llvm-svn: 167617
2012-11-09 14:45:30 +00:00
Dmitry Vyukov 0044e386e9 tsan: switch to new memory_order constants (ABI compatible)
llvm-svn: 167615
2012-11-09 14:12:16 +00:00
Dmitry Vyukov 805006b0ab tsan: switch to new memory_order constants (ABI compatible)
llvm-svn: 167614
2012-11-09 14:11:51 +00:00
Andy Gibbs 571df35397 Improved support for removing the comma preceding __VA_ARGS__ where __VA_ARGS__
is empty in a variadic macro expansion.  This fixes a divergence in support for
the ", ## __VA_ARGS__" GCC extension which differed in behaviour when in strict
C99 mode (note: there is no change in behaviour has been made in the gnu99 mode
that clang uses by default).  In addition, there is improved support for the
Microsoft alternative extension ", __VA_ARGS__".

llvm-svn: 167613
2012-11-09 13:24:30 +00:00
Dmitry Vyukov 92b9e1dbfd tsan: instrument all atomics (including fetch_add, exchange, cas, etc)
llvm-svn: 167612
2012-11-09 12:55:36 +00:00
Dmitry Vyukov 4e5f72d380 tsan: add __tsan_atomicX_compare_exchange_val() function
It's easier to call from compiler module.

llvm-svn: 167611
2012-11-09 12:54:37 +00:00
Alexander Potapenko 4b8e32de12 Add a possible underscore before the wrappers to the output expectations for Darwin
llvm-svn: 167610
2012-11-09 11:55:33 +00:00
Nico Weber 9512d3f161 Use isInvalidDecl() instead of isStatic() as suggested by dblaikie.
I couldn't think of a way to make an operator() invalid without returning
earlier from this function other than making it static, so no new test.

llvm-svn: 167609
2012-11-09 08:38:04 +00:00
Nadav Rotem 1cfef3e9ee Add support for memory runtime check. When we can, we calculate array bounds.
If the arrays are found to be disjoint then we run the vectorized version of
the loop. If they are not, we run the scalar code.

llvm-svn: 167608
2012-11-09 07:09:44 +00:00
Nadav Rotem d1e906e1f1 indent
llvm-svn: 167607
2012-11-09 07:02:24 +00:00
Jason Molenda c500aea639 Mark Objective-C 2.0 status as "Not applicable" on Linux.
The objc 2 runtime doesn't run on Linux.

llvm-svn: 167606
2012-11-09 06:16:12 +00:00
Jason Molenda 1f3ea66e23 Update the status page to include Linux status information,
patch from Dan Malea, daniel.malea@intel.com.

llvm-svn: 167605
2012-11-09 06:14:39 +00:00
Nico Weber 1fefe417f0 Don't crash on calling static member overloaded operator, PR14120
Patch from Brian Brooks!

llvm-svn: 167604
2012-11-09 06:06:14 +00:00