]> granicus.if.org Git - clang/log
clang
7 years agoRevert "Recover better from an incompatible .pcm file being provided by -fmodule...
Daniel Jasper [Sun, 4 Dec 2016 22:34:37 +0000 (22:34 +0000)]
Revert "Recover better from an incompatible .pcm file being provided by -fmodule-file=. We try to include the headers of the module textually in this case, still enforcing the modules semantic rules. In order to make that work, we need to still track that we're entering and leaving the module. Also, if the module was also marked as unavailable (perhaps because it was missing a file), we shouldn't mark the module unavailable -- we don't need the module to be complete if we're going to enter it textually."

This reverts commit r288449.

I believe that this is currently faulty wrt. modules being imported
inside namespaces. Adding these lines to the new test:

  namespace n {
  #include "foo.h"
  }

Makes it break with

  fatal error: import of module 'M' appears within namespace 'n'

However, I believe it should fail with

  error: redundant #include of module 'M' appears within namespace 'n'

I have tracked this down to us now inserting a tok::annot_module_begin
instead of a tok::annot_module_include in
Preprocessor::HandleIncludeDirective() and then later in
Parser::parseMisplacedModuleImport(), we hit the code path for
tok::annot_module_begin, which doesn't set FromInclude of
checkModuleImportContext to true (thus leading to the "wrong"
diagnostic).

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

7 years agoTableGen: Adapt to llvm r288612
Matthias Braun [Sun, 4 Dec 2016 05:55:09 +0000 (05:55 +0000)]
TableGen: Adapt to llvm r288612

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

7 years agoAdd the --no-color option to the git call in the doc when using clang-format-diff
Sylvestre Ledru [Sat, 3 Dec 2016 23:22:45 +0000 (23:22 +0000)]
Add the --no-color option to the git call in the doc when using clang-format-diff

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

7 years ago[WebAssembly] Revert r288447.
Dan Gohman [Sat, 3 Dec 2016 23:03:52 +0000 (23:03 +0000)]
[WebAssembly] Revert r288447.

Revert r288447 which introduced -mdirect. It turns out we don't need a
custom flag for this, as the information we need is in the target triple.

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

7 years ago[libclang] Fix python tests
Sergey Kalinichev [Sat, 3 Dec 2016 12:53:06 +0000 (12:53 +0000)]
[libclang] Fix python tests

It was broken in r286421

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

7 years agoSema: delay the DLL exported member referencing
Saleem Abdulrasool [Sat, 3 Dec 2016 01:57:47 +0000 (01:57 +0000)]
Sema: delay the DLL exported member referencing

An explicit template specialization can cause the implicit template
specialization of a type which inherits the attributes.  In such a case, we
would end up with a delayed template specialization for a dll exported type
which we would fail to reference.  This would trigger an assertion.

We now propagate the dll storage attributes through the inheritance
chain.  Only after having done so do we reference the delayed template
specializations.  This allows any implicit specializations which inherit dll
storage to also be referenced.

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

7 years ago[Sema] Don't perform aggregate initialization for types with explicit constructors
Eric Fiselier [Sat, 3 Dec 2016 01:26:47 +0000 (01:26 +0000)]
[Sema] Don't perform aggregate initialization for types with explicit constructors

Summary:
The C++17 rules for aggregate initialization changed to disallow types with explicit constructors [dcl.init.aggr]p1. This patch implements that new rule.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D25654

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

7 years agoDR616, and part of P0135R1: member access (or pointer-to-member access) on a
Richard Smith [Sat, 3 Dec 2016 01:14:32 +0000 (01:14 +0000)]
DR616, and part of P0135R1: member access (or pointer-to-member access) on a
temporary produces an xvalue, not a prvalue. Support this by materializing the
temporary prior to performing the member access.

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

7 years agoPR31244: Use the exception specification from the callee's type directly to
Richard Smith [Sat, 3 Dec 2016 00:29:06 +0000 (00:29 +0000)]
PR31244: Use the exception specification from the callee's type directly to
compute whether a call is noexcept, even if we can't map the callee expression
to a called declaration.

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

7 years agoMore diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_.
Richard Smith [Fri, 2 Dec 2016 23:00:28 +0000 (23:00 +0000)]
More diagnostic name fixups: w_ -> warn_, warning_ -> warn_, not_ -> note_.
In passing, add a warning group for "ignored qualifier in inline assembly" warnings.

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

7 years agoCodeGen: export typeinfo and typeinfo name on itanium
Saleem Abdulrasool [Fri, 2 Dec 2016 22:46:18 +0000 (22:46 +0000)]
CodeGen: export typeinfo and typeinfo name on itanium

When a C++ record is marked with dllexport mark both the typeinfo and the
typeinfo name as being exported.  Handle dllimport as the inverse.  This applies
to the itanium environment and not the MinGW environment.

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

7 years agoMass-rename the handful of error_* diagnostics to err_*.
Richard Smith [Fri, 2 Dec 2016 22:38:31 +0000 (22:38 +0000)]
Mass-rename the handful of error_* diagnostics to err_*.

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

