]> granicus.if.org Git - clang/log
clang
8 years ago[OPENMP 4.1] Initial support for 'simdlen' clause.
Alexey Bataev [Fri, 21 Aug 2015 11:14:16 +0000 (11:14 +0000)]
[OPENMP 4.1] Initial support for 'simdlen' clause.
Add parsing/sema analysis for 'simdlen' clause in simd directives. Also add check that if both 'safelen' and 'simdlen' clauses are specified, the value of 'simdlen' parameter is less than the value of 'safelen' parameter.

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

8 years ago[CMake][Standalone] Detect Python. Python is used for Lit testing.
NAKAMURA Takumi [Fri, 21 Aug 2015 09:38:46 +0000 (09:38 +0000)]
[CMake][Standalone] Detect Python. Python is used for Lit testing.

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

8 years agoUntabify.
NAKAMURA Takumi [Fri, 21 Aug 2015 09:37:53 +0000 (09:37 +0000)]
Untabify.

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

8 years agoExpand mingw-long-double.c to test for long double alignment.
Yaron Keren [Fri, 21 Aug 2015 08:26:31 +0000 (08:26 +0000)]
Expand mingw-long-double.c to test for long double alignment.

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

8 years ago[Sema] Don't crash when diagnosing hack in libstdc++
David Majnemer [Fri, 21 Aug 2015 06:44:10 +0000 (06:44 +0000)]
[Sema] Don't crash when diagnosing hack in libstdc++

While working around a bug in certain standard library implementations,
we would try to diagnose the issue so that library implementors would
fix their code.  However, we assumed an entity being initialized was
a non-static data member subobject when other circumstances are
possible.

This fixes PR24526.

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

8 years ago[OPENMP 4.1] Improved codegen for 'uval' qualifier of 'linear' clause.
Alexey Bataev [Fri, 21 Aug 2015 06:41:23 +0000 (06:41 +0000)]
[OPENMP 4.1] Improved codegen for 'uval' qualifier of 'linear' clause.
According to standard the 'uval' modifier declares the address of the original list item to have an invariant value for all iterations of the associated loop(s). Patch improves codegen for this qualifier by removing usage of the original reference variable and replacing by referenced l-value.

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

8 years agoStop treating -static as overriding -fPIC: they are distinct.
James Y Knight [Fri, 21 Aug 2015 04:14:55 +0000 (04:14 +0000)]
Stop treating -static as overriding -fPIC: they are distinct.

For some reason, clang had been treating a command like:
 clang -static -fPIC foo.c
as if it should be compiled without the PIC relocation model.

This was incorrect: -static should be affecting only the linking
model, and -fPIC only the compilation.

This new behavior also matches GCC.

This is a follow-up from a review comment on r245447.

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

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

8 years agoFix a few things with -Winfinite-recursion. NFC
Richard Trieu [Fri, 21 Aug 2015 03:43:09 +0000 (03:43 +0000)]
Fix a few things with -Winfinite-recursion.  NFC

Now that -Winfinite-recursion no longer uses recursive calls to before path
analysis, several bits of the code can be improved.  The main changes:

1) Early return when finding a path to the exit block without a recursive call
2) Moving the states vector into checkForRecursiveFunctionCall instead of
   passing it in by reference
3) Change checkForRecursiveFunctionCall to return a bool when the warning
   should be emitted.
4) Use the State vector instead of storing it in the Stack vector.

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

8 years ago[modules] When we see a definition of a function for which we already have a
Richard Smith [Fri, 21 Aug 2015 03:04:33 +0000 (03:04 +0000)]
[modules] When we see a definition of a function for which we already have a
non-visible definition, skip the new definition to avoid ending up with a
function with multiple definitions.

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

8 years ago[Static Analyzer] Add checker to catch lightweight generics related type errors in...
Gabor Horvath [Fri, 21 Aug 2015 00:18:28 +0000 (00:18 +0000)]
[Static Analyzer] Add checker to catch lightweight generics related type errors in Objective-C.

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

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

8 years ago[Static Analyzer] Made it easier to test new checkers using the test suite.
Gabor Horvath [Thu, 20 Aug 2015 22:59:49 +0000 (22:59 +0000)]
[Static Analyzer] Made it easier to test new checkers using the test suite.

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

