]> granicus.if.org Git - clang/log
clang
9 years agoAdd a few small helper methods to the TypoCorrectionConsumer.
Kaelyn Takata [Thu, 20 Nov 2014 22:06:29 +0000 (22:06 +0000)]
Add a few small helper methods to the TypoCorrectionConsumer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222461 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCorrectly set the SourceRange a TypoCorrection will replace.
Kaelyn Takata [Thu, 20 Nov 2014 22:06:26 +0000 (22:06 +0000)]
Correctly set the SourceRange a TypoCorrection will replace.

Also clean up TypoCorrection::setCorrectionRange while we're at it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222460 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoThe Syntax enumeration requires at least three bits to store all of its values. Incre...
Aaron Ballman [Thu, 20 Nov 2014 21:34:56 +0000 (21:34 +0000)]
The Syntax enumeration requires at least three bits to store all of its values. Increase the number of bits for SyntaxUsed. Decrease the number of expression arguments allowed by a single bit so that the bit fields continue to add up to 32-bits evenly.

There is no test for this fix because I could find no reasonable way to trigger a visible failure from it.

Thanks to Doug Gregor for spotting this!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222456 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBring PostOrderCFGView's insert API up to date with other API changes.
Michael Ilseman [Thu, 20 Nov 2014 19:32:48 +0000 (19:32 +0000)]
Bring PostOrderCFGView's insert API up to date with other API changes.

r222334 updates LLVM data structure's insert API to return a
pair. This change updates PostOrderCFGView accordingly, so that it can
be used interchangably with other sets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222445 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoExtended list of valid frontend options with '-cl-std=CL2.0'.
Anastasia Stulova [Thu, 20 Nov 2014 19:25:00 +0000 (19:25 +0000)]
Extended list of valid frontend options with '-cl-std=CL2.0'.

This option sets language mode for the compilation of a source file to be OpenCL v2.0.

Example: clang -cc1 -cl-std=CL2.0 myfile.cl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222444 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTesting commit access.
Anastasia Stulova [Thu, 20 Nov 2014 17:57:27 +0000 (17:57 +0000)]
Testing commit access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222438 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove now dead code.
Frederic Riss [Thu, 20 Nov 2014 16:24:29 +0000 (16:24 +0000)]
Remove now dead code.

After LLVM r222434, the Variables field of DISubprograms for forward
declarations will always be null. No need to keep code around to
delete them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222437 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPrepare for the DIBuilder populating DISubprogram's Variables with null.
Frederic Riss [Thu, 20 Nov 2014 15:46:59 +0000 (15:46 +0000)]
Prepare for the DIBuilder populating DISubprogram's Variables with null.

This is a followup to r222373. A better solution to the problem solved
there is to not create the leaked nodes at all (we know that they will
never be used for forward declared functions anyway). To avoid bot
breakage in the interval between the cfe and llvm commits, add a check
that the nMDNode is not null before deleting it. This code can completely
go away after the LLVM part is in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222433 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReplace variadic operator function pointer with an enum value.
Samuel Benzaquen [Thu, 20 Nov 2014 15:45:53 +0000 (15:45 +0000)]
Replace variadic operator function pointer with an enum value.

Summary:
Replace variadic operator function pointer with an enum value.
Hiding the implementation of the variadic matcher will allow to specialize them for the operation performed.
In particular, it will allow for a more efficient allOf() matcher.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222432 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoConvert CR+LF -> LF in a test file
Timur Iskhodzhanov [Thu, 20 Nov 2014 12:59:14 +0000 (12:59 +0000)]
Convert CR+LF -> LF in a test file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222429 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [Java] Don't align after "return".
Daniel Jasper [Thu, 20 Nov 2014 09:54:49 +0000 (09:54 +0000)]
clang-format: [Java] Don't align after "return".

Doesn't seem to be common practice in Java.

Before:
  return aaaaaaaaaaaaaaaaaaa
         && bbbbbbbbbbbbbbbbbbb
         && ccccccccccccccccccc;

After:
  return aaaaaaaaaaaaaaaaaaa
      && bbbbbbbbbbbbbbbbbbb
      && ccccccccccccccccccc;

Patch by Harry Terkelsen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222424 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [Java] Don't force break before generic type method.
Daniel Jasper [Thu, 20 Nov 2014 09:48:11 +0000 (09:48 +0000)]
clang-format: [Java] Don't force break before generic type method.

Before:
  Foo.bar()
      .<X>
      baz();

After:
  Foo.bar()
      .<X>baz();