7 years ago[Sema] Reset a BumpPtrAllocator on clear(). NFC.
George Burgess IV [Fri, 2 Dec 2016 21:00:12 +0000 (21:00 +0000)]
[Sema] Reset a BumpPtrAllocator on clear(). NFC.

Looks like the reset() call was omitted by accident.

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

7 years agoWith LTO and profile-use, enable hotness info in opt remarks
Adam Nemet [Fri, 2 Dec 2016 17:54:34 +0000 (17:54 +0000)]
With LTO and profile-use, enable hotness info in opt remarks

This is to match the behavior of non-LTO;
when -fsave-optimization-record is passed and PGO is available we enable
the generation of hotness information in the optimization records.

Differential Revision: https://reviews.llvm.org/D27332

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

7 years ago[CUDA] Forward sanitizer support to host toolchain
Jason Henline [Fri, 2 Dec 2016 17:32:18 +0000 (17:32 +0000)]
[CUDA] Forward sanitizer support to host toolchain

Summary:
This is an improvement on rL288448 where address sanitization was listed
as supported for the CudaToolChain. Since the intent is for the
CudaToolChain not to reject any flags supported by the host compiler,
this patch switches to forwarding the CudaToolChain sanitizer support to
the host toolchain rather than explicitly whitelisting address
sanitization.

Thanks to hfinkel for this suggestion.

Reviewers: jlebar

Subscribers: hfinkel, cfe-commits

Differential Revision: https://reviews.llvm.org/D27351

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

7 years ago[ClangFormat] Only insert #include into the #include block in the beginning of the...
Eric Liu [Fri, 2 Dec 2016 11:01:43 +0000 (11:01 +0000)]
[ClangFormat] Only insert #include into the #include block in the beginning of the file.

Summary:
This avoid inserting #include into:
- raw string literals containing #include.
- #if block.
- Special #include among declarations (e.g. functions).

Reviewers: djasper

Subscribers: cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D26909

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

7 years ago[Frontend] Fix an issue where a quoted search path is incorrectly
Alex Lorenz [Fri, 2 Dec 2016 09:51:51 +0000 (09:51 +0000)]
[Frontend] Fix an issue where a quoted search path is incorrectly
removed as a duplicate header search path

The commit r126167 started passing the First index into RemoveDuplicates, but
forgot to update 0 to First in the loop that looks for the duplicate. This
resulted in a bug where an -iquoted search path was incorrectly removed if you
passed in the same path into -iquote and more than one time into -isystem.

rdar://23991350

Differential Revision: https://reviews.llvm.org/D27298

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

7 years agoclang/test/Driver/defsym.s: Appease targeting msc. It is incapable of external assemb...
NAKAMURA Takumi [Fri, 2 Dec 2016 05:09:21 +0000 (05:09 +0000)]
clang/test/Driver/defsym.s: Appease targeting msc. It is incapable of external assembler in trunk.

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

7 years ago[CUDA] Fix faulty test from rL288448
Jason Henline [Fri, 2 Dec 2016 02:04:43 +0000 (02:04 +0000)]
[CUDA] Fix faulty test from rL288448

Summary:
The test introduced by rL288448 is currently failing because
unimportant but unexpected errors appear as output from a test compile
line. This patch looks for a more specific error message, in order to
avoid false positives.

Reviewers: jlebar

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D27328

Switch to more specific error

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

7 years agop0012r1: define corresponding feature test macro
Richard Smith [Fri, 2 Dec 2016 02:02:23 +0000 (02:02 +0000)]
p0012r1: define corresponding feature test macro

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

7 years agoRecover better from an incompatible .pcm file being provided by -fmodule-file=.
Richard Smith [Fri, 2 Dec 2016 01:52:28 +0000 (01:52 +0000)]
Recover better from an incompatible .pcm file being provided by -fmodule-file=.
We try to include the headers of the module textually in this case, still
enforcing the modules semantic rules. In order to make that work, we need to
still track that we're entering and leaving the module. Also, if the module was
also marked as unavailable (perhaps because it was missing a file), we
shouldn't mark the module unavailable -- we don't need the module to be
complete if we're going to enter it textually.

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

7 years ago[CUDA] "Support" ASAN arguments in CudaToolChain
Jason Henline [Fri, 2 Dec 2016 01:42:54 +0000 (01:42 +0000)]
[CUDA] "Support" ASAN arguments in CudaToolChain

This fixes a bug that was introduced in rL287285. The bug made it
illegal to pass -fsanitize=address during CUDA compilation because the
CudaToolChain class was switched from deriving from the Linux toolchain
class to deriving directly from the ToolChain toolchain class. When
CudaToolChain derived from Linux, it used Linux's getSupportedSanitizers
method, and that method allowed ASAN, but when it switched to deriving
directly from ToolChain, it inherited a getSupportedSanitizers method
that didn't allow for ASAN.

This patch fixes that bug by creating a getSupportedSanitizers method
for CudaToolChain that supports ASAN.

This patch also fixes the test that checks that -fsanitize=address is
passed correctly for CUDA builds. That test didn't used to notice if an
error message was emitted, and that's why it didn't catch this bug when
it was first introduced. With the fix from this patch, that test will
now catch any similar bug in the future.

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