8 years ago[analyzer] Fix for PR24112 (scan-build doesn't work with --use-analyzer="path to...
Anton Yartsev [Thu, 20 Aug 2015 21:52:39 +0000 (21:52 +0000)]
[analyzer] Fix for PR24112 (scan-build doesn't work with --use-analyzer="path to clang++.exe").

Don't derive the path_to_clang++ from the path_to_clang if the path_to_clang is really the path_to_clang++.

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

8 years ago Revert the 64bit part of r245084; long double values were not changed by
Yaron Keren [Thu, 20 Aug 2015 21:51:46 +0000 (21:51 +0000)]
 Revert the 64bit part of r245084; long double values were not changed by
 it as they are already set correctly by X86_64TargetInfo and X86TargetInfo.

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

8 years agoRevert r245344.
Evgeniy Stepanov [Thu, 20 Aug 2015 21:47:16 +0000 (21:47 +0000)]
Revert r245344.

That change is causing strange test failures on Fedora 22 (PR24503),
and it does not have any effect with Gold linker anyway (PR15823,
https://sourceware.org/bugzilla/show_bug.cgi?id=18859).

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

8 years agoRevert the 32bit part of r245084; mingw values were correct before it.
Yaron Keren [Thu, 20 Aug 2015 21:36:14 +0000 (21:36 +0000)]
Revert the 32bit part of r245084; mingw values were correct before it.

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

8 years agoDo not crash when static analysis encounters a FunctionDecl that has a delayed templa...
Aaron Ballman [Thu, 20 Aug 2015 21:27:35 +0000 (21:27 +0000)]
Do not crash when static analysis encounters a FunctionDecl that has a delayed template parse of its body.

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

8 years agoPR24483: Delete some dead/incorrect code that triggered assertions.
Richard Smith [Thu, 20 Aug 2015 20:45:25 +0000 (20:45 +0000)]
PR24483: Delete some dead/incorrect code that triggered assertions.

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

8 years agoFix test on Windows to accept both gcc and gcc.exe.
Yaron Keren [Thu, 20 Aug 2015 20:37:58 +0000 (20:37 +0000)]
Fix test on Windows to accept both gcc and gcc.exe.

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

8 years ago[Headers][X86] Use __builtin_shufflevector in AVX2 broadcasts.
Ahmed Bougacha [Thu, 20 Aug 2015 20:27:21 +0000 (20:27 +0000)]
[Headers][X86] Use __builtin_shufflevector in AVX2 broadcasts.

This lets us optimize them better. We agreed to remove the intrinsics,
instead of combining them later, as, at -O0, we generate the expected
instructions. Plus, it's a nice cleanup.

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

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

8 years ago[CMake] Simplifying logic for USES_TERMINAL on bootstrap targets.
Chris Bieneman [Thu, 20 Aug 2015 20:12:20 +0000 (20:12 +0000)]
[CMake] Simplifying logic for USES_TERMINAL on bootstrap targets.

In CMake variables that haven't been set are evaluated to empty strings, so we don't need to set the variables to empty strings.

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

8 years ago[CMake] Exclude 'bootstrap' target from 'all' where possible.
Chris Bieneman [Thu, 20 Aug 2015 20:12:18 +0000 (20:12 +0000)]
[CMake] Exclude 'bootstrap' target from 'all' where possible.

EXCLUDE_FROM_ALL in ExternalProject is only available on CMake 3.1 and later.

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

8 years ago[Sparc] Add '-EL' when invoking gcc to link little-endian binaries.
Douglas Katzman [Thu, 20 Aug 2015 18:32:26 +0000 (18:32 +0000)]
[Sparc] Add '-EL' when invoking gcc to link little-endian binaries.

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

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

8 years agoRevert r245496 "[CUDA] Add appropriate host/device attribute to builtins."
Artem Belevich [Thu, 20 Aug 2015 18:28:56 +0000 (18:28 +0000)]
Revert r245496 "[CUDA] Add appropriate host/device attribute to builtins."

It's breaking internal test.

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

8 years agoSilence a "not all control paths return a value" warning; NFC.
Aaron Ballman [Thu, 20 Aug 2015 13:31:16 +0000 (13:31 +0000)]
Silence a "not all control paths return a value" warning; NFC.

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

8 years agoFix crash with two typos in the arguments of a function
Olivier Goffart [Thu, 20 Aug 2015 13:11:14 +0000 (13:11 +0000)]
Fix crash with two typos in the arguments of a function

The problem is that the arguments are of TheCall are reset later
to the ones in Args, making TypoExpr put back. Some TypoExpr that have
already  been diagnosed and will assert later in Sema::getTypoExprState

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

8 years ago[OPENMP 4.1] Allow to use 'uval' and 'ref' modifiers for reference types only.
Alexey Bataev [Thu, 20 Aug 2015 12:15:57 +0000 (12:15 +0000)]
[OPENMP 4.1] Allow to use 'uval' and 'ref' modifiers for reference types only.
Standard allows to use 'uval' and 'ref' modifiers in 'linear' clause for variables with reference types only. Added check for it and modified test.

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

8 years ago[OPENMP 4.1] Initial support for modifiers in 'linear' clause.
Alexey Bataev [Thu, 20 Aug 2015 10:54:39 +0000 (10:54 +0000)]
[OPENMP 4.1] Initial support for modifiers in 'linear' clause.

OpenMP 4.1 adds 3 optional modifiers to 'linear' clause.
Format of 'linear' clause has changed to:
```
linear(linear-list[ : linear-step])
```
where linear-list is one of the following
```
list
modifier(list)
```
where modifier is one of the following:
```
 ref (C++)
 val (C/C++)
 uval (C++)
```
Patch adds parsing and sema analysis for these modifiers.

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

8 years agoFix the layout of bitfields in ms_struct unions: their
John McCall [Wed, 19 Aug 2015 22:42:36 +0000 (22:42 +0000)]
Fix the layout of bitfields in ms_struct unions: their
alignment is ignored, and they always allocate a complete
storage unit.

Also, change the dumping of AST record layouts: use the more
readable C++-style dumping even in C, include bitfield offset
information in the dump, and don't print sizeof/alignof
information for fields of record type, since we don't do so
for bases or other kinds of field.

rdar://22275433

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

8 years agoAdd missing comment.
Richard Smith [Wed, 19 Aug 2015 21:59:52 +0000 (21:59 +0000)]
Add missing comment.

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

8 years agoFix -Wlogical-not-parentheses to work better with C code.
Richard Trieu [Wed, 19 Aug 2015 21:33:54 +0000 (21:33 +0000)]
Fix -Wlogical-not-parentheses to work better with C code.

Remove the assumption of a Boolean type by checking if an expression is known
to have a boolean value.  Disable warning in two other tests.

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

8 years ago[CUDA] Added stubs for __nvvm_atom_add_*_d() builtins.
Artem Belevich [Wed, 19 Aug 2015 21:11:37 +0000 (21:11 +0000)]
[CUDA] Added stubs for __nvvm_atom_add_*_d() builtins.

They show up in CUDA headers but are not currently supported by
NVPTX back-end.

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

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

8 years ago[modules] Don't needlessly bounce through Sema when updating exception specifications.
Richard Smith [Wed, 19 Aug 2015 21:09:32 +0000 (21:09 +0000)]
[modules] Don't needlessly bounce through Sema when updating exception specifications.

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

8 years agoInternal-linkage variables with constant-evaluatable initializers do not need to...
Richard Smith [Wed, 19 Aug 2015 20:49:38 +0000 (20:49 +0000)]
Internal-linkage variables with constant-evaluatable initializers do not need to be emitted. (Also reduces the set of variables that need to be eagerly deserialized when using PCH / modules.)

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

8 years ago[CUDA] Add appropriate host/device attribute to builtins.
Artem Belevich [Wed, 19 Aug 2015 20:48:20 +0000 (20:48 +0000)]
[CUDA] Add appropriate host/device attribute to builtins.

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

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

8 years agoGenerating available_externally vtables bugfix
Piotr Padlewski [Wed, 19 Aug 2015 20:09:09 +0000 (20:09 +0000)]
Generating available_externally vtables bugfix

Bugfix revealed in r245264.

http://reviews.llvm.org/D12128

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

8 years agoAdd REQUIRES: x86-registered-target to test since it's required.
Yaron Keren [Wed, 19 Aug 2015 17:18:32 +0000 (17:18 +0000)]
Add REQUIRES: x86-registered-target to test since it's required.

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

8 years agoAccording to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.
Yaron Keren [Wed, 19 Aug 2015 17:02:32 +0000 (17:02 +0000)]
According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.
See
 https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/i386-and-x86-64-Options.html

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

8 years agoProperly pass through the PIC mode to the integrated assembler when
James Y Knight [Wed, 19 Aug 2015 15:12:02 +0000 (15:12 +0000)]
Properly pass through the PIC mode to the integrated assembler when
doing assembly-only, and unify the Driver's PIC argument parsing.

On a few architectures, parsing of assembly files annoyingly depends
on whether PIC is enabled or not. This was handled for external 'as'
already (passing -KPIC), but was missed for calls to the standalone
internal assembler.

The integrated-as.s test needed to be modified to not expect
-fsanitize=address to be unused, as now fsanitize *IS* used for
assembly, since -fsanitize=memory can sometimes imply -fPIE, which the
assembler needs to know (gack!!).

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

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

8 years ago[ARM] Proper generic cpus handling
Vladimir Sukharev [Wed, 19 Aug 2015 14:50:18 +0000 (14:50 +0000)]
[ARM] Proper generic cpus handling

"generic" cpu was wrongly handled as exact real CPU name of ARMv8.1A architecture.

This has been fixed, now it is abstract name, suitable for any arch.

Reviewers: rengolin

Subscribers: cfe-commits

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

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

8 years ago[OPENMP] Link libomp.lib on Windows
Alexey Bataev [Wed, 19 Aug 2015 04:49:01 +0000 (04:49 +0000)]
[OPENMP] Link libomp.lib on Windows

Adds libomp.lib for -fopenmp=libomp and libiomp5md.lib for -fopenmp=libiomp5 on Windows
Differential Revision: http://reviews.llvm.org/D11932

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

8 years ago[modules] Don't eagerly deserialize so many ImportDecls. CodeGen basically ignores...
Richard Smith [Wed, 19 Aug 2015 02:30:28 +0000 (02:30 +0000)]
[modules] Don't eagerly deserialize so many ImportDecls. CodeGen basically ignores ImportDecls imported from modules, so only eagerly deserialize the ones from a PCH / preamble.

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

8 years agoRename getDefaultFeatures -> initDefaultFeatures and update comment
Eric Christopher [Wed, 19 Aug 2015 02:24:21 +0000 (02:24 +0000)]
Rename getDefaultFeatures -> initDefaultFeatures and update comment
with the current behavior as the name seems to match what's going on.

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

8 years ago[SemaExpr] Re-enable missing assertion.
Davide Italiano [Wed, 19 Aug 2015 02:21:12 +0000 (02:21 +0000)]
[SemaExpr] Re-enable missing assertion.

This has been disabled for a long time, but:
1) Initializers work (and apparently they're re reason why this was disabled).
2) various tests happen to hit this code path and the invariant seems to be
always verified.

Differential Revision: http://reviews.llvm.org/D12110
Reviewed by: rsmith

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

8 years agoMake __builtin_object_size always answer correctly
George Burgess IV [Wed, 19 Aug 2015 02:19:07 +0000 (02:19 +0000)]
Make __builtin_object_size always answer correctly

__builtin_object_size would return incorrect answers for many uses where
type=3. This fixes the inaccuracy by making us emit 0 instead of LLVM's
objectsize intrinsic.

Additionally, there are many cases where we would emit suboptimal (but
correct) answers, such as when arrays are involved. This patch fixes
some of these cases (please see new tests in test/CodeGen/object-size.c
for specifics on which cases are improved)

Resubmit of r245323 with PR24493 fixed.
Patch mostly by Richard Smith.
Differential Revision: http://reviews.llvm.org/D12000
This fixes PR15212.

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

8 years agounique_ptrify CXXBasePaths::DeclsFound & remove the then-unnecessary user-defined...
David Blaikie [Tue, 18 Aug 2015 23:56:00 +0000 (23:56 +0000)]
unique_ptrify CXXBasePaths::DeclsFound & remove the then-unnecessary user-defined dtor

Maybe this and the NumDeclsFound member should just be a std::vector
instead. (it could be a std::dynarray, but that missed standardization)

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

8 years ago[modules] Tests for r245390.
Richard Smith [Tue, 18 Aug 2015 23:42:50 +0000 (23:42 +0000)]
[modules] Tests for r245390.

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

8 years ago[modules] Fix HeaderFileInfo serialization to store all the known owning modules...
Richard Smith [Tue, 18 Aug 2015 23:42:23 +0000 (23:42 +0000)]
[modules] Fix HeaderFileInfo serialization to store all the known owning modules for a header, not just the current favourite.

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

8 years agoDevirtualize EHScopeStack::Cleanup's dtor because it's never destroyed polymorphically
David Blaikie [Tue, 18 Aug 2015 22:40:54 +0000 (22:40 +0000)]
Devirtualize EHScopeStack::Cleanup's dtor because it's never destroyed polymorphically

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

8 years agoFix for MSVC
David Blaikie [Tue, 18 Aug 2015 22:10:49 +0000 (22:10 +0000)]
Fix for MSVC

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

8 years agoWdeprecated: Support movability of EHScopeStack::Cleanup objects as they are move...
David Blaikie [Tue, 18 Aug 2015 22:09:28 +0000 (22:09 +0000)]
Wdeprecated: Support movability of EHScopeStack::Cleanup objects as they are move constructed in ConditionalCleanup::restore

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

8 years agoRange-based-for-convert some loops in ASTWriter. No functionality change intended.
Richard Smith [Tue, 18 Aug 2015 21:53:42 +0000 (21:53 +0000)]
Range-based-for-convert some loops in ASTWriter. No functionality change intended.

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

8 years ago[autoconf] Fixing reversed logic introduced r245304.
Chris Bieneman [Tue, 18 Aug 2015 21:23:44 +0000 (21:23 +0000)]
[autoconf] Fixing reversed logic introduced r245304.

Thanks for the catch Hal!

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

8 years agoWorkaround -Wdeprecated on SemDiagnosticConsumer's tricksy copy ctor.
David Blaikie [Tue, 18 Aug 2015 20:54:26 +0000 (20:54 +0000)]
Workaround -Wdeprecated on SemDiagnosticConsumer's tricksy copy ctor.

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

8 years agoInitialize the AST consumer as soon as we have both an ASTConsumer and an
Richard Smith [Tue, 18 Aug 2015 20:39:29 +0000 (20:39 +0000)]
Initialize the AST consumer as soon as we have both an ASTConsumer and an
ASTContext. Fixes some cases where we could previously initialize the AST
consumer more than once.

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

8 years ago[sanitizer] Add -lutil to static runtime link flags.
Evgeniy Stepanov [Tue, 18 Aug 2015 20:36:11 +0000 (20:36 +0000)]
[sanitizer] Add -lutil to static runtime link flags.

This is needed to prevent breakage of -Wl,-as-needed link when
interceptors for functions in libutil are added. See PR15823.

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

8 years agoRevert r245323, it caused PR24493.
Nico Weber [Tue, 18 Aug 2015 20:32:55 +0000 (20:32 +0000)]
Revert r245323, it caused PR24493.

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

8 years agoSimplify Diagnostic's ctors a bit by using in-class initializers for its members
David Blaikie [Tue, 18 Aug 2015 20:24:06 +0000 (20:24 +0000)]
Simplify Diagnostic's ctors a bit by using in-class initializers for its members

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

8 years agoAdd AST narrowing matchers for inline and anonymous namespaces. Since the inline...
Aaron Ballman [Tue, 18 Aug 2015 19:55:20 +0000 (19:55 +0000)]
Add AST narrowing matchers for inline and anonymous namespaces. Since the inline keyword can also be specified on a FunctionDecl, this is a polymorphic matcher.

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

8 years agoRemoving useless whitespace; NFC.
Aaron Ballman [Tue, 18 Aug 2015 19:11:07 +0000 (19:11 +0000)]
Removing useless whitespace; NFC.

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

8 years agoMake __builtin_object_size always answer correctly
George Burgess IV [Tue, 18 Aug 2015 18:18:27 +0000 (18:18 +0000)]
Make __builtin_object_size always answer correctly

__builtin_object_size would return incorrect answers for many uses where
type=3. This fixes the inaccuracy by making us emit 0 instead of LLVM's
objectsize intrinsic.

Additionally, there are many cases where we would emit suboptimal (but
correct) answers, such as when arrays are involved. This patch fixes
some of these cases (please see new tests in test/CodeGen/object-size.c
for specifics on which cases are improved)

Patch mostly by Richard Smith.
Differential Revision: http://reviews.llvm.org/D12000
This fixes PR15212.

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

8 years agoUpdate to reflect the library set in LLVM changing.
Chandler Carruth [Tue, 18 Aug 2015 17:59:33 +0000 (17:59 +0000)]
Update to reflect the library set in LLVM changing.

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

8 years agoWe shouldn't need to pass -fno-strict-aliasing when building clang with clang.
Chris Bieneman [Tue, 18 Aug 2015 16:15:44 +0000 (16:15 +0000)]
We shouldn't need to pass -fno-strict-aliasing when building clang with clang.

Summary: The code comments in the Makefile indicate this was put in place to support issues when building clang with GCC. Today clang's strict aliasing works, so we shouldn't pass -fno-strict-aliasing when building with clang.

Reviewers: bogner, echristo

Subscribers: cfe-commits

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

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

8 years ago[TreeTransform] Simplify code. No functionality change.
Benjamin Kramer [Tue, 18 Aug 2015 08:10:39 +0000 (08:10 +0000)]
[TreeTransform] Simplify code. No functionality change.

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

8 years ago[OPENMP 4.1] Allow variables with reference types in private clauses.
Alexey Bataev [Tue, 18 Aug 2015 06:47:21 +0000 (06:47 +0000)]
[OPENMP 4.1] Allow variables with reference types in private clauses.

OpenMP 4.1 allows to use variables with reference types in all private clauses (private, firstprivate, lastprivate, linear etc.). Patch allows to use such variables and fixes codegen for linear variables with reference types.

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

8 years agoRevert "Generating assumption loads of vptr after ctor call (fixed)"
Justin Bogner [Tue, 18 Aug 2015 05:40:20 +0000 (05:40 +0000)]
Revert "Generating assumption loads of vptr after ctor call (fixed)"

Bootstrap bots were failing:

http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_build/6382/
http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/2969

This reverts r245264.

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

8 years agoGenerating assumption loads of vptr after ctor call (fixed)
Piotr Padlewski [Tue, 18 Aug 2015 03:52:00 +0000 (03:52 +0000)]
Generating assumption loads of vptr after ctor call (fixed)

Generating call assume(icmp %vtable, %global_vtable) after constructor
call for devirtualization purposes.

For more info go to:
http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html

Edit:
Fixed version because of PR24479.

http://reviews.llvm.org/D11859

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

8 years agoRevert r245257 "Generating assumption loads of vptr after ctor call"
Hans Wennborg [Tue, 18 Aug 2015 00:17:58 +0000 (00:17 +0000)]
Revert r245257 "Generating assumption loads of vptr after ctor call"

It caused PR24479

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

8 years agoDoxygen: add build option to use svg instead of png files for graphs
Hans Wennborg [Mon, 17 Aug 2015 23:38:56 +0000 (23:38 +0000)]
Doxygen: add build option to use svg instead of png files for graphs

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

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

8 years agoGenerating assumption loads of vptr after ctor call
Piotr Padlewski [Mon, 17 Aug 2015 23:33:49 +0000 (23:33 +0000)]
Generating assumption loads of vptr after ctor call

Generating call assume(icmp %vtable, %global_vtable) after constructor
call for devirtualization purposes.

For more info go to:
http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html

http://reviews.llvm.org/D11859

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

8 years agoRemove dead code, there's no need for an override that just duplicates
Eric Christopher [Mon, 17 Aug 2015 22:22:28 +0000 (22:22 +0000)]
Remove dead code, there's no need for an override that just duplicates
the default behavior.

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

8 years agoMake a test less brittle.
Richard Trieu [Mon, 17 Aug 2015 22:18:30 +0000 (22:18 +0000)]
Make a test less brittle.

Capture line numbers in a variable for FileCheck instead of hardcoding them.

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

8 years ago[modules] When parsing the base specifiers of a parse-merged class, the current
Richard Smith [Mon, 17 Aug 2015 20:24:17 +0000 (20:24 +0000)]
[modules] When parsing the base specifiers of a parse-merged class, the current
context is the class itself but lookups should be performed starting with the
lookup parent of the class (class and base members don't shadow types from the
surrounding context because they have not been declared yet).

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

8 years ago[modules] PR20507: Avoid silent textual inclusion.
Sean Silva [Mon, 17 Aug 2015 16:39:30 +0000 (16:39 +0000)]
[modules] PR20507: Avoid silent textual inclusion.

Summary:
If a module was unavailable (either a missing requirement on the module
being imported, or a missing file anywhere in the top-level module (and
not dominated by an unsatisfied `requires`)), we would silently treat
inclusions as textual. This would cause all manner of crazy and
confusing errors (and would also silently "work" sometimes, making the
problem difficult to track down).

I'm really not a fan of the `M->isAvailable(getLangOpts(), getTargetInfo(),
Requirement, MissingHeader)` function; it seems to do too many things at
once, but for now I've done things in a sort of awkward way.

The changes to test/Modules/Inputs/declare-use/module.map
were necessitated because the thing that was meant to be tested there
(introduced in r197805) was predicated on silently falling back to textual
inclusion, which we no longer do.

The changes to test/Modules/Inputs/macro-reexport/module.modulemap
are just an overlooked missing header that seems to have been missing since
this code was committed (r213922), which is now caught.

Reviewers: rsmith, benlangmuir, djasper

Subscribers: cfe-commits

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

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

8 years ago[clang-tidy] Make NumOccurrenceFlag for SourcePaths configurable.
Alexander Kornienko [Mon, 17 Aug 2015 10:01:42 +0000 (10:01 +0000)]
[clang-tidy] Make NumOccurrenceFlag for SourcePaths configurable.

Added an additional ctor that takes a NumOccurrenceFlag parameter for the
SourcePaths option. This frees applications from always having to pass at least
one source file, e.g., -list-checks.

http://reviews.llvm.org/D12069

Patch by Don Hinton!

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

8 years ago[modules] When explicitly building a module file, don't include timestamps in
Richard Smith [Mon, 17 Aug 2015 07:13:32 +0000 (07:13 +0000)]
[modules] When explicitly building a module file, don't include timestamps in
the produced pcm file for stable file creation across distributed build
systems.

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

8 years agoEnable passing test on Windows + MSYS.
Yaron Keren [Sun, 16 Aug 2015 19:02:49 +0000 (19:02 +0000)]
Enable passing test on Windows + MSYS.

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

8 years ago[Sema] Be consistent about diagnostic wording: always use "cannot".
Davide Italiano [Sat, 15 Aug 2015 15:23:14 +0000 (15:23 +0000)]
[Sema] Be consistent about diagnostic wording: always use "cannot".

Discussed with Richard Smith.

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

8 years agoTiny cleanup: move some Triple variables up to the top of the
James Y Knight [Sat, 15 Aug 2015 03:45:25 +0000 (03:45 +0000)]
Tiny cleanup: move some Triple variables up to the top of the
function, and remove a duplicate var.

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

8 years ago[MS ABI] Switch catchpad/cleanuppad to use tokens
David Majnemer [Sat, 15 Aug 2015 03:21:08 +0000 (03:21 +0000)]
[MS ABI] Switch catchpad/cleanuppad to use tokens

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

9 years agoclangStaticAnalyzerCheckers: Update libdesp.
NAKAMURA Takumi [Sat, 15 Aug 2015 01:56:49 +0000 (01:56 +0000)]
clangStaticAnalyzerCheckers: Update libdesp.

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

9 years agoDelay emitting members of dllexport classes until the class is fully parsed (PR23542)
Hans Wennborg [Sat, 15 Aug 2015 01:18:16 +0000 (01:18 +0000)]
Delay emitting members of dllexport classes until the class is fully parsed (PR23542)

This enables Clang to correctly handle code such as:

  struct __declspec(dllexport) S {
    int x = 42;
  };

where it would otherwise error due to trying to generate the default
constructor before the in-class initializer for x has been parsed.

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

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

9 years ago[modules] Stop dropping 'module.timestamp' files into the current directory
Richard Smith [Sat, 15 Aug 2015 00:34:15 +0000 (00:34 +0000)]
[modules] Stop dropping 'module.timestamp' files into the current directory
when building with implicit modules disabled.

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

9 years agoclarified test comment
Naomi Musgrave [Fri, 14 Aug 2015 23:22:03 +0000 (23:22 +0000)]
clarified test comment

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

9 years ago[CONCEPTS] Add diagnostic; invalid tag when concept specified
Nathan Wilson [Fri, 14 Aug 2015 23:19:32 +0000 (23:19 +0000)]
[CONCEPTS] Add diagnostic; invalid tag when concept specified

Summary: Adding check to emit diagnostic for invalid tag when concept is specified and associated tests.

Reviewers: rsmith, hubert.reinterpretcast, fraggamuffin, faisalv, aaron.ballman

Subscribers: aaron.ballman, cfe-commits

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

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

9 years ago[analyzer] Add checkers for OS X / iOS localizability issues
Anna Zaks [Fri, 14 Aug 2015 20:22:22 +0000 (20:22 +0000)]
[analyzer] Add checkers for OS X / iOS localizability issues

Add checkers that detect code-level localizability issues for OS X / iOS:
  - A path sensitive checker that warns about uses of non-localized
    NSStrings passed to UI methods expecting localized strings.
  - A syntax checker that warns against not including a comment in
    NSLocalizedString macros.

A patch by Kulpreet Chilana!

(This is the second attempt with the compilation issue on Windows and
the random test failures resolved.)

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

9 years agoWindowsX86: long double is x87DoubleExtended on mingw
Martell Malone [Fri, 14 Aug 2015 19:05:56 +0000 (19:05 +0000)]
WindowsX86: long double is x87DoubleExtended on mingw

    Summary:
    long double on x86 mingw is 80bits and is aligned to 16bytes

Fixes:
    https://llvm.org/bugs/show_bug.cgi?id=24398

    Reviewers: rnk

    Subscribers: cfe-commits

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

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

9 years agoDon't run explicit-modules-missing-files.cpp on Windows
Reid Kleckner [Fri, 14 Aug 2015 19:03:02 +0000 (19:03 +0000)]
Don't run explicit-modules-missing-files.cpp on Windows

It is flaky due to inability to remove files with open handles.  We
could paper over it with rm -f, but then the file would still be
present.

This is more evidence to me that we should roll our own 'rm'
implementation in LLVM.

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

9 years agoWindows ARM: ignore calling conventions as described on MSDN
Martell Malone [Fri, 14 Aug 2015 18:00:09 +0000 (18:00 +0000)]
Windows ARM: ignore calling conventions as described on MSDN

Summary:
MSDN says that fastcall, stdcall, thiscall, and vectorcall are all
accepted but ignored on ARM and X64.
https://msdn.microsoft.com/en-us/library/984x0h58.aspx

MSDN also says cdecl is also accepted and typically ignored
This patch brings ARM in line with how we ignore them for X64

Reviewers: rnk

Subscribers: compnerd, cfe-commits

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

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

9 years agoRepresent 2 parallel string arrays as one string[][2] array.
Douglas Katzman [Fri, 14 Aug 2015 15:52:12 +0000 (15:52 +0000)]
Represent 2 parallel string arrays as one string[][2] array.

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

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

9 years ago[ASTContext] Call APValue destructors for MaterializedTemporaryValues
David Majnemer [Fri, 14 Aug 2015 14:43:50 +0000 (14:43 +0000)]
[ASTContext] Call APValue destructors for MaterializedTemporaryValues

Hopefully this makes the sanitizer build bot happy.

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

9 years ago[Sema] main can't be declared as global variable, in C++.
Davide Italiano [Fri, 14 Aug 2015 14:13:29 +0000 (14:13 +0000)]
[Sema] main can't be declared as global variable, in C++.

So, we now reject that. We also warn for any external-linkage global
variable named main in C, because it results in undefined behavior.

PR:   24309
Differential Revision: http://reviews.llvm.org/D11658
Reviewed by: rsmith

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

9 years agoclang-format: Don't remove space between #elif and parentheses.
Daniel Jasper [Fri, 14 Aug 2015 12:44:06 +0000 (12:44 +0000)]
clang-format: Don't remove space between #elif and parentheses.

Before:
  #elif(AAAA && BBBB)

After:
  #elif (AAAA && BBBB)

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

9 years ago[OPENMP] Fix for http://llvm.org/PR24371: Assert failure compiling blender 2.75.
Alexey Bataev [Fri, 14 Aug 2015 12:25:37 +0000 (12:25 +0000)]
[OPENMP] Fix for http://llvm.org/PR24371: Assert failure compiling blender 2.75.
blender uses statements expression in condition of the loop under control of the '#pragma omp parallel for'. This condition is used several times in different expressions required for codegen of the loop directive. If there are some variables defined in statement expression, it fires an assert during codegen because of redefinition of the same variables.
We have to rebuild several expression to be sure that all variables are unique.

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

9 years agoFix AST matcher documentation.
Manuel Klimek [Fri, 14 Aug 2015 11:47:51 +0000 (11:47 +0000)]
Fix AST matcher documentation.

Fix a bug in the matcher docs where callExpr(on(...)) was in the examples,
but didn't work (on() only works for memberCallExpr).

Fix a bug in the doc dump script that was introduced in r231575 when
removing a regexp capture without adapting the code that uses the
captures.

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

9 years agoAdd structed way to express command line options in the compilation database.
Manuel Klimek [Fri, 14 Aug 2015 09:55:36 +0000 (09:55 +0000)]
Add structed way to express command line options in the compilation database.

Currently, arguments are passed via the string attribute 'command',
assuming a shell-escaped / quoted command line to extract the original
arguments. This works well enough on Unix systems, but turns out to be
problematic for Windows tools to generate.

This CL adds a new attribute 'arguments', an array of strings, which
specifies the exact command line arguments. If 'arguments' is available
in the compilation database, it is preferred to 'commands'.

Currently there is no plan to retire 'commands': there are enough
different use cases where users want to create their own mechanism for
creating compilation databases, that it doesn't make sense to force them
all to implement shell command line parsing.

Patch by Daniel Dilts.

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

9 years ago[modules] Add an experimental -cc1 feature to embed the contents of an input
Richard Smith [Fri, 14 Aug 2015 05:02:58 +0000 (05:02 +0000)]
[modules] Add an experimental -cc1 feature to embed the contents of an input
file in the .pcm files. This allows a smaller set of files to be sent to a
remote build worker when building with explicit modules (for instance, module
map files need not be sent along with the corresponding precompiled modules).

This doesn't actually make the embedded files visible to header search, so
it's not useful as a packaging format for public header files.

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

9 years agounique_ptrify ConsumedBlockInfo analysis to make it move assignable
David Blaikie [Fri, 14 Aug 2015 01:26:19 +0000 (01:26 +0000)]
unique_ptrify ConsumedBlockInfo analysis to make it move assignable

ConsumedBlockInfo objects were move assigned, but only in a state where
the dtor was a no-op anyway. Subtle and easily could've happened in ways
that wouldn't've been safe - so this change makes it safe no matter what
state the ConsumedBlockInfo object is in.

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

9 years agoThis test was still failing for me after r244925, fix it harder.
Richard Smith [Fri, 14 Aug 2015 00:16:05 +0000 (00:16 +0000)]
This test was still failing for me after r244925, fix it harder.

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

9 years agoWdeprecated: ByrefHelpers are copy constructed by the ::buildByrefHelpers helper...
David Blaikie [Thu, 13 Aug 2015 23:53:09 +0000 (23:53 +0000)]
Wdeprecated: ByrefHelpers are copy constructed by the ::buildByrefHelpers helper, make sure they're safely copyable

Make the copy/move ctors protected and defaulted in the base, make the
derived classes final to avoid exposing any slicing-prone APIs.

Also, while I'm here, simplify the use of buildByrefHelpers by taking
the parameter by value instead of non-const ref. None of the callers
care aobut observing the state after the call.

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

9 years agoAvoid iteration invalidation issues around MaterializedTemporaryExpr
David Majnemer [Thu, 13 Aug 2015 23:50:15 +0000 (23:50 +0000)]
Avoid iteration invalidation issues around MaterializedTemporaryExpr

We risk iterator invalidation issues if we use a DenseMap to hold the
backing storage for an APValue.  Instead, BumpPtrAllocate them and
use APValue * as our DenseMap value.

Also, don't assume that MaterializedGlobalTemporaryMap won't regrow
between when we initially perform a lookup and later on when we actually
try to insert into it.

This fixes PR24289.

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

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