Commit Graph

184793 Commits

Author SHA1 Message Date
Aaron Ballman ae2144ec3f Switching to range-based for loops; NFC.
llvm-svn: 219940
2014-10-16 17:53:07 +00:00
Samuel Benzaquen b6f73bc510 Fix code to follow the "Don’t use else after a return" rule.
Summary:
Fix code to follow the "Don’t use else after a return" rule.
This is a followup from rL219792.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D5826

llvm-svn: 219939
2014-10-16 17:50:19 +00:00
David Blaikie 92c8c95943 Use iterators and algorithms to possibly make this code a bit tidier
(also, the code executed once the element was found was split half
inside the loop and half after it - now put it all together after the
find operation)

I'm a bit concerned that this code is rather untested (commenting out
this whole function and running check-clang doesn't fail any tests)...

And I wish I had polymorphic lambdas.

llvm-svn: 219938
2014-10-16 17:23:58 +00:00
Alexey Samsonov 74246aaf89 Remove one of SanitizerBlacklist::isIn() overloads. NFC.
The final goal is to get rid of all the rest overloads that
accept LLVM objects (llvm::Function and llvm::GlobalVariable),
and pass in source-level entities instead.

llvm-svn: 219937
2014-10-16 17:10:38 +00:00
Jason Molenda 48c0440d97 Fix MemoryHistory plugin to check whether the plugin
was able to create itself before returning the shared
pointer to it.
clang warning.

llvm-svn: 219936
2014-10-16 16:59:23 +00:00
Hans Wennborg 0abd4c4ed2 Use array_lengthof; NFC.
llvm-svn: 219935
2014-10-16 16:54:36 +00:00
Juergen Ributzka 03a0611061 [AArch64] Fix miscompile of sdiv-by-power-of-2.
When the constant divisor was larger than 32bits, then the optimized code
generated for the AArch64 backend would emit the wrong code, because the shift
was defined as a shift of a 32bit constant '(1<<Lg2(divisor))' and we would
loose the upper 32bits.

This fixes rdar://problem/18678801.

llvm-svn: 219934
2014-10-16 16:41:15 +00:00
Bradley Smith 04ee8aa1fc [AArch64] Enable A53 erratum workaround (835769) by default for Android targets
llvm-svn: 219933
2014-10-16 16:35:14 +00:00
Saleem Abdulrasool 2eff71d76e tests: move test to more appropriate location
The test is a C++ semantic analysis test, move it to SemaCXX from Sema.  NFC.

llvm-svn: 219932
2014-10-16 16:12:41 +00:00
Vasileios Kalintiris 167c372118 [mips] Account for endianess when expanding BuildPairF64/ExtractElementF64 nodes.
Summary:
In order to support big endian targets for the BuildPairF64 nodes we
just need to swap the low/high pair registers. Additionally, for the
ExtractElementF64 nodes we have to calculate the correct stack offset
with respect to the node's register/operand that we want to extract.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5753

llvm-svn: 219931
2014-10-16 15:41:51 +00:00
Tom Stellard ade13b2a4e OpenCL: Emit global variables in the constant addr space as constant globals
llvm-svn: 219929
2014-10-16 15:29:19 +00:00
Tom Stellard 2391c35d79 OpenCL: Add -ffake-address-space-map to a test
The ensures there is an explicit address space id in the output.

llvm-svn: 219928
2014-10-16 15:29:17 +00:00
Vasileios Kalintiris 711028f718 [mips] Marked the DI/EI instruction aliases as MIPS32r2
Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5751

llvm-svn: 219927
2014-10-16 15:23:52 +00:00
Alexander Kornienko 27f126b006 [clang-tidy] Minor fixes for the NamespaceCommentCheck.
* Make SmallVector size enough for all groups.
  * Allow trailing period in the comment.
  * Fix "// anonymous namespace qqq".

llvm-svn: 219926
2014-10-16 15:11:54 +00:00
Vasileios Kalintiris f445a56b61 Test commit access: remove extra new line at the end of file
llvm-svn: 219925
2014-10-16 14:37:00 +00:00
Renato Golin 6d41f7ae22 UBSAN stable runtime more generic with arm* targets
llvm-svn: 219924
2014-10-16 12:43:10 +00:00
Alexander Kornienko 1efc425551 [clang-tidy] Default options in modules.
Summary:
This patch allows modules to specify default options for the checks
defined in them. This way a sufficiently configurable check can be registered in
multiple modules with different default options. E.g. the SpacesBeforeComments
option may be set to 1 for the "llvm-namespace-comments" check and to 2 for the
"google-readability-namespace-comment" check without modifying or extending the
check code.