7 years ago[WebAssembly] Add an -mdirect flag for the direct wasm object feature.
Dan Gohman [Fri, 2 Dec 2016 01:12:40 +0000 (01:12 +0000)]
[WebAssembly] Add an -mdirect flag for the direct wasm object feature.

Add a target flag for enabling the new direct wasm object emission
feature.

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

7 years agoDelete tautological assertion.
Jonathan Roelofs [Fri, 2 Dec 2016 00:51:58 +0000 (00:51 +0000)]
Delete tautological assertion.

After r256463, both the LHS and RHS now refer to the same variable. Before,
they referred to the member, the parameter respectively. Now GCC6's
-Wtautological-compare complains.

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

7 years agoStruct GEPs must use i32, not whatever size_t is. It should be safe
John McCall [Thu, 1 Dec 2016 23:51:30 +0000 (23:51 +0000)]
Struct GEPs must use i32, not whatever size_t is.  It should be safe
to do this unconditionally, given that the indices will always be small
constant integers anyway.

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

7 years ago[libclang] Add APIs to check the result of an integer expression in CXEvalResult...
Argyrios Kyrtzidis [Thu, 1 Dec 2016 23:41:27 +0000 (23:41 +0000)]
[libclang] Add APIs to check the result of an integer expression in CXEvalResult without overflow

Patch by Emilio Cobos Álvarez!
See https://reviews.llvm.org/D26788

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

7 years agoExtend CompilationDatabase by a field for the output filename
Joerg Sonnenberger [Thu, 1 Dec 2016 23:37:45 +0000 (23:37 +0000)]
Extend CompilationDatabase by a field for the output filename

In bigger projects like an Operating System, the same source code is
often compiled in slightly different ways. This could be the difference
between PIC and non-PIC code for static vs dynamic libraries, it could
also be the difference between size optimised versions of tools for
ramdisk images. At the moment, the compilation database has no way to
distinguish such cases. As first step, add a field in the JSON format
for it and process it accordingly.

Differential Revision: https://reviews.llvm.org/D27138

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

7 years agoAdd a space in a run line. NFC.
George Burgess IV [Thu, 1 Dec 2016 20:16:56 +0000 (20:16 +0000)]
Add a space in a run line. NFC.

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

7 years agoSend compiler output to /dev/null in defsym.s test.
Artem Belevich [Thu, 1 Dec 2016 19:34:35 +0000 (19:34 +0000)]
Send compiler output to /dev/null in defsym.s test.

Fixes test failures if tests are run in a read-only source tree.

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

7 years ago[CodeGen][ARM] Make sure the value and type used to create a bitcast
Akira Hatanaka [Thu, 1 Dec 2016 19:25:14 +0000 (19:25 +0000)]
[CodeGen][ARM] Make sure the value and type used to create a bitcast
have the same size.

This fixes an asset that is triggered when an address of a boolean
variable is passed to __builtin_arm_ldrex or __builtin_arm_strex.

rdar://problem/29269006

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

7 years ago[clang] Implement support for -defsym assembler option
Mandeep Singh Grang [Thu, 1 Dec 2016 18:42:16 +0000 (18:42 +0000)]
[clang] Implement support for -defsym assembler option

Summary:
Adds support for -Wa,-defsym,abc=1 option.

Related llvm patch: https://reviews.llvm.org/D26214

Reviewers: rafael, t.p.northover, colinl, echristo, compnerd, rengolin

Subscribers: mehdi_amini

Tags: #clang-c

Differential Revision: https://reviews.llvm.org/D26213

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

7 years agoswiftcc: Add an api to query whether a target ABI stores swifterror in a register
Arnold Schwaighofer [Thu, 1 Dec 2016 18:07:38 +0000 (18:07 +0000)]
swiftcc: Add an api to query whether a target ABI stores swifterror in a register

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

7 years agoFix VS2015 build of clang-format-vsix by using NuGet to pull in required assemblies
Hans Wennborg [Thu, 1 Dec 2016 18:05:41 +0000 (18:05 +0000)]
Fix VS2015 build of clang-format-vsix by using NuGet to pull in required assemblies

Also added a gitignore to help track the right items to commit.

Patch by Antonio Maiorano <amaiorano@gmail.com>!

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

7 years ago[TableGen] Ignore fake args for parsing-related arg counts.
George Burgess IV [Thu, 1 Dec 2016 17:52:39 +0000 (17:52 +0000)]
[TableGen] Ignore fake args for parsing-related arg counts.

We should complain about the following:

```
void foo() __attribute__((unavailable("a", "b")));
```

Instead, we currently just ignore "b". (...We also end up ignoring "a",
because we assume elsewhere that this attribute can only have 1 or 0
args.)

This happens because `unavailable` has a fake enum arg, and
`AttributeList::{getMinArgs,getMaxArgs}` include fake args in their
counts.

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

7 years ago[analyzer] Drop explicit mention of range constraint solver
Dominic Chen [Thu, 1 Dec 2016 17:06:39 +0000 (17:06 +0000)]
[analyzer] Drop explicit mention of range constraint solver

Summary: The basic constraint solver was dropped in rL162384, leaving the range constraint solver as the default and only constraint solver. Explicitly specifying it is unnecessary, and makes it difficult to test with other solver backends.