Patch by Harry Terkelsen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222423 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Codegen for "omp flush" directive.
Alexey Bataev [Thu, 20 Nov 2014 04:34:54 +0000 (04:34 +0000)]
[OPENMP] Codegen for "omp flush" directive.
For each "omp flush" directive a call to "void kmpc_flush(ident_t *, ...)" function is generated.
Directive "omp flush" may have an associated list of variables to flush, but currently runtime function ignores them. So the patch generates just "call kmpc_flush(ident_t *<loc>, i32 0)".
Differential Revision: http://reviews.llvm.org/D6292

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222409 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix buildbots.
Richard Smith [Thu, 20 Nov 2014 04:09:55 +0000 (04:09 +0000)]
Fix buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222408 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Use .svn/wc.db as our VC dependency if it's available.
Jordan Rose [Thu, 20 Nov 2014 03:57:45 +0000 (03:57 +0000)]
[CMake] Use .svn/wc.db as our VC dependency if it's available.

In order to keep SVNVersion.inc from being regenerated on every build, we need
to specify as a dependency a file that only changes when the VC state updates.
I previously just had .svn/entries, but that's only used by Subversion 1.6.
1.7 uses .svn/wc.db instead; prefer that if it's present.

(Thanks, Nico!)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222407 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPreserve numeric literal suffixes during type canonicalization.
Richard Smith [Thu, 20 Nov 2014 03:37:32 +0000 (03:37 +0000)]
Preserve numeric literal suffixes during type canonicalization.
Patch by Pierre Gousseau! Test cases altered significantly by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222404 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAvoid earlier test interfering with later one.
Richard Smith [Thu, 20 Nov 2014 01:50:37 +0000 (01:50 +0000)]
Avoid earlier test interfering with later one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222403 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWhen mangling member-expressions, skip implicit accesses of anonymous union
Richard Smith [Thu, 20 Nov 2014 01:35:11 +0000 (01:35 +0000)]
When mangling member-expressions, skip implicit accesses of anonymous union
objects. This is consistent with GCC's behavior. Patch by Tomasz Miąsko!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222402 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove support for undocumented SpecialCaseList entries.
Alexey Samsonov [Thu, 20 Nov 2014 01:27:19 +0000 (01:27 +0000)]
Remove support for undocumented SpecialCaseList entries.

"global-init", "global-init-src" and "global-init-type" were originally
used to blacklist entities in ASan init-order checker. However, they
were never documented, and later were replaced by "=init" category.

Old blacklist entries should be converted as follows:
  * global-init:foo -> global:foo=init
  * global-init-src:bar -> src:bar=init
  * global-init-type:baz -> type:baz=init

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222401 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoPR21531: fix crash on invalid with unexpanded pack in case value.
Richard Smith [Thu, 20 Nov 2014 01:24:12 +0000 (01:24 +0000)]
PR21531: fix crash on invalid with unexpanded pack in case value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222400 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "[Reassociate] Update test cases due to r222142."
Chad Rosier [Wed, 19 Nov 2014 23:20:35 +0000 (23:20 +0000)]
Revert "[Reassociate] Update test cases due to r222142."

This reverts commit r222144.  Commit r222142 is being reverted due to
a spec2006/gcc execution-time regression.

Update mips-varargs test as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222397 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [Java] Accept generic types in enum declaration
Daniel Jasper [Wed, 19 Nov 2014 22:38:18 +0000 (22:38 +0000)]
clang-format: [Java] Accept generic types in enum declaration

Before:
  enum Foo implements Bar<X, Y> {
    ABC {
      ...
    }
    , CDE {
      ...
    };
  }

After:
  enum Foo implements Bar<X, Y> {
    ABC {
      ...
    },
    CDE {
      ...
    };
  }

Patch by Harry Terkelsen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222394 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Always include the Clang repo version, just like the autoconf build.
Jordan Rose [Wed, 19 Nov 2014 22:03:48 +0000 (22:03 +0000)]
[CMake] Always include the Clang repo version, just like the autoconf build.

Now that LLVM's helper script GetSVN.cmake actually works consistently,
there's no reason not to use it. We avoid having to regenerate SVNVersion.inc
every time by marking it as dependent on Git's reflog or SVN's entries file.

This should end most of the issues of the AST format changing and breaking
old module files: CMake-Clang should now detect that the version changed just
like Autoconf-Clang has.