This patch also registers the google-readability-braces-around-statements check
with suitable defaults.

Reviewers: djasper

Reviewed By: djasper

Subscribers: curdeius, cfe-commits

Differential Revision: http://reviews.llvm.org/D5798

llvm-svn: 219923
2014-10-16 11:27:57 +00:00
Benjamin Kramer 0445380f4f Add missing header guard.
llvm-svn: 219922
2014-10-16 10:10:07 +00:00
Daniel Jasper 1a31bab301 clang-format: Fix behavior with comments before conditional expressions
Before:
  SomeFunction(aaaaaaaaaaaaaaaaa,
               // comment.
                   ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa
                                     : bbbbbbbbbbbbbbbbbbbb);

After:
  SomeFunction(aaaaaaaaaaaaaaaaa,
               // comment.
               ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa : bbbbbbbbbbbbbbbbbbbb);

llvm-svn: 219921
2014-10-16 09:10:11 +00:00
Jason Molenda 823d8f6246 Most of this function checks to see if m_process is non-null before
dereferencing it, except for this one section of code.  Add a null
check around it.
clang static analyzer fix.

llvm-svn: 219920
2014-10-16 08:43:27 +00:00
Daniel Jasper ea772b4df2 clang-format: [ObjC] Fix method expression detection.
Before:
  return (a)[foo bar : baz];

After:
  return (a)[foo bar:baz];

llvm-svn: 219919
2014-10-16 08:38:51 +00:00
Jason Molenda 9bc86593a2 Another logical-or vrs. bitwise-or mixup in ClangUserExpression.
clang unreachable code warning.

llvm-svn: 219918
2014-10-16 08:27:27 +00:00
Jason Molenda b3795a4f5e Enable warnings in the debugserver project file..
llvm-svn: 219917
2014-10-16 08:16:29 +00:00
Jason Molenda 0060a38e7b A series of bit-flag values should be bitwise-or'ed not logical-or'ed.
clang unreachable code warning.

llvm-svn: 219916
2014-10-16 08:15:11 +00:00
Jason Molenda f8a7cfad6d Remove unreachable code.
llvm-svn: 219915
2014-10-16 08:08:13 +00:00
Jason Molenda 637822e3d1 Remove unreachable code.
llvm-svn: 219914
2014-10-16 08:07:54 +00:00
Jason Molenda 97e704b2af Add /* DISABLES CODE */ annotation before if (0) to mark it as intentional.
llvm-svn: 219913
2014-10-16 08:07:20 +00:00
Jason Molenda a68e4dcd7e Remove unreachable code.
llvm-svn: 219912
2014-10-16 08:05:49 +00:00
Jason Molenda 665f12a870 Remove unreachable code.
llvm-svn: 219911
2014-10-16 08:05:22 +00:00
Jason Molenda ecafcb867a Xcode recommended these changes to the project file. It recommended
a number of warnings to be enabled.  The one making the most noise
across the code base right now is CLANG_WARN_UNREACHABLE_CODE = YES.

llvm-svn: 219910
2014-10-16 08:04:28 +00:00
Jason Molenda 60b5da6c3c Remove unused initialization.
clang static analyzer fixit.

llvm-svn: 219909
2014-10-16 07:53:46 +00:00
Jason Molenda 18f5fd3a43 Remove dead store.
clang static analyzer fixit.

llvm-svn: 219908
2014-10-16 07:52:17 +00:00
Jason Molenda 8b5f2cfc19 Remove dead store.
clang static analyzer fixit.

llvm-svn: 219907
2014-10-16 07:49:27 +00:00
Renato Golin 45abb8c969 Adds stable-runtime to ubsan to avoid broken ARM tests with asan
llvm-svn: 219906
2014-10-16 07:48:27 +00:00
Jason Molenda 1e6cf05763 Remove dead store.
clang static analyzer fixit.