Reviewers: zaks.anna, dcoughlin

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D26694

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

7 years agoAdds hasUnqualifiedDesugaredType to allow matching through type sugar.
Manuel Klimek [Thu, 1 Dec 2016 15:45:06 +0000 (15:45 +0000)]
Adds hasUnqualifiedDesugaredType to allow matching through type sugar.

Differential Revision: https://reviews.llvm.org/D27207

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

7 years ago[ObjC] Avoid a @try/@finally/@autoreleasepool fixit when parsing an expression
Alex Lorenz [Thu, 1 Dec 2016 12:14:38 +0000 (12:14 +0000)]
[ObjC] Avoid a @try/@finally/@autoreleasepool fixit when parsing an expression

This patch ensures that the typo fixit for the @try/@finally/@autoreleasepool {}
directive is shown only when we're parsing an actual statement where such
directives can actually be present.

rdar://19669565

Differential Revision: https://reviews.llvm.org/D26916

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

7 years ago[OpenCL] Refactor read_only/write_only pipes.
Joey Gouly [Thu, 1 Dec 2016 11:30:49 +0000 (11:30 +0000)]
[OpenCL] Refactor read_only/write_only pipes.

This adds the access qualifier to the Pipe Type, rather than using a class
hierarchy.

It also fixes mergeTypes for Pipes, by disallowing merges. Only identical
pipe types can be merged. The test case in invalid-pipes-cl2.0.cl is added
to check that.

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

7 years agoFix crash with unsupported architectures in Linux/Gnu target triples.
Florian Hahn [Thu, 1 Dec 2016 11:02:59 +0000 (11:02 +0000)]
Fix crash with unsupported architectures in Linux/Gnu target triples.

Summary: This patch adds a check and an error message to gnutools::Linker::ConstructJob in case the architecture is not supported. For most other operating systems, the error message is created in lib/Basic/Targets.cpp:AllocateTarget, but when construction the linker arguments for the gnutools linker a supported architecture is required.

Reviewers: rafael, joerg, echristo

Subscribers: mehdi_amini, joerg, dschuff, cfe-commits

Differential Revision: https://reviews.llvm.org/D27066

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

7 years agoTeach ConstantBuilder how to emit a reference to the current position
John McCall [Thu, 1 Dec 2016 05:33:30 +0000 (05:33 +0000)]
Teach ConstantBuilder how to emit a reference to the current position
that will be filled in when the initializer is set.

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

7 years agoP0012R1: add Itanium ABI support for throwing non-noexcept function pointers and...
Richard Smith [Thu, 1 Dec 2016 03:32:42 +0000 (03:32 +0000)]
P0012R1: add Itanium ABI support for throwing non-noexcept function pointers and catching as noexcept.

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

7 years agoRevert r285664, cxx-abi-dev chose to go in a different direction for the ABI here.
Richard Smith [Thu, 1 Dec 2016 03:04:07 +0000 (03:04 +0000)]
Revert r285664, cxx-abi-dev chose to go in a different direction for the ABI here.

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

7 years agoPR31081: ignore exception specifications when deducing function template
Richard Smith [Thu, 1 Dec 2016 02:11:49 +0000 (02:11 +0000)]
PR31081: ignore exception specifications when deducing function template
arguments from a declaration; despite what the standard says, this form of
deduction should not be considering exception specifications.

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

7 years ago[TableGen] Minor clean-ups. NFC.
George Burgess IV [Thu, 1 Dec 2016 00:13:18 +0000 (00:13 +0000)]
[TableGen] Minor clean-ups. NFC.

Primarily: try to use DenseSet<StringRef> instead of
std::set<std::string>, and use pretty range algos where we can.

Small sizes were arbitrarily chosen.

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

7 years agoClean up CGObjCMac's APIs for deriving class references. NFC.
John McCall [Wed, 30 Nov 2016 23:54:50 +0000 (23:54 +0000)]
Clean up CGObjCMac's APIs for deriving class references.  NFC.

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

7 years ago[OpenMP] Sema and parsing for 'teams distribute parallel for simd' pragma
Kelvin Li [Wed, 30 Nov 2016 23:51:03 +0000 (23:51 +0000)]
[OpenMP] Sema and parsing for 'teams distribute parallel for simd' pragma

This patch is to implement sema and parsing for 'teams distribute parallel for simd' pragma.

Differential Revision: https://reviews.llvm.org/D27084

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

7 years agoIntroduce a type-safe enum for ForDefinition.
John McCall [Wed, 30 Nov 2016 23:25:13 +0000 (23:25 +0000)]
Introduce a type-safe enum for ForDefinition.

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

7 years agoFix some layering violations where CGObjCMac's NSString emission was
John McCall [Wed, 30 Nov 2016 23:15:55 +0000 (23:15 +0000)]
Fix some layering violations where CGObjCMac's NSString emission was
performed at the CodeGenModule level.

Would be NFC except we now also use a different uniquing structure so
that we don't get spurious conflicts if you ask for both an NSString
and a CFString for the same content (which is possible with builtins).

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