Based on r190557. Depends on LLVM r222391.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222393 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoConstify a few IdentifierInfo * parameters.
Jordan Rose [Wed, 19 Nov 2014 22:03:46 +0000 (22:03 +0000)]
Constify a few IdentifierInfo * parameters.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222392 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix bug where a trivial constexpr copy/move operation couldn't copy from an
Richard Smith [Wed, 19 Nov 2014 21:27:17 +0000 (21:27 +0000)]
Fix bug where a trivial constexpr copy/move operation couldn't copy from an
empty non-constexpr object. Such a copy doesn't break any of the constexpr
rules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222387 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebugInfo: Don't emit a 'global variable' when a static member declaration is referen...
David Blaikie [Wed, 19 Nov 2014 19:42:40 +0000 (19:42 +0000)]
DebugInfo: Don't emit a 'global variable' when a static member declaration is referenced without a definition, just ensure the enclosing class (with the static member declaration) is emitted.

Addresses PR21511 by emitting appropriate metadata rather than
faux-global definitions for a variable that doesn't have a definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222377 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix a temporary MDNode leak.
Frederic Riss [Wed, 19 Nov 2014 18:53:46 +0000 (18:53 +0000)]
Fix a temporary MDNode leak.

While emitting debug information for function forward decalrations, we
create DISubprogram objects that aran't stored in the AllSubprograms
list, and thus won't get finalized by the DIBuilder. During the DIBuilder
finalize(), the temporary MDNode allocated for the DISubprogram
Variables field gets RAUWd with a non temporary DIArray. For the forward
declarations, simply delete that temporary node before we delete the
parent node, so that it doesn't leak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222373 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDriver: correct typo
Saleem Abdulrasool [Wed, 19 Nov 2014 17:59:00 +0000 (17:59 +0000)]
Driver: correct typo

Fix a typo in the search path identified by Justin Bogner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222371 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [Java] Ignore C++-specific keywords
Daniel Jasper [Wed, 19 Nov 2014 14:11:11 +0000 (14:11 +0000)]
clang-format: [Java] Ignore C++-specific keywords

Before:
  public void union
  (Object o);
  public void struct
  (Object o);
  public void delete (Object o);

After:
  public void union(Object o);
  public void struct(Object o);
  public void delete(Object o);

Patch by Harry Terkelsen, thank you!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222357 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAllow EmitVAArg() to promote types and use this to fix some N32/N64 vararg issues...
Daniel Sanders [Wed, 19 Nov 2014 10:01:35 +0000 (10:01 +0000)]
Allow EmitVAArg() to promote types and use this to fix some N32/N64 vararg issues for Mips.

Summary:
With this patch, passing a va_list to another function and reading 10 int's from
it works correctly on a big-endian target.

Based on a pair of patches by David Chisnall, one of which I've reworked
for the current trunk.

Reviewers: theraven, atanasyan

Reviewed By: theraven, atanasyan

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222339 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUpdate for LLVM API change to make Small(Ptr)Set::insert return pair<iterator, bool...
David Blaikie [Wed, 19 Nov 2014 07:49:47 +0000 (07:49 +0000)]
Update for LLVM API change to make Small(Ptr)Set::insert return pair<iterator, bool> as per the C++ standard's associative container concept.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222335 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd the exception for strings in logical and expressions to -Wstring-conversion
Richard Trieu [Wed, 19 Nov 2014 06:08:18 +0000 (06:08 +0000)]
Add the exception for strings in logical and expressions to -Wstring-conversion
for C code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222327 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format a recent commit I made
David Blaikie [Wed, 19 Nov 2014 05:48:40 +0000 (05:48 +0000)]
clang-format a recent commit I made

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222317 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWrap to 80 columns, no behavior change.
Nico Weber [Wed, 19 Nov 2014 05:21:39 +0000 (05:21 +0000)]
Wrap to 80 columns, no behavior change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222315 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoStandardize on StringMap::insert, removing uses of StringMap::GetOrCreateValue.
David Blaikie [Wed, 19 Nov 2014 03:06:06 +0000 (03:06 +0000)]
Standardize on StringMap::insert, removing uses of StringMap::GetOrCreateValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222306 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUpdate for LLVM API change
David Blaikie [Wed, 19 Nov 2014 02:56:13 +0000 (02:56 +0000)]
Update for LLVM API change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222303 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Add option to disable alignment after opening brackets
Daniel Jasper [Tue, 18 Nov 2014 23:55:27 +0000 (23:55 +0000)]
clang-format: Add option to disable alignment after opening brackets

Before:
  SomeFunction(parameter,
               parameter);

After:
  SomeFunction(parameter,
      parameter);