llvm-svn: 219905
2014-10-16 07:47:37 +00:00
Jason Molenda 5cf1e237f0 Remove unused variable.
clang static analyzer fixit.

llvm-svn: 219904
2014-10-16 07:41:32 +00:00
Justin Bogner ba7add3a80 Frontend: Fix some underscore-then-capital UB
llvm-svn: 219903
2014-10-16 06:00:55 +00:00
Akira Hatanaka 5c221ef98f Reapply r219832 - InstCombine: Narrow switch instructions using known bits.
The code committed in r219832 asserted when it attempted to shrink a switch
statement whose type was larger than 64-bit.

llvm-svn: 219902
2014-10-16 06:00:46 +00:00
Alexander Eremin 670c62770e specify dwarf version for Solaris
llvm-svn: 219901
2014-10-16 05:55:24 +00:00
David Blaikie 0f62c8d8f8 PR21246: DebugInfo: Emit the appropriate type (cv qualifiers, reference-ness, etc) for non-type template parameters
Plumb through the full QualType of the TemplateArgument::Declaration, as
it's insufficient to only know whether the type is a reference or
pointer (that was necessary for mangling, but insufficient for debug
info). This shouldn't increase the size of TemplateArgument as
TemplateArgument::Integer is still longer by another 32 bits.

Several bits of code were testing that the reference-ness of the
parameters matched, but this seemed to be insufficient (various other
features of the type could've mismatched and wouldn't've been caught)
and unnecessary, at least insofar as removing those tests didn't cause
anything to fail.

(Richard - perchaps you can hypothesize why any of these checks might
need to test reference-ness of the parameters (& explain why
reference-ness is part of the mangling - I would've figured that for the
reference-ness to be different, a prior template argument would have to
be different). I'd be happy to add them in/beef them up and add test
cases if there's a reason for them)

llvm-svn: 219900
2014-10-16 04:21:25 +00:00
Saleem Abdulrasool 7f52921976 TRE: make TRE a bit more aggressive
Make tail recursion elimination a bit more aggressive.  This allows us to get
tail recursion on functions that are just branches to a different function.  The
fact that the function takes a byval argument does not restrict it from being
optimised into just a tail call.

llvm-svn: 219899
2014-10-16 03:27:30 +00:00
Eric Fiselier ce842e8c4a Fix bad link in documentation. Thanks to rsmith
llvm-svn: 219898
2014-10-16 03:15:31 +00:00
Alexey Bataev 2a06681133 Bugfix in template instantiation in CXXPseudoDestructorExpr.
Fix for clang crash when instantiating a template with qualified lookup for members in non-class types.
Differential Revision: http://reviews.llvm.org/D5769

llvm-svn: 219897
2014-10-16 03:04:35 +00:00
Jason Molenda 275746d768 Ryan Brown's patch to handle DW_OP_call_frame_cfa addresses
as load addreses instead of host addresses.
http://reviews.llvm.org/D5735

llvm-svn: 219896
2014-10-16 02:56:12 +00:00
Jason Molenda 42f4c7e720 Fix accidental over-checking of args in launcherXPCService.
llvm-svn: 219895
2014-10-16 02:53:57 +00:00
Eric Fiselier 8c5bc1cb5f Add my buildbot to list of libc++ buildbots in documentation
llvm-svn: 219894
2014-10-16 02:48:59 +00:00
Jason Molenda 4ecbc44f79 Fix a potential null pointer deref & a potential memory leak,
also reformat to conform to the usual lldb coding conventions
a little better.
clang static analyzer fixit.

llvm-svn: 219893
2014-10-16 02:08:11 +00:00
Jason Molenda 3206b1e077 Remove unnecessary update of 'name' local.
clang static analyzer fixit.

llvm-svn: 219892
2014-10-16 01:55:21 +00:00
Jason Molenda 3c86c7e3a2 Remove unused change to argc/argv after long option parsing has been completed.
clang static analyzer fixit.

llvm-svn: 219891
2014-10-16 01:50:14 +00:00
Jason Molenda 1446881254 Ensure that user_exe_path is non-NULL before derferencing.
We've already created a FileSpec based on this local and 
this code path would never be executed if it is an invalid
FilePath - but the static analyzer doesn't know this and I
want to placate it.
clang static analyzer fixit.

llvm-svn: 219890
2014-10-16 01:42:11 +00:00