7 years agoProspective MSVC workaround.
John McCall [Wed, 30 Nov 2016 20:46:55 +0000 (20:46 +0000)]
Prospective MSVC workaround.

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

7 years agoFinish adopting ConstantInitBuilder in CGObjCGNU. NFC.
John McCall [Wed, 30 Nov 2016 20:19:46 +0000 (20:19 +0000)]
Finish adopting ConstantInitBuilder in CGObjCGNU.  NFC.

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

7 years ago[Sema] Teach -Wcast-align to look at the aligned attribute of the
Akira Hatanaka [Wed, 30 Nov 2016 19:42:03 +0000 (19:42 +0000)]
[Sema] Teach -Wcast-align to look at the aligned attribute of the
declared variables.

Teach Sema to check the aligned attribute attached to variable
declarations so that it doesn't issue spurious warnings.

rdar://problem/26517471

Differential revision: https://reviews.llvm.org/D21099

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

7 years ago[analyzer] Construct temporary objects of correct types, destroy them properly.
Artem Dergachev [Wed, 30 Nov 2016 19:02:44 +0000 (19:02 +0000)]
[analyzer] Construct temporary objects of correct types, destroy them properly.

When constructing a temporary object region, which represents the result of
MaterializeTemporaryExpr, track down the sub-expression for which the temporary
is necessary with a trick similar to the approach used in CodeGen, namely
by using Expr::skipRValueSubobjectAdjustments().

Then, create the temporary object region with type of that sub-expression.
That type would propagate further in a path-sensitive manner.

During destruction of lifetime-extened temporaries, consult the type of
the temporary object region, rather than the type of the lifetime-extending
variable, in order to call the correct destructor (fixes pr17001) and,
at least, not to crash by trying to call a destructor of a plain type
(fixes pr19539).

rdar://problem/29131302
rdar://problem/29131576

Differential Revision: https://reviews.llvm.org/D26839

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

7 years ago[analyzer] SValExplainer: Support ObjC ivars and __block variables.
Artem Dergachev [Wed, 30 Nov 2016 18:26:43 +0000 (18:26 +0000)]
[analyzer] SValExplainer: Support ObjC ivars and __block variables.

Additionally, explain the difference between normal and heap-based
symbolic regions.

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

7 years ago[analyzer] Minor fixes and improvements to debug.ExprInspection
Artem Dergachev [Wed, 30 Nov 2016 17:57:18 +0000 (17:57 +0000)]
[analyzer] Minor fixes and improvements to debug.ExprInspection

- Fix the bug with transition handling in ExprInspectionChecker's
  checkDeadSymbols implementation.

- Test this bug by adding a new function clang_analyzer_numTimesReached() to
  catch number of passes through the code, which should be handy for testing
  against unintended state splits.

- Add two more functions should help debugging issues quickly without running
  the debugger or dumping exploded graphs - clang_analyzer_dump() which dump()s
  an SVal argument to a warning message, and clang_analyzer_printState(), which
  dump()s the current program state to stderr.

Differential Revision: https://reviews.llvm.org/D26835

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

7 years agoProspective GCC build fix: the unelaborated form of this friend
John McCall [Wed, 30 Nov 2016 04:18:19 +0000 (04:18 +0000)]
Prospective GCC build fix: the unelaborated form of this friend
declaration should find the right type, assuming it's supported
evenly across all our hosts.

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

7 years agomake -fprofile-instr-generate and -fprofile-instr-use work with clang-cl
Bob Haarman [Wed, 30 Nov 2016 03:25:36 +0000 (03:25 +0000)]
make -fprofile-instr-generate and -fprofile-instr-use work with clang-cl

Summary: Makes -fprofile-instr-generate and -fprofile-instr-use work
with clang-cl so that profile-guided optimization can be used.

Differential Revision: https://reviews.llvm.org/D27086

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

7 years agoSwitch CGObjCMac to use ConstantInitBuilder. Whew.
John McCall [Wed, 30 Nov 2016 02:39:18 +0000 (02:39 +0000)]
Switch CGObjCMac to use ConstantInitBuilder.  Whew.

Not strictly NFC because I did change the order of emission of
some global constants, but it shouldn't make any difference.

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

7 years agoFix -Winconsistent-missing-override in CodeGenAction.cpp
Reid Kleckner [Wed, 30 Nov 2016 01:32:53 +0000 (01:32 +0000)]
Fix -Winconsistent-missing-override in CodeGenAction.cpp

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

7 years agoFix formatting issue from r288207
Hans Wennborg [Wed, 30 Nov 2016 00:31:39 +0000 (00:31 +0000)]
Fix formatting issue from r288207

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

7 years agoGive this test that uses Itanium mangling a triple
Reid Kleckner [Wed, 30 Nov 2016 00:31:16 +0000 (00:31 +0000)]
Give this test that uses Itanium mangling a triple

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

7 years agoStop handling interesting deserialized decls after HandleTranslationUnit
Reid Kleckner [Wed, 30 Nov 2016 00:25:36 +0000 (00:25 +0000)]
Stop handling interesting deserialized decls after HandleTranslationUnit

Other AST consumers can deserialize interesting decls that we might
codegen, but they won't make it to the final object file and can trigger
assertions in debug information generation after finalization.

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