Patch by Harry Terkelsen, thank you!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222284 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Fix space between generic type parameter and square
Daniel Jasper [Tue, 18 Nov 2014 23:48:01 +0000 (23:48 +0000)]
clang-format: Fix space between generic type parameter and square
bracket

Before:
  public Foo<X, Y> [] foos;

After:
  public Foo<X, Y>[] foos;

Patch by Harry Terkelsen. Thank you!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222283 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix 80-column violations, trailing whitespace, comment text.
Eric Christopher [Tue, 18 Nov 2014 22:36:15 +0000 (22:36 +0000)]
Fix 80-column violations, trailing whitespace, comment text.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222269 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoThis test also requires an aarch64 target.
Eric Christopher [Tue, 18 Nov 2014 22:36:11 +0000 (22:36 +0000)]
This test also requires an aarch64 target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222268 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Sema] Patch to issue warning on comparing parameters with
Fariborz Jahanian [Tue, 18 Nov 2014 21:57:54 +0000 (21:57 +0000)]
[Sema] Patch to issue warning on comparing parameters with
nonnull attribute when comparison is always true/false.
Original patch by Steven Wu. I have added extra code to prevent issuing of
warning  when the nonnull parameter is modified prior to the comparison.
This addition prevents false positives in the most obvious cases.
There may still be false positive warnings in some cases (as one of my tests
indicates), but benefit far outweighs such cases. rdar://18712242

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222264 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoOMPAtomicDirective::Create(): Fix \param. [-Wdocumentation]
NAKAMURA Takumi [Tue, 18 Nov 2014 15:05:01 +0000 (15:05 +0000)]
OMPAtomicDirective::Create(): Fix \param. [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222237 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[OPENMP] Additional processing of 'omp atomic read' directive.
Alexey Bataev [Tue, 18 Nov 2014 10:14:22 +0000 (10:14 +0000)]
[OPENMP] Additional processing of 'omp atomic read' directive.
According to OpenMP standard, Section 2.12.6, atomic Construct, '#pragma omp atomic read' is allowed to be used only for expression statements of form 'v = x;', where x and v (as applicable) are both l-value expressions with scalar type. Patch adds checks for it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222231 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd PIC-level support to Clang.
Justin Hibbits [Tue, 18 Nov 2014 06:17:20 +0000 (06:17 +0000)]
Add PIC-level support to Clang.

Summary:
This distinguishes between -fpic and -fPIC now, with the additions in LLVM for
PIC level support.

Test Plan: No regressions

Reviewers: echristo, rafael

Reviewed By: rafael

Subscribers: rnk, emaste, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222227 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ASTReader] Add a convenience function to retrieve all the input files of a module...
Argyrios Kyrtzidis [Tue, 18 Nov 2014 05:24:18 +0000 (05:24 +0000)]
[ASTReader] Add a convenience function to retrieve all the input files of a module file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222224 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFully handle globals and functions in CGDebugInfo::getDeclarationOrDefinition()
Frederic Riss [Tue, 18 Nov 2014 03:40:51 +0000 (03:40 +0000)]
Fully handle globals and functions in CGDebugInfo::getDeclarationOrDefinition()

Currently this function would return nothing for functions or globals that
haven't seen a definition yet. Make it return a forward declaration that will
get RAUWed with the definition if one is seen at a later point. The strategy
used to implement this is similar to what's done for types: the forward
declarations are stored in a vector and post processed upon finilization to
perform the required RAUWs.

For now the only user of getDeclarationOrDefinition() is EmitUsingDecl(), thus
this patch allows to emit correct imported declarations even in the absence of
an actual definition of the imported entity.

(Another user will be the debug info generation for argument default values
that I need to resurect).

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222220 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[DebugInfo] Move collection of various function/var decl properties into helper funct...
Frederic Riss [Tue, 18 Nov 2014 03:40:46 +0000 (03:40 +0000)]
[DebugInfo] Move collection of various function/var decl properties into helper functions.

NFC. Helpers to be re-used in upcoming commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222219 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoInstrProf: Don't emit coverage for uninstantiated templates
Justin Bogner [Tue, 18 Nov 2014 00:34:46 +0000 (00:34 +0000)]
InstrProf: Don't emit coverage for uninstantiated templates

We include unused functions and methods in -fcoverage-mapping so that
we can differentiate between uninstrumented and unused. This can cause
problems for uninstantiated templates though, since they may involve
an incomplete type that can't be mangled. This shows up in things like
libc++'s <unordered_map> and makes coverage unusable.

Avoid the issue by skipping uninstantiated methods of a templated
class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222204 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDebug Info: context field of a global variable is DIScopeRef.
Manman Ren [Tue, 18 Nov 2014 00:29:32 +0000 (00:29 +0000)]
Debug Info: context field of a global variable is DIScopeRef.

Paired commit with r222195.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222196 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix an assertion when ending a function definition.
John McCall [Tue, 18 Nov 2014 00:19:01 +0000 (00:19 +0000)]
Fix an assertion when ending a function definition.

The bug is that ExprCleanupObjects isn't always empty
in a fresh evaluation context.  New evaluation contexts just
track the current depth of the stack.

The assertion will misfire whenever we finish processing
a function body inside an expression that contained an earlier
block literal with non-trivial captures.  That's actually
a lot less likely than you'd think, though, because it has
to be a real function declaration, not just another block.
Mixed block/lambda code would work, as would a template
instantiation or a local class definition.

The code works correctly if the assertion is disabled.

rdar://16356628

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222194 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake DiagnosticsEngine::takeClient return std::unique_ptr<>
Alexander Kornienko [Mon, 17 Nov 2014 23:46:02 +0000 (23:46 +0000)]
Make DiagnosticsEngine::takeClient return std::unique_ptr<>

Summary:
Make DiagnosticsEngine::takeClient return std::unique_ptr<>. Updated
callers to store conditional ownership using a pair of pointer and unique_ptr
instead of a pointer + bool. Updated code that temporarily registers clients to
use the non-owning registration (+ removed extra calls to takeClient).

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222193 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoHandle use of default member initializers before end of outermost class
Reid Kleckner [Mon, 17 Nov 2014 23:36:45 +0000 (23:36 +0000)]
Handle use of default member initializers before end of outermost class

Specifically, when we have this situation:
  struct A {
    template <typename T> struct B {
      int m1 = sizeof(A);
    };
    B<int> m2;
  };

We can't parse m1's initializer eagerly because we need A to be
complete.  Therefore we wait until the end of A's class scope to parse
it. However, we can trigger instantiation of B before the end of A,
which will attempt to instantiate the field decls eagerly, and it would
build a bad field decl instantiation that said it had an initializer but
actually lacked one.

Fixed by deferring instantiation of default member initializers until
they are needed during constructor analysis. This addresses a long
standing FIXME in the code.

Fixes PR19195.

Reviewed By: rsmith

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222192 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCodeGen: make a check stricter
Saleem Abdulrasool [Mon, 17 Nov 2014 22:11:07 +0000 (22:11 +0000)]
CodeGen: make a check stricter

When targeting Windows itanium (a MSVC environment), use itanium style
exceptions rather than SEH.  Existing test cases already test this code path.
Applying this change ensures that tests wont break due to a parallel change in
LLVM (to correctly report isMSVCEnvironment).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222179 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMissing comma in a string array initialization (CID 1254893)
Sylvestre Ledru [Mon, 17 Nov 2014 19:41:49 +0000 (19:41 +0000)]
Missing comma in a string array initialization (CID 1254893)

Summary:
We have this error from a while (Wed Jun 15 18:02:42 2011
r133103)

Reviewers: rsmith

Reviewed By: rsmith

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222169 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-cl: Allow /Fo without an argument (PR21589)
Hans Wennborg [Mon, 17 Nov 2014 19:16:36 +0000 (19:16 +0000)]
clang-cl: Allow /Fo without an argument (PR21589)

When it's used without an argument, the default file name is
used. The same goes for /Fe.

Also, allow using /Fo, /Fa and /Fe with multiple inputs if they
don't have an argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222164 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Fix more incorrect pointer detection.
Daniel Jasper [Mon, 17 Nov 2014 18:42:22 +0000 (18:42 +0000)]
clang-format: Fix more incorrect pointer detection.

Before:
  Constructor() : a(a), b(c, d *e) {}