7 years ago[c++1z] Improve support for -fno-exceptions: we can't just ignore exception
Richard Smith [Wed, 30 Nov 2016 00:13:55 +0000 (00:13 +0000)]
[c++1z] Improve support for -fno-exceptions: we can't just ignore exception
specifications in this mode in C++17, since they're part of the function type,
so check and diagnose them like we would if exceptions were enabled.

Better ideas welcome.

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

7 years agoFix some Clang-tidy and Include What You Use warnings; other minor fixes (NFC).
Eugene Zelenko [Tue, 29 Nov 2016 22:44:24 +0000 (22:44 +0000)]
Fix some Clang-tidy and Include What You Use warnings; other minor fixes (NFC).

This preparation to remove SetVector.h dependency on SmallSet.h.

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

7 years ago[c++1z] PR31210: ignore exception specification when matching the type of a
Richard Smith [Tue, 29 Nov 2016 22:32:05 +0000 (22:32 +0000)]
[c++1z] PR31210: ignore exception specification when matching the type of a
builtin with the type of an explicit declaration of the same function.

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

7 years agoDon't try to merge DLL attributes on redeclaration of invalid decl (PR31069)
Hans Wennborg [Tue, 29 Nov 2016 22:31:00 +0000 (22:31 +0000)]
Don't try to merge DLL attributes on redeclaration of invalid decl (PR31069)

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

7 years agogetObjCEncodingForMethodDecl cannot fail. Simplify. NFC.
John McCall [Tue, 29 Nov 2016 21:57:00 +0000 (21:57 +0000)]
getObjCEncodingForMethodDecl cannot fail.  Simplify.  NFC.

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

7 years agoDon't declare IsEnumDeclComplete as extern
Reid Kleckner [Tue, 29 Nov 2016 20:46:24 +0000 (20:46 +0000)]
Don't declare IsEnumDeclComplete as extern

Otherwise MSVC and clang-cl will see "extern inline" after merging
redeclarations and emit it in all TUs that include Type.h and Decl.h.

Noticed by inspection, since it's always the first thing to get emitted.

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

7 years agoSupport constant expression evaluation for wchar_t versions of simple string
Richard Smith [Tue, 29 Nov 2016 19:45:17 +0000 (19:45 +0000)]
Support constant expression evaluation for wchar_t versions of simple string
functions, in order to support constexpr std::char_traits<wchar_t>.

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

7 years ago[OpenCL] Prevent generation of globals in non-constant AS for OpenCL.
Anastasia Stulova [Tue, 29 Nov 2016 17:01:19 +0000 (17:01 +0000)]
[OpenCL] Prevent generation of globals in non-constant AS for OpenCL.

Avoid using shortcut for const qualified non-constant address space
aggregate variables while generating them on the stack such that
the alloca object is used instead of a global variable containing
initializer.

Review: https://reviews.llvm.org/D27109

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

7 years ago[AST] Use static_assert to verify types instead of undefined classes.
Benjamin Kramer [Tue, 29 Nov 2016 12:41:21 +0000 (12:41 +0000)]
[AST] Use static_assert to verify types instead of undefined classes.

No functionliaty change intended.

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

7 years ago[OpenCL] Prohibit using reserve_id_t in program scope.
Alexey Bader [Tue, 29 Nov 2016 10:21:40 +0000 (10:21 +0000)]
[OpenCL] Prohibit using reserve_id_t in program scope.

Patch by Egor Churaev (echuraev).

Reviewers: Anastasia

Subscribers: cfe-commits, yaxunl, bader

Differential Revision: https://reviews.llvm.org/D27099

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

7 years agoRemoved DEBUG_TYPE from TokenAnalyzer.h
Krasimir Georgiev [Tue, 29 Nov 2016 10:21:28 +0000 (10:21 +0000)]
Removed DEBUG_TYPE from TokenAnalyzer.h

Summary:
Defining DEBUG_TYPE in a header file doesn't make sense.
It is already defined in the corresponding source file.

Reviewers: klimek, ioeric

Subscribers: klimek

Differential Revision: https://reviews.llvm.org/D27164

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

7 years agoCorrect comment: we are creating a canonicla decltypetype.
Yaron Keren [Tue, 29 Nov 2016 10:08:20 +0000 (10:08 +0000)]
Correct comment: we are creating a canonicla decltypetype.

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

7 years agoclang-format: [JS] Properly format dict literals that skip labels.
Daniel Jasper [Tue, 29 Nov 2016 09:40:36 +0000 (09:40 +0000)]
clang-format: [JS] Properly format dict literals that skip labels.

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

7 years agoclang-format: Wrap complex binary expressions on the RHS of a comma.
Daniel Jasper [Tue, 29 Nov 2016 09:40:32 +0000 (09:40 +0000)]
clang-format: Wrap complex binary expressions on the RHS of a comma.

Specifically, if the RHS of a comma is a complex binary expression and
spans multiple lines, insert a line break before it. This usually is
often more readable compared to producing a hanging indent. See changes
in FormatTest.cpp for examples.

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