After:
  Constructor() : a(a), b(c, d * e) {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222158 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agotest/Driver/cl-outputs.c: tweak some check prefixes; NFC.
Hans Wennborg [Mon, 17 Nov 2014 18:40:45 +0000 (18:40 +0000)]
test/Driver/cl-outputs.c: tweak some check prefixes; NFC.

These tests deal with the /o option; rename to better reflect that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222157 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBasic: tweak comment
Saleem Abdulrasool [Mon, 17 Nov 2014 18:40:15 +0000 (18:40 +0000)]
Basic: tweak comment

Add a missing surrounding brace for doxygen group.  This messes with pair
jumping in vim and is annoying.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222155 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix the indentation: Nesting level does not match indentation (CID 1254863)
Sylvestre Ledru [Mon, 17 Nov 2014 18:26:39 +0000 (18:26 +0000)]
Fix the indentation: Nesting level does not match indentation (CID 1254863)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222152 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFixing a use of stringstream to use an LLVM helper function. Drive-by fixing header...
Aaron Ballman [Mon, 17 Nov 2014 18:17:19 +0000 (18:17 +0000)]
Fixing a use of stringstream to use an LLVM helper function. Drive-by fixing header include order. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222151 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Reassociate] Update test cases due to r222142.
Chad Rosier [Mon, 17 Nov 2014 16:34:47 +0000 (16:34 +0000)]
[Reassociate] Update test cases due to r222142.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222144 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMinor readability tweaks to VFTableBuilder.cpp
Timur Iskhodzhanov [Mon, 17 Nov 2014 15:53:50 +0000 (15:53 +0000)]
Minor readability tweaks to VFTableBuilder.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222140 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a couple more examples illustrating why we need vtordisps and how they work
Timur Iskhodzhanov [Mon, 17 Nov 2014 15:11:05 +0000 (15:11 +0000)]
Add a couple more examples illustrating why we need vtordisps and how they work

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222133 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove VariadicOperatorMatcherInterface as it is redundant with logic from DynTypedMa...
Samuel Benzaquen [Mon, 17 Nov 2014 14:55:49 +0000 (14:55 +0000)]
Remove VariadicOperatorMatcherInterface as it is redundant with logic from DynTypedMatcher.

Summary:
The generic variadic matcher is faster (one less virtual function call
per match) and doesn't require template instantiations which reduces
compile time and binary size.
Registry.cpp.o generates ~14% less symbols and compiles ~7.5% faster.
The change also speeds up our clang-tidy benchmark by ~2%.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222131 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoA small correction for r221884. No functional changes.
Alexander Kornienko [Mon, 17 Nov 2014 14:46:28 +0000 (14:46 +0000)]
A small correction for r221884. No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222130 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Fix regression introduced in r221609.
Daniel Jasper [Mon, 17 Nov 2014 13:55:04 +0000 (13:55 +0000)]
clang-format: Fix regression introduced in r221609.

Before:
  void f() { f(a, c *d); }

After:
  void f() { f(a, c * d); }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222128 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Sanitizer] Parse and produce all sanitizer-relevant arguments in SanitizerArgs.
Alexey Samsonov [Sun, 16 Nov 2014 20:53:53 +0000 (20:53 +0000)]
[Sanitizer] Parse and produce all sanitizer-relevant arguments in SanitizerArgs.

In particular, make SanitizerArgs responsible for parsing
and passing down to frontend -fsanitize-recover and
-fsanitize-undefined-trap-on-error flags.

Simplify parsing -f(no-)sanitize= flags parsing: get rid of
too complex filterUnsupportedKinds function.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222105 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix issues missed during the review of r222099.
Richard Trieu [Sat, 15 Nov 2014 06:37:39 +0000 (06:37 +0000)]
Fix issues missed during the review of r222099.

Shift some functions around, make a method in Sema private,
call the correct overloaded function.  No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222081 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix IRGen for passing transparent unions
Reid Kleckner [Sat, 15 Nov 2014 01:41:41 +0000 (01:41 +0000)]
Fix IRGen for passing transparent unions

We have had a test for this for a long time with a FIXME saying what we
should be doing. This just does it.

Fixes PR21573.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222074 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCGDebugInfo: Update for DIBuilder API change
Duncan P. N. Exon Smith [Sat, 15 Nov 2014 00:24:50 +0000 (00:24 +0000)]
CGDebugInfo: Update for DIBuilder API change

Tracking LLVM commit r222070.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222071 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoThis patch fixes couple of bugs for predefined expression
Fariborz Jahanian [Fri, 14 Nov 2014 23:55:27 +0000 (23:55 +0000)]
This patch fixes couple of bugs for predefined expression
used inside blocks. It fixes a crash in naming code
for __func__ etc. when used in a block declared globally.
It also brings back old naming convention for
predefined expression which was broken. rdar://18961148

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222065 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[c++1z] Support [[deprecated]] attributes on namespaces. Note that it only applies...
Aaron Ballman [Fri, 14 Nov 2014 22:34:56 +0000 (22:34 +0000)]
[c++1z] Support [[deprecated]] attributes on namespaces. Note that it only applies to situations where the namespace is mentioned. Thus, use on anonymous namespaces is diagnosed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222054 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRecommit r222044 with a test fix - it does not make sense to hunt
Anton Korobeynikov [Fri, 14 Nov 2014 22:09:15 +0000 (22:09 +0000)]
Recommit r222044 with a test fix - it does not make sense to hunt
for a typedef before arithmetic conversion in all rare corner cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222049 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemoving an unused variable; NFC.
Aaron Ballman [Fri, 14 Nov 2014 21:57:30 +0000 (21:57 +0000)]
Removing an unused variable; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222048 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAgain revert r222044 to resolve darwin objc test fails.
Anton Korobeynikov [Fri, 14 Nov 2014 21:54:46 +0000 (21:54 +0000)]
Again revert r222044 to resolve darwin objc test fails.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222047 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFollow-up to D6217
Anton Korobeynikov [Fri, 14 Nov 2014 21:41:07 +0000 (21:41 +0000)]
Follow-up to D6217

Summary:
Ok, here is somewhat addition to D6217 aiming to preserve old darwin behavior wrt the typedefed types. The actual change to SemaChecking turned out to be pretty gross, in particular:
  1. We need to extract the typedef'ed type for proper diagnostics
  2. We need to walk over paren expressions as well

Reviewers: chandlerc, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222044 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd DiagID and Warning Flag to DiagnosticsLog
Steven Wu [Fri, 14 Nov 2014 21:23:56 +0000 (21:23 +0000)]
Add DiagID and Warning Flag to DiagnosticsLog

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222042 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMinGW doesn't implement std::to_string; working around it. NFC.
Aaron Ballman [Fri, 14 Nov 2014 20:31:50 +0000 (20:31 +0000)]
MinGW doesn't implement std::to_string; working around it. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222033 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove some redundant virtual specifiers on overriden functions.
David Blaikie [Fri, 14 Nov 2014 19:09:44 +0000 (19:09 +0000)]
Remove some redundant virtual specifiers on overriden functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222024 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTypo fix.
Yaron Keren [Fri, 14 Nov 2014 18:33:42 +0000 (18:33 +0000)]
Typo fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222016 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-cl: Ignore the new /Zo[-] option (PR21571)
Hans Wennborg [Fri, 14 Nov 2014 18:24:08 +0000 (18:24 +0000)]
clang-cl: Ignore the new /Zo[-] option (PR21571)

Also fix the ignored options test which didn't fail properly on
unknown options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222013 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [Java] Further improve generics formatting.
Daniel Jasper [Fri, 14 Nov 2014 17:30:15 +0000 (17:30 +0000)]
clang-format: [Java] Further improve generics formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222011 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Correctly detect multiplication in ctor initializer.
Daniel Jasper [Fri, 14 Nov 2014 17:26:49 +0000 (17:26 +0000)]
clang-format: Correctly detect multiplication in ctor initializer.

Before:
  Constructor() : a(a), area(width *height) {}

After:
  Constructor() : a(a), area(width * height) {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222010 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Sema]. Warn when logical expression is a pointer
Fariborz Jahanian [Fri, 14 Nov 2014 17:12:50 +0000 (17:12 +0000)]
[Sema]. Warn when logical expression is a pointer
which evaluates to true. rdar://18716393.
Reviewed by Richard Trieu

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222009 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSilencing a -Wparentheses warning; NFC.
Aaron Ballman [Fri, 14 Nov 2014 14:40:49 +0000 (14:40 +0000)]
Silencing a -Wparentheses warning; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221998 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoReplace weird whitespace symbols with good old spaces
Timur Iskhodzhanov [Fri, 14 Nov 2014 14:16:34 +0000 (14:16 +0000)]
Replace weird whitespace symbols with good old spaces

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221997 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd one illustrative class hierarchy as an example in a comment to the VFTableBuilder...
Timur Iskhodzhanov [Fri, 14 Nov 2014 14:10:15 +0000 (14:10 +0000)]
Add one illustrative class hierarchy as an example in a comment to the VFTableBuilder code

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221996 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoOops, the underline was too short for sphinx to like.
Aaron Ballman [Fri, 14 Nov 2014 14:01:55 +0000 (14:01 +0000)]
Oops, the underline was too short for sphinx to like.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221993 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCorrecting some grammar and typos, and adding CERT as a collaborator.
Aaron Ballman [Fri, 14 Nov 2014 13:48:34 +0000 (13:48 +0000)]
Correcting some grammar and typos, and adding CERT as a collaborator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221992 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoComplete support for the SD-6 standing document (based off N4200) with support for...
Aaron Ballman [Fri, 14 Nov 2014 13:44:02 +0000 (13:44 +0000)]
Complete support for the SD-6 standing document (based off N4200) with support for __has_cpp_attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221991 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Give clang-format-diff.py a -v option.
Daniel Jasper [Fri, 14 Nov 2014 13:27:28 +0000 (13:27 +0000)]
clang-format: Give clang-format-diff.py a -v option.