7 years agoclang-format: Fix unnnecessary line break.
Daniel Jasper [Tue, 29 Nov 2016 09:40:01 +0000 (09:40 +0000)]
clang-format: Fix unnnecessary line break.

Before:
  aaaaaaaaaa(aaaa(aaaa,
  aaaa), //
     aaaa,
             aaaaa);

After:
  aaaaaaaaaa(aaaa(aaaa,
  aaaa), //
     aaaa, aaaaa);

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

7 years agoAdd a warning for 'main' returning 'true' or 'false'.
Richard Smith [Tue, 29 Nov 2016 01:35:17 +0000 (01:35 +0000)]
Add a warning for 'main' returning 'true' or 'false'.

Patch by Joshua Hurwitz!

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

7 years agoUse ${:uid} to generate unique MS asm labels, not {:uid}
Reid Kleckner [Tue, 29 Nov 2016 00:39:37 +0000 (00:39 +0000)]
Use ${:uid} to generate unique MS asm labels, not {:uid}

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

7 years agoAvoid lambdas in default member initializers to work around clang bug
Reid Kleckner [Mon, 28 Nov 2016 23:58:04 +0000 (23:58 +0000)]
Avoid lambdas in default member initializers to work around clang bug

On Windows, Clang is mangling lambdas in default member initializers
incorrectly. See PR31197.

This is causing redness on the self-host bots. Work around the problem
locally so we aren't blind to further issues.

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

7 years agoIRGen: Remove all uses of CreateDefaultAlignedLoad.
Peter Collingbourne [Mon, 28 Nov 2016 22:30:21 +0000 (22:30 +0000)]
IRGen: Remove all uses of CreateDefaultAlignedLoad.

Differential Revision: https://reviews.llvm.org/D27157

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

7 years agoMake CGVTables use ConstantInitBuilder. NFC.
John McCall [Mon, 28 Nov 2016 22:18:33 +0000 (22:18 +0000)]
Make CGVTables use ConstantInitBuilder.  NFC.

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

7 years agoHide the result of building a constant initializer. NFC.
John McCall [Mon, 28 Nov 2016 22:18:30 +0000 (22:18 +0000)]
Hide the result of building a constant initializer.  NFC.

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

7 years agoConstantBuilder -> ConstantInitBuilder for clarity, and
John McCall [Mon, 28 Nov 2016 22:18:27 +0000 (22:18 +0000)]
ConstantBuilder -> ConstantInitBuilder for clarity, and
move the member classes up to top level to allow forward
declarations to name them.  NFC.

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

7 years ago[Driver] Add unit tests for Distro detection
Michal Gorny [Mon, 28 Nov 2016 21:11:22 +0000 (21:11 +0000)]
[Driver] Add unit tests for Distro detection

Add a set of unit tests for the distro detection code. The tests use an
in-memory virtual filesystems resembling release files for various
distributions supported. All release files are provided (not only the
ones directly used) in order to guarantee that one of the rules will not
mistakenly recognize the distribution incorrectly due to the additional
files (e.g. Ubuntu as Debian).

Differential Revision: https://reviews.llvm.org/D25869

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

7 years ago[Driver] Fix recognizing newer OpenSUSE versions
Michal Gorny [Mon, 28 Nov 2016 21:11:18 +0000 (21:11 +0000)]
[Driver] Fix recognizing newer OpenSUSE versions

Fix recognizing newer OpenSUSE versions that combine the two version
components into 'VERSION = x.y'. The check was written against an older
version that kept those two split as VERSION and PATCHLEVEL.

Differential Revision: https://reviews.llvm.org/D26850

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

7 years ago[Driver] Refactor distro detection & classification as a separate API
Michal Gorny [Mon, 28 Nov 2016 21:11:14 +0000 (21:11 +0000)]
[Driver] Refactor distro detection & classification as a separate API

Refactor the Distro enum along with helper functions into a full-fledged
Distro class, inspired by llvm::Triple, and make it a public API.
The new class wraps the enum with necessary comparison operators, adding
the convenience Is*() methods and a constructor performing
the detection. The public API is needed to run the unit tests (D25869).

Differential Revision: https://reviews.llvm.org/D25949

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

7 years ago[MS] Mangle a unique ID into all MS inline asm labels
Reid Kleckner [Mon, 28 Nov 2016 20:52:19 +0000 (20:52 +0000)]
[MS] Mangle a unique ID into all MS inline asm labels

This solves PR23715 in a way that is compatible with LTO.

MSVC supports jumping to source-level labels and between inline asm
blocks, but we don't.

Also revert the old solution, r255201, which was to mark these calls as
noduplicate.

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

7 years ago[OPENMP] Fix for PR31137: Wrong DSA for members in struct.
Alexey Bataev [Mon, 28 Nov 2016 15:55:15 +0000 (15:55 +0000)]
[OPENMP] Fix for PR31137: Wrong DSA for members in struct.

If member expression is used in the task region and the base expression
is a DeclRefExp and the variable used in this ref expression is private,
it should be marked as implicitly firstprivate inside this region. Patch
fixes this issue.

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

7 years ago[Sema] Set range end of constructors and destructors in template instantiations
Malcolm Parsons [Mon, 28 Nov 2016 11:11:34 +0000 (11:11 +0000)]
[Sema] Set range end of constructors and destructors in template instantiations