With it, it prints the file being formatted. Apparently people are
formatting thousands of files and some progress indication is helpful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221990 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Improve function parameter packing.
Daniel Jasper [Fri, 14 Nov 2014 13:14:45 +0000 (13:14 +0000)]
clang-format: Improve function parameter packing.

Before:
  void SomeLoooooooooooongFunction(
      std::unique_ptr<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>
          aaaaaaaaaaaaaaaaaaaaaaaaaa, int bbbbbbbbbbbbb);

After:
  void SomeLoooooooooooongFunction(
      std::unique_ptr<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>
          aaaaaaaaaaaaaaaaaaaaaaaaaa,
      int bbbbbbbbbbbbb);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221989 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PowerPC] Enable vec_perm for long long and double vector types for VSX
Bill Schmidt [Fri, 14 Nov 2014 13:10:13 +0000 (13:10 +0000)]
[PowerPC] Enable vec_perm for long long and double vector types for VSX

VSX makes the "vector long long" and "vector double" types available.
This patch enables the vec_perm interface for these types.  The same
builtin is generated regardless of the specified type, so no
additional work or testing is needed in the back end.  Tests are added
to ensure this builtin is generated by the front end.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221988 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Support assignments as conditional operands.
Daniel Jasper [Fri, 14 Nov 2014 13:03:40 +0000 (13:03 +0000)]
clang-format: Support assignments as conditional operands.

Before:
  return a != b
             // comment
             ? a
             : a = a != b
                   // comment
         ? a =
               b : a;
After:
  return a != b
             // comment
             ? a
             : a = a != b
                       // comment
                       ? a = b
                       : a;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221987 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: Improve indentation of comments in expressions.
Daniel Jasper [Fri, 14 Nov 2014 12:31:14 +0000 (12:31 +0000)]
clang-format: Improve indentation of comments in expressions.

Before:
  int i = (a)
              // comment
          + b;
  return aaaa == bbbb
                 // comment
             ? aaaa
             : bbbb;
After:
  int i = (a)
          // comment
          + b;
  return aaaa == bbbb
             // comment
             ? aaaa
             : bbbb;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221985 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PowerPC] Add VSX builtins for vec_div
Bill Schmidt [Fri, 14 Nov 2014 12:10:51 +0000 (12:10 +0000)]
[PowerPC] Add VSX builtins for vec_div

This patch adds builtin support for xvdivdp and xvdivsp, along with a
new test case.  The builtins are accessed using vec_div in altivec.h.
Builtins are listed (mostly) alphabetically there, so inserting these
changed the line numbers for deprecation warnings tested in
test/Headers/altivec-intrin.c.

There is a companion patch for LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221984 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [Java] Fix line break behavior of class declarations.
Daniel Jasper [Fri, 14 Nov 2014 10:15:56 +0000 (10:15 +0000)]
clang-format: [Java] Fix line break behavior of class declarations.

Change breaking preferences:
1. Break before "extends"
2. Break before "implements"
3. Break within the implements list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221981 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [Java] Improve generic return type formatting.
Daniel Jasper [Fri, 14 Nov 2014 09:05:32 +0000 (09:05 +0000)]
clang-format: [Java] Improve generic return type formatting.

Before:
  public<R> ArrayList<R> get() {

After:
  public <R> ArrayList<R> get() {

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221979 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [Java] No altnerative operator names in Java.
Daniel Jasper [Fri, 14 Nov 2014 09:02:28 +0000 (09:02 +0000)]
clang-format: [Java] No altnerative operator names in Java.

Before:
  someObject.and ();

After:
  someObject.and();

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221978 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoclang-format: [Java] Improve formatting of generics.
Daniel Jasper [Fri, 14 Nov 2014 08:22:46 +0000 (08:22 +0000)]
clang-format: [Java] Improve formatting of generics.

Before:
  Function < F, ? extends T > function;

After:
  Function<F, ? extends T> function;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221976 91177308-0d34-0410-b5e6-96231b3b80d8