Summary:
clang-tidy checks frequently use source ranges of functions.
The source range of constructors and destructors in template instantiations
is currently a single token.
The factory method for constructors and destructors does not allow the
end source location to be specified.
Set end location manually after creating instantiation.

Reviewers: aaron.ballman, rsmith, arphaman

Subscribers: arphaman, cfe-commits

Differential Revision: https://reviews.llvm.org/D26849

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

7 years agoAdjust type-trait evaluation to properly handle Using(Shadow)Decls
Hal Finkel [Sun, 27 Nov 2016 16:26:14 +0000 (16:26 +0000)]
Adjust type-trait evaluation to properly handle Using(Shadow)Decls

Since r274049, for an inheriting constructor declaration, the name of the using
declaration (and using shadow declaration comes from the using declaration) is
the name of a derived class, not the base class (line 8225-8232 of
lib/Sema/SemaDeclCXX.cpp in https://reviews.llvm.org/rL274049). Because of
this, name-based lookup performed inside Sema::LookupConstructors returns not
only CXXConstructorDecls but also Using(Shadow)Decls, which results assertion
failure reported in PR29087.

Patch by Taewook Oh, thanks!

Differential Revision: https://reviews.llvm.org/D23765

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

7 years ago[DOXYGEN] Updated instruction names corresponding to avxintrin.h intrinsics.
Ekaterina Romanova [Sat, 26 Nov 2016 19:38:19 +0000 (19:38 +0000)]
[DOXYGEN] Updated instruction names corresponding to avxintrin.h intrinsics.

Documentation for some of the avxintrin.h's intrinsics errorneously said that
non VEX-prefixed instructions could be generated. This was fixed.

I tried several different solutions to achieve pretty printing of unordered lists (nested and non-nested) in param sections in doxygen.

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

7 years agoTypo.
Joerg Sonnenberger [Fri, 25 Nov 2016 20:15:57 +0000 (20:15 +0000)]
Typo.

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

7 years agoDo not do raw name replacement when FromDecl is a class forward-declaration.
Eric Liu [Fri, 25 Nov 2016 16:02:49 +0000 (16:02 +0000)]
Do not do raw name replacement when FromDecl is a class forward-declaration.

Summary:
If the `FromDecl` is a class forward declaration, the reference is
still considered as referring to the original definition given the nature
of forward-declarations, so we can't do a raw name replacement in this case.

Reviewers: bkramer

Subscribers: cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D27132

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

7 years agoDocument the arguments form of commands.
Joerg Sonnenberger [Fri, 25 Nov 2016 14:14:43 +0000 (14:14 +0000)]
Document the arguments form of commands.

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

7 years agoConsider nested namespaces in the canonical namespace as canonical as well.
Eric Liu [Fri, 25 Nov 2016 12:39:03 +0000 (12:39 +0000)]
Consider nested namespaces in the canonical namespace as canonical as well.

Summary:
For example, this case was missed when looking for different but canonical
namespaces. UseContext in this case should be considered as in the canonical
namespace.
```
namespace a { namespace b { <FromContext> } }
namespace a { namespace b { namespace c { <UseContext> } } }
```
Added some commenting.

Reviewers: bkramer

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D27125

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

7 years ago[CodeGen] Pass objects that are expensive to copy by const ref.
Benjamin Kramer [Thu, 24 Nov 2016 16:01:20 +0000 (16:01 +0000)]
[CodeGen] Pass objects that are expensive to copy by const ref.

No functionality change. Found by clang-tidy's
performance-unnecessary-value-param.

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

7 years ago[Format] Avoid copying std::sets and simplify code a bit.
Benjamin Kramer [Thu, 24 Nov 2016 15:42:29 +0000 (15:42 +0000)]
[Format] Avoid copying std::sets and simplify code a bit.

No functional change.

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

7 years ago[Sema] Pass APSInts by const ref, avoiding copies.
Benjamin Kramer [Thu, 24 Nov 2016 15:36:17 +0000 (15:36 +0000)]
[Sema] Pass APSInts by const ref, avoiding copies.

No functionality change intended. Fix by clang-tidy's
performance-unnecessary-value-param check.

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

7 years ago[PPC] support for arithmetic builtins in the FE
Ehsan Amiri [Thu, 24 Nov 2016 12:40:04 +0000 (12:40 +0000)]
[PPC] support for arithmetic builtins in the FE

(commit again after fixing the buildbot failures)
This adds various overloads of the following builtins to altivec.h:

    vec_neg
    vec_nabs
    vec_adde
    vec_addec
    vec_sube
    vec_subec
    vec_subc

Note that for vec_sub builtins on 32 bit integers, the semantics is similar to
what ISA describes for instructions like vsubecuq that work on quadwords: the
first operand is added to the one's complement of the second operand. (As
opposed to two's complement which I expected).

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

7 years ago[ASTDumper] Add some more character escapes for convenience.
Benjamin Kramer [Thu, 24 Nov 2016 09:41:33 +0000 (09:41 +0000)]
[ASTDumper] Add some more character escapes for convenience.

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