]> granicus.if.org Git - clang/log
clang
8 years ago[OPENMP 4.5] Parsing/sema analysis for 'depend(source)' clause in 'ordered' directive.
Alexey Bataev [Fri, 18 Dec 2015 05:05:56 +0000 (05:05 +0000)]
[OPENMP 4.5] Parsing/sema analysis for 'depend(source)' clause in 'ordered' directive.
OpenMP 4.5 adds 'depend(source)' clause for 'ordered' directive to support cross-iteration dependence. Patch adds parsing and semantic analysis for this construct.

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

8 years agoObjC properties: consider ownership of properties from protocols when synthesizing.
Douglas Gregor [Fri, 18 Dec 2015 00:52:31 +0000 (00:52 +0000)]
ObjC properties: consider ownership of properties from protocols when synthesizing.

When determining whether ownership was explicitly written for a
property when it is being synthesized, also consider that the original
property might have come from a protocol. Fixes rdar://problem/23931441.

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

8 years agoAdd a test for r255875 & r255929, comparisons on DynTypeNode wrapped QualType.
Richard Trieu [Thu, 17 Dec 2015 23:20:57 +0000 (23:20 +0000)]
Add a test for r255875 & r255929, comparisons on DynTypeNode wrapped QualType.

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

8 years ago[CUDA] runtime wrapper header tweaks
Artem Belevich [Thu, 17 Dec 2015 22:25:22 +0000 (22:25 +0000)]
[CUDA] runtime wrapper header tweaks

* Pull in host-only implementations of few CUDA-specific math functions.
* #nclude <cmath> early to prevent its inclusion from CUDA headers after
  they've messed with __THROW macro.

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

8 years agoFix r255875, use '<' instead of '==' for 'operator<'
Richard Trieu [Thu, 17 Dec 2015 21:56:22 +0000 (21:56 +0000)]
Fix r255875, use '<' instead of '==' for 'operator<'

Aaron Ballman pointed out a typo from the copy and paste in r255875.  This will
preserve the strict weak ordering when comparing DynTypedNode.

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

8 years agoAttach maximum function count to Module when using PGO mode.
Easwaran Raman [Thu, 17 Dec 2015 19:14:27 +0000 (19:14 +0000)]
Attach maximum function count to Module when using PGO mode.

This sets the maximum entry count among all functions in the program to the module using module flags. This allows the optimizer to use this information.

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

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

8 years ago[x86] Filecheck is case sensitive. Capitalize directives.
Chad Rosier [Thu, 17 Dec 2015 19:01:55 +0000 (19:01 +0000)]
[x86] Filecheck is case sensitive.  Capitalize directives.

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

8 years ago[x86] Filecheck is case sensitive. Capitalize directives.
Chad Rosier [Thu, 17 Dec 2015 18:54:42 +0000 (18:54 +0000)]
[x86] Filecheck is case sensitive.  Capitalize directives.

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

8 years ago[CUDA] Make vtable construction aware of host/device side of CUDA compilation.
Artem Belevich [Thu, 17 Dec 2015 18:12:36 +0000 (18:12 +0000)]
[CUDA] Make vtable construction aware of host/device side of CUDA compilation.

C++ emits vtables for classes that have key function present in the
current TU. While we compile CUDA the fact that key function was found
in this TU does not mean that we are going to generate code for it. E.g.
vtable for a class with host-only methods should not (and can not) be
generated on device side, because we'll never generate code for them
during device-side compilation.

This patch adds an extra CUDA-specific check during key method computation
and filters out potential key methods that are not suitable for this side
of CUDA compilation.

When we codegen vtable, entries for unsuitable methods are set to null.

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

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

8 years ago[ms-inline-asm] Add support for composite structs in MS inline asm
Marina Yatsina [Thu, 17 Dec 2015 12:51:51 +0000 (12:51 +0000)]
[ms-inline-asm] Add support for composite structs in MS inline asm

Add MS inline asm support for structs that contain fields that are also structs.

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

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

8 years ago[OPENMP] Fix for http://llvm.org/PR25142: openmp: Assertion failed: DD && "queried...
Alexey Bataev [Thu, 17 Dec 2015 06:55:08 +0000 (06:55 +0000)]
[OPENMP] Fix for http://llvm.org/PR25142: openmp: Assertion failed: DD && "queried property of class with no definition", file AST/DeclCXX.h
Added processing for template specialization during data-sharing attributes analysis

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

8 years agoAdd QualType case to operator< for DynTypedNode.
Richard Trieu [Thu, 17 Dec 2015 04:46:48 +0000 (04:46 +0000)]
Add QualType case to operator< for DynTypedNode.

This allows sorting DynTypedNode's which are QualType's since QualType does
not have memoization.

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

8 years ago[TLS on Darwin] use CXX_FAST_TLS calling convention for access functions.
Manman Ren [Thu, 17 Dec 2015 00:42:36 +0000 (00:42 +0000)]
[TLS on Darwin] use CXX_FAST_TLS calling convention for access functions.

Also set nounwind attribute.

rdar://problem/9001553

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

8 years ago[analyzer] Better detect when C++ object was constructed into existing region.
Devin Coughlin [Thu, 17 Dec 2015 00:28:33 +0000 (00:28 +0000)]
[analyzer] Better detect when C++ object was constructed into existing region.

When the analyzer evaluates a CXXConstructExpr, it looks ahead in the CFG for
the current block to detect what region the object should be constructed into.
If the constructor was directly constructed into a local variable or field
region then there is no need to explicitly bind the constructed value to
the local or field when analyzing the DeclStmt or CXXCtorInitializer that
called the constructor.

Unfortunately, there were situations in which the CXXConstructExpr was
constructed into a temporary region but when evaluating the corresponding
DeclStmt or CXXCtorInitializer the analyzer assumed the object was constructed
into the local or field. This led to spurious warnings about uninitialized
values (PR25777).

To avoid these false positives, this commit factors out the logic for
determining when a CXXConstructExpr will be directly constructed into existing
storage, adds the inverse logic to detect when the corresponding later bind can
be safely skipped, and adds assertions to make sure these two checks are in
sync.

rdar://problem/21947725

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

8 years ago[WebAssembly] Initial linking support.
Dan Gohman [Wed, 16 Dec 2015 23:30:41 +0000 (23:30 +0000)]
[WebAssembly] Initial linking support.

This begins minimal support for invoking 'ld' from clang for WebAssembly
targets.

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

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

8 years agoUpdate for llvm api change.
Rafael Espindola [Wed, 16 Dec 2015 23:16:37 +0000 (23:16 +0000)]
Update for llvm api change.

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

8 years agoFix funciton->function typo.
Eric Christopher [Wed, 16 Dec 2015 23:10:46 +0000 (23:10 +0000)]
Fix funciton->function typo.

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

8 years agoUpdate for llvm API change.
Rafael Espindola [Wed, 16 Dec 2015 22:59:09 +0000 (22:59 +0000)]
Update for llvm API change.

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

8 years agoFix CFI tests in sanitizer-ld.
Evgeniy Stepanov [Wed, 16 Dec 2015 22:03:39 +0000 (22:03 +0000)]
Fix CFI tests in sanitizer-ld.

This test is not testing what it is supposed to test because of a
mixup with the CHECK lines.

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

8 years ago[PS4] Fix the unit test to be compatible with clang driver. NFC
Sumanth Gundapaneni [Wed, 16 Dec 2015 20:18:12 +0000 (20:18 +0000)]
[PS4] Fix the unit test to be compatible with clang driver. NFC

".exe" extension is inherently checked by llvm::fs::can_execute()
This patch fixes the linker extension in clang driver and updates the
unit test to accommodate the the check string on windows.

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

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

8 years ago[CMake] Name the bootstrap stages stage[0-9]
Chris Bieneman [Wed, 16 Dec 2015 20:17:07 +0000 (20:17 +0000)]
[CMake] Name the bootstrap stages stage[0-9]

When you start chaining bootstrap stages the CMake-generated targets get unwieldy. This change supports naming the bootstrap targets and creating wrapper targets in the top-level build file.

Without this patch the default target generated for a second stage build was "bootstrap" with it the target is "stage2".

Also with some CMake goop setting CLANG_BOOTSTRAP_TARGETS, you can expose third stage targets as "stage3" instead of "bootstrap-bootstrap"

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

8 years agoLet -Wdelete-non-virtual-dtor mention final.
Nico Weber [Wed, 16 Dec 2015 20:07:24 +0000 (20:07 +0000)]
Let -Wdelete-non-virtual-dtor mention final.

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

8 years agoAdd -fsyntax-only to fix failure in read-only directories.
Diego Novillo [Wed, 16 Dec 2015 19:52:05 +0000 (19:52 +0000)]
Add -fsyntax-only to fix failure in read-only directories.

Internally, this test is executed in a read-only directory, which causes
it to fail because the driver tries to generate a file unnecessarily.
Adding -fsyntax-only fixes the issue (thanks to Artem Belevich for
figuring out the root cause).

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

8 years agoFix the failing windows clang unit tests. NFC
Sumanth Gundapaneni [Wed, 16 Dec 2015 19:09:51 +0000 (19:09 +0000)]
Fix the failing windows clang unit tests. NFC

Some tests are missing the {{(.exe)?}} suffix on the exectables
which the FileCheck is grepping for. This will ensure, the lit tests
are clean on windows

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

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

8 years ago[CUDA] renamed cuda_runtime.h wrapper to __cuda_runtime.h
Artem Belevich [Wed, 16 Dec 2015 18:51:59 +0000 (18:51 +0000)]
[CUDA] renamed cuda_runtime.h wrapper to __cuda_runtime.h

Currently it's easy to break CUDA compilation by passing
"-isystem /path/to/cuda/include" to compiler which leads to
compiler including real cuda_runtime.h from there instead
of the wrapper we need.

Renaming the wrapper ensures that we can include the wrapper
regardless of user-specified include paths and files.

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

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

8 years ago[CMake] If you're building compiler-rt, the bootstrap build should depend on it.
Chris Bieneman [Wed, 16 Dec 2015 18:49:12 +0000 (18:49 +0000)]
[CMake] If you're building compiler-rt, the bootstrap build should depend on it.

Adding optional dependency for the bootstrap targets on compiler-rt.

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

8 years ago[CMake] Make CLANG_BOOTSTRAP_TARGETS overridable
Chris Bieneman [Wed, 16 Dec 2015 18:45:53 +0000 (18:45 +0000)]
[CMake] Make CLANG_BOOTSTRAP_TARGETS overridable

This allows exposing a custom list of targets from the next stage build up.

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

8 years ago[CMake] ExternalProject for compiler-rt needs to depend on llvm-config and clang
Chris Bieneman [Wed, 16 Dec 2015 18:42:14 +0000 (18:42 +0000)]
[CMake] ExternalProject for compiler-rt needs to depend on llvm-config and clang

The add_dependencies call on compiler-rt-configure adds llvm-config and clang to the phony target, but not to the actual configure custom command. We need the dependency bound to the custom command so that it can't be re-ordered by Ninja.

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

8 years ago[PS4][Profile] add "--dependent-lib=libclang_rt.profile-x86_64.a" to
Paul Robinson [Wed, 16 Dec 2015 17:25:27 +0000 (17:25 +0000)]
[PS4][Profile] add "--dependent-lib=libclang_rt.profile-x86_64.a" to
the CC1 command line when enabling code coverage.

Patch by Ying Yi!

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

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

8 years agoMake matchers thread compatible, so we can pass them to different threads and run...
Manuel Klimek [Wed, 16 Dec 2015 15:48:58 +0000 (15:48 +0000)]
Make matchers thread compatible, so we can pass them to different threads and run them on multiple translation units in parallel.

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

8 years ago[x86] Exclusion of incorrect include headers paths for MCU target
Andrey Bokhanko [Wed, 16 Dec 2015 13:27:38 +0000 (13:27 +0000)]
[x86] Exclusion of incorrect include headers paths for MCU target

Exclusion of /usr/include and /usr/local/include headers paths for MCU target.

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

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

8 years agoclang-format: Extend header sort category implementation.
Daniel Jasper [Wed, 16 Dec 2015 10:10:16 +0000 (10:10 +0000)]
clang-format: Extend header sort category implementation.

Specifically, it is sometimes necessary to keep certain #includes as
the first #include, even before the main #include for a .cc file.
Switching the category to be signed instead of unsigned isn't ideal,
but it seems as good of an option as any and is fully backwards
compatible.

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

8 years ago[Objective-c] Fix a crash that occurs when ObjCTypeParamList::back() is
Akira Hatanaka [Wed, 16 Dec 2015 06:25:38 +0000 (06:25 +0000)]
[Objective-c] Fix a crash that occurs when ObjCTypeParamList::back() is
called on an empty list.

This commit makes Parser::parseObjCTypeParamListOrProtocolRefs return
nullptr if it sees an invalid type parameter (e.g., __kindof) in the
type parameter list.

rdar://problem/23068920

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

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

8 years ago[CodeGen] Use llvm::CmpInst::Predicate instead of unsigned for parameter types in...
Craig Topper [Wed, 16 Dec 2015 06:24:28 +0000 (06:24 +0000)]
[CodeGen] Use llvm::CmpInst::Predicate instead of unsigned for parameter types in EmitCompare to eliminate some later explicit casts. NFC.

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

8 years agoPrint qualified display names when emitting CodeView
Reid Kleckner [Wed, 16 Dec 2015 02:04:40 +0000 (02:04 +0000)]
Print qualified display names when emitting CodeView

This is what debuggers expect.  Words towards fixing PR21528.

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

8 years ago[CMake] Add support for generating profdata for clang from training files
Chris Bieneman [Wed, 16 Dec 2015 01:02:44 +0000 (01:02 +0000)]
[CMake] Add support for generating profdata for clang from training files

Summary:
This patch adds support for using LIT to drive generating PGO profile data for clang.

This first pass implementation should work on Linux and Unix based platforms. If you build clang using CMake with LLVM_BUILD_INSTRUMENTED=On the CMake build generates a generate-profdata target that will use the just-built clang to build any test files (see hello_world.cpp as an example). Each test compile will generate profraw files for each clang process. After all tests have run CMake will merge the profraw files using llvm-profdata.

Future opportunities for extension:
* Support for Build->Profile->Build bootstrapping
* Support for linker order file generation using a similar mechanism and the same training data
* Support for Windows

Reviewers: dexonsmith, friss, bogner, cmatthews, vsk, silvas

Subscribers: cfe-commits

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

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

8 years ago[cfi] Exclude ubsan runtime library from non-diag CFI builds (driver changes).
Evgeniy Stepanov [Wed, 16 Dec 2015 00:38:42 +0000 (00:38 +0000)]
[cfi] Exclude ubsan runtime library from non-diag CFI builds (driver changes).

Split the CFI runtime in two: cfi and cfi_diag. The latter includes
UBSan runtime to allow printing diagnostics.

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

8 years agoReland "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit"
Reid Kleckner [Wed, 16 Dec 2015 00:26:37 +0000 (00:26 +0000)]
Reland "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit"

I forgot to initialize RecoverFP.

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

8 years agoRevert "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit"
Reid Kleckner [Wed, 16 Dec 2015 00:20:21 +0000 (00:20 +0000)]
Revert "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit"

This reverts commit r255710.

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

8 years agoFix grammar.
Richard Smith [Wed, 16 Dec 2015 00:19:23 +0000 (00:19 +0000)]
Fix grammar.

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

8 years agoUpdate our claims about GCC's diagnostics quality to reflect recent improvements...
Richard Smith [Wed, 16 Dec 2015 00:18:47 +0000 (00:18 +0000)]
Update our claims about GCC's diagnostics quality to reflect recent improvements to GCC.

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

8 years agoThese days, GCC has at least minimal documentation for its VLAIS extension.
Richard Smith [Wed, 16 Dec 2015 00:09:57 +0000 (00:09 +0000)]
These days, GCC has at least minimal documentation for its VLAIS extension.

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

8 years agoRelax checks in cfi-cross-dso test.
Evgeniy Stepanov [Tue, 15 Dec 2015 23:49:51 +0000 (23:49 +0000)]
Relax checks in cfi-cross-dso test.

The test is failing with unnamed labels.

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

8 years ago[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit
Reid Kleckner [Tue, 15 Dec 2015 23:47:40 +0000 (23:47 +0000)]
[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit

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

8 years agoCross-DSO control flow integrity (Clang part).
Evgeniy Stepanov [Tue, 15 Dec 2015 23:00:20 +0000 (23:00 +0000)]
Cross-DSO control flow integrity (Clang part).

Clang-side cross-DSO CFI.

* Adds a command line flag -f[no-]sanitize-cfi-cross-dso.
* Links a runtime library when enabled.
* Emits __cfi_slowpath calls is bitset test fails.
* Emits extra hash-based bitsets for external CFI checks.
* Sets a module flag to enable __cfi_check generation during LTO.

This mode does not yet support diagnostics.

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

8 years agoclang/test/CodeGen/ms_this.cpp: Fix for -Asserts.
NAKAMURA Takumi [Tue, 15 Dec 2015 22:42:28 +0000 (22:42 +0000)]
clang/test/CodeGen/ms_this.cpp: Fix for -Asserts.

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

8 years agoFix clang/test/CodeGen/ms_this.cpp.
NAKAMURA Takumi [Tue, 15 Dec 2015 22:19:00 +0000 (22:19 +0000)]
Fix clang/test/CodeGen/ms_this.cpp.

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

8 years ago[WinEH] Update clang to use operand bundles on call sites
David Majnemer [Tue, 15 Dec 2015 21:27:59 +0000 (21:27 +0000)]
[WinEH] Update clang to use operand bundles on call sites

This updates clang to use bundle operands to associate an invoke with
the funclet which it is contained within.

Depends on D15517.

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

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

8 years agoUnsupport test that should not be run on Hexagon
Krzysztof Parzyszek [Tue, 15 Dec 2015 19:14:24 +0000 (19:14 +0000)]
Unsupport test that should not be run on Hexagon

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

8 years agoclang-cl: Add an alias for /wd4100
Nico Weber [Tue, 15 Dec 2015 17:07:16 +0000 (17:07 +0000)]
clang-cl: Add an alias for /wd4100

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

8 years ago[Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asm
Michael Zuckerman [Tue, 15 Dec 2015 14:35:51 +0000 (14:35 +0000)]
[Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asm

add triple to test

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

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

8 years ago[Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asm
Michael Zuckerman [Tue, 15 Dec 2015 14:04:18 +0000 (14:04 +0000)]
[Microsoft][C++] Clang doesn't support a use of "this" pointer inside inline asm

Clang doesn’t support a use of “this” pointer inside inline asm.
When I tried to compile a class or a struct (see example) with an inline asm that contains "this" pointer.
Clang returns with an error.
This patch fixes that.

error: expected unqualified-id
For example:
'''
struct A {
    void f() {
          __asm mov eax, this
              // error: expected unqualified-id
                  }
};
'''
Differential Revision: http://reviews.llvm.org/D15115

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

8 years ago[OPENMP 4.5] Fix test compatibility with 32 bit mode.
Alexey Bataev [Tue, 15 Dec 2015 11:38:29 +0000 (11:38 +0000)]
[OPENMP 4.5] Fix test compatibility with 32 bit mode.

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

8 years ago[OPENMP 4.5] Codegen for 'hint' clause of 'critical' directive
Alexey Bataev [Tue, 15 Dec 2015 10:55:09 +0000 (10:55 +0000)]
[OPENMP 4.5] Codegen for 'hint' clause of 'critical' directive
OpenMP 4.5 defines 'hint' clause for 'critical' directive. Patch adds codegen for this clause.

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

8 years agoclang/test/Analysis/padding_c.c: Suppress a test incompatible to i686-linux.
NAKAMURA Takumi [Tue, 15 Dec 2015 09:37:01 +0000 (09:37 +0000)]
clang/test/Analysis/padding_c.c: Suppress a test incompatible to i686-linux.

  error: 'warning' diagnostics expected but not seen:
    File clang/test/Analysis/padding_c.c Line 194 (directive at clang/test/Analysis/padding_c.c:193): Excessive padding in 'struct DefaultAttrAlign'
  1 error generated.

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

8 years ago[libclang] Add a flag to create the precompiled preamble on the first parse.
Benjamin Kramer [Tue, 15 Dec 2015 09:30:31 +0000 (09:30 +0000)]
[libclang] Add a flag to create the precompiled preamble on the first parse.

Summary:
The current default is to create the preamble on the first reparse, aka
second parse. This is useful for clients that do not want to block when
opening a file because serializing the preamble takes a bit of time.
However, this makes the reparse much more expensive and that may be on the
critical path as it's the first interaction a user has with the source code.

YouCompleteMe currently optimizes for the first code interaction by parsing
the file twice when loaded. That's just unnecessarily slow and this flag
helps to avoid that.

Reviewers: doug.gregor, klimek

Subscribers: cfe-commits

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

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

8 years agoAdd a new matcher to match character types.
Gabor Horvath [Tue, 15 Dec 2015 08:35:45 +0000 (08:35 +0000)]
Add a new matcher to match character types.

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

8 years ago[OPENMP 4.5] Parsing/sema for 'hint' clause of 'critical' directive.
Alexey Bataev [Tue, 15 Dec 2015 08:19:24 +0000 (08:19 +0000)]
[OPENMP 4.5] Parsing/sema for 'hint' clause of 'critical' directive.
OpenMP 4.5 adds 'hint' clause to critical directive. Patch adds parsing/semantic analysis for this clause.

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

8 years ago[PGO] make profile prefix even shorter and more readable
Xinliang David Li [Tue, 15 Dec 2015 00:33:12 +0000 (00:33 +0000)]
[PGO] make profile prefix even shorter and more readable

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

8 years ago[PGO] Shorten profile symbol prefixes
Xinliang David Li [Mon, 14 Dec 2015 23:26:46 +0000 (23:26 +0000)]
[PGO] Shorten profile symbol prefixes

(test case update)
Profile symbols have long prefixes which waste space and creating pressure for linker.
This patch shortens the prefixes to minimal length without losing verbosity.

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

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

8 years agoUpdate for llvm api change.
Rafael Espindola [Mon, 14 Dec 2015 23:17:07 +0000 (23:17 +0000)]
Update for llvm api change.

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

8 years ago[Sema] Make nullness warnings appear in C++.
George Burgess IV [Mon, 14 Dec 2015 22:00:49 +0000 (22:00 +0000)]
[Sema] Make nullness warnings appear in C++.

Given the following code:

    int *_Nullable ptr;
    int *_Nonnull nn = ptr;

...In C, clang will warn you about `nn = ptr`, because you're assigning
a nonnull pointer to a nullable pointer. In C++, clang issues no such
warning. This patch helps ensure that clang doesn't ever miss an
opportunity to complain about C++ code.

N.B. Though this patch has a differential revision link, the actual
review took place over email.

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

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

8 years agoReordering fields to reduce padding in Clang. NFC
Ben Craig [Mon, 14 Dec 2015 21:54:11 +0000 (21:54 +0000)]
Reordering fields to reduce padding in Clang.  NFC

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

8 years ago[PATCH] Adding checker to detect excess padding in records
Ben Craig [Mon, 14 Dec 2015 21:38:59 +0000 (21:38 +0000)]
[PATCH] Adding checker to detect excess padding in records

The intent of this checker is to generate a report for any class / structure
that could reduce its padding by reordering the fields.  This results in a very
noisy checker.  To reduce the noise, this checker will currently only warn when
the number of bytes over "optimal" is more than 24.  This value is configurable
with -analyzer-config performance.Padding:AllowedPad=N.  Small values of
AllowedPad have the potential to generate hundreds of reports, and gigabytes
of HTML reports.

The checker searches for padding violations in two main ways.  First, it goes
record by record.  A report is generated if the fields could be reordered in a
way that reduces the padding by more than AllowedPad bytes.  Second, the
checker will generate a report if an array will cause more than AllowedPad
padding bytes to be generated.

The record checker currently skips many ABI specific cases.  Classes with base
classes are skipped because base class tail padding is ABI specific.  Bitfields
are just plain hard, and duplicating that code seems like a bad idea.  VLAs are
both uncommon and non-trivial to fix.

The array checker isn't very thorough right now.  It only checks to see if the
element type's fields could be reordered, and it doesn't recursively check to
see if any of the fields' fields could be reordered.  At some point in the
future, it would be nice if "arrays" could also look at array new usages and
malloc patterns that appear to be creating arrays.

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

8 years ago[PowerPC] Fix test/CodeGen/ppc-sfvarargs
Petar Jovanovic [Mon, 14 Dec 2015 20:30:02 +0000 (20:30 +0000)]
[PowerPC] Fix test/CodeGen/ppc-sfvarargs

The issue seems to be that .ll file may either use number of register
value or alias %numUsedRegs, so the check needs to cover both cases.

This will hopefully fix the last regression introduced by r255515.

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

8 years ago[PowerPC] Fix make-check issues
Petar Jovanovic [Mon, 14 Dec 2015 19:22:35 +0000 (19:22 +0000)]
[PowerPC] Fix make-check issues

Previous change r255515 introduced a couple of issues likely caused by
a different configure setup.

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

8 years agoAllow pseudo-destructor calls on forward-declared Objective-C class pointers.
John McCall [Mon, 14 Dec 2015 19:12:54 +0000 (19:12 +0000)]
Allow pseudo-destructor calls on forward-declared Objective-C class pointers.

rdar://18522255

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

8 years agoclang-cl: make /Wall turn on both -Wall and -Wextra (PR25563)
Hans Wennborg [Mon, 14 Dec 2015 18:46:11 +0000 (18:46 +0000)]
clang-cl: make /Wall turn on both -Wall and -Wextra (PR25563)

The documentation suggests /Wall should really turn on -Wextra and any
other warnings that are not enabled by default. That would correspond
to Clang's -Weverything, but is probably not what users want.

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

8 years ago[MS ABI] Don't rely on terminatepad
David Majnemer [Mon, 14 Dec 2015 18:34:18 +0000 (18:34 +0000)]
[MS ABI] Don't rely on terminatepad

We'd like to remove support for terminatepad from LLVM.  To do this, we
need to move Clang off of it first.  The intent behind terminatepad was
to carefully model exception specifications for the MSVC personality.

However, we don't support exception specifications for the MSVC
personality and neither does MSVC.  Instead, MSVC supports
all-or-nothing exception specifications.  We can model this limited
usage using cleanuppads which call std::terminate.

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

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

8 years ago[Power PC] add soft float support for ppc32
Petar Jovanovic [Mon, 14 Dec 2015 17:51:50 +0000 (17:51 +0000)]
[Power PC] add soft float support for ppc32

This patch enables soft float support for ppc32 architecture and fixes
the ABI for variadic functions. This is the first in a set of patches
for soft float support in LLVM.

Patch by Strahinja Petrovic.

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

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

8 years ago[Hexagon] Xfail two tests that fail due to over-aligning arrays
Krzysztof Parzyszek [Mon, 14 Dec 2015 17:17:20 +0000 (17:17 +0000)]
[Hexagon] Xfail two tests that fail due to over-aligning arrays

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

8 years ago[Hexagon] Update default paths and arguments
Krzysztof Parzyszek [Mon, 14 Dec 2015 15:03:57 +0000 (15:03 +0000)]
[Hexagon] Update default paths and arguments

- Removed support for hexagonv3 and earlier.
- Added handling of hexagonv55 and hexagonv60.
- Added handling of target features (hvx, hvx-double).
- Updated paths to reflect current directory layout.

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

8 years agoAdd parse and sema of OpenMP distribute directive with all clauses except dist_schedule
Carlo Bertolli [Mon, 14 Dec 2015 14:51:25 +0000 (14:51 +0000)]
Add parse and sema of OpenMP distribute directive with all clauses except dist_schedule

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

8 years ago[OPENMP] Fix debug info for 'atomic' construct.
Alexey Bataev [Mon, 14 Dec 2015 09:26:19 +0000 (09:26 +0000)]
[OPENMP] Fix debug info for 'atomic' construct.
Debug info for statement under 'atomic' construct must point exactly to that statement, not the directive itself.

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

8 years agoclang-format: Add test for AlignAfterOpenBracket = AlwaysBreak in C++.
Daniel Jasper [Mon, 14 Dec 2015 08:41:18 +0000 (08:41 +0000)]
clang-format: Add test for AlignAfterOpenBracket = AlwaysBreak in C++.

Revision 251405 added AlwaysBreak to support Google's JavaScript style. This
changeset complete existing AlignsAfterOpenBracket tests to exercise
AlwaysBreak for C++.

I thought this would be worthwhile.  With this option we can support request
from http://lists.llvm.org/pipermail/cfe-dev/2015-May/042942.html, that had
been requested a few times. This also partially solve related Bug 23422 and is
probably sufficient for most people.

  AlignAfterOpenBracket = FormatStyle::BAS_AlwaysBreak;
  BinPackArguments = false;
  BinPackParameters = false;

With these setting we obtain this formatting:

  void fooWithAVeryLongParamList(
      int firstParameter,
      int secondParameter
      int lastParameter)
  {
      object.alsoThisDoenstFitSoIBreakImmidiatly(
          firstParameter,
          secondParameter,
          lastParameter);
  }

Patch by Jean-Philippe Dufraigne, thank you.

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

8 years agoclang-format: Extend Linux-brace-wrapping test.
Daniel Jasper [Mon, 14 Dec 2015 08:33:07 +0000 (08:33 +0000)]
clang-format: Extend Linux-brace-wrapping test.

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

8 years agoclang-format: Fix style default for WebKit and Linux styles.
Daniel Jasper [Mon, 14 Dec 2015 08:24:16 +0000 (08:24 +0000)]
clang-format: Fix style default for WebKit and Linux styles.

Brought up in codereviews:
http://reviews.llvm.org/D15445
http://reviews.llvm.org/D15485

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

8 years ago[Sema] Add -Wparentheses warnings for '^' in '|' expressions and '&' in '^' expressio...
Craig Topper [Sun, 13 Dec 2015 05:41:41 +0000 (05:41 +0000)]
[Sema] Add -Wparentheses warnings for '^' in '|' expressions and '&' in '^' expressions to compliment '&' in '|' that is already present. Matches gcc behavior.

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

8 years ago[Sema] Write some checks for groups of BinaryOperatorKinds in terms of the predicates...
Craig Topper [Sun, 13 Dec 2015 05:41:37 +0000 (05:41 +0000)]
[Sema] Write some checks for groups of BinaryOperatorKinds in terms of the predicates already available in BinaryOperator. NFC

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

8 years agoRevert r255445: adding a new test case
Xinliang David Li [Sun, 13 Dec 2015 04:45:49 +0000 (04:45 +0000)]
Revert r255445: adding a new test case

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

8 years agoResubmit new test case after adding more constraint
Xinliang David Li [Sun, 13 Dec 2015 03:03:35 +0000 (03:03 +0000)]
Resubmit new test case after adding more constraint

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

8 years agoRevert 255436 : remove test that needs to be refined
Xinliang David Li [Sat, 12 Dec 2015 18:49:37 +0000 (18:49 +0000)]
Revert 255436 : remove test that needs to be refined

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

8 years ago[PGO] add a test case with -no-integrated-as
Xinliang David Li [Sat, 12 Dec 2015 17:39:38 +0000 (17:39 +0000)]
[PGO] add a test case with -no-integrated-as

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

8 years ago[PGO] Stop using invalid char in instr variable names.
Xinliang David Li [Sat, 12 Dec 2015 17:28:37 +0000 (17:28 +0000)]
[PGO] Stop using invalid char in instr variable names.

(This is part-2 of the patch of r255434 --
fixing test cases, second try)

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

8 years agoMinor formatting cleanup. NFC
Craig Topper [Sat, 12 Dec 2015 06:30:51 +0000 (06:30 +0000)]
Minor formatting cleanup. NFC

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

8 years ago[Sema] Simplify a couple if statements. Explicitly check up front that only one of...
Craig Topper [Sat, 12 Dec 2015 06:30:48 +0000 (06:30 +0000)]
[Sema] Simplify a couple if statements. Explicitly check up front that only one of the expressions is a comparision op. Then if we find that either is a bitwise op, we know it must be the other one. NFC

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

8 years agoTry to appease a buildbot.
David Majnemer [Sat, 12 Dec 2015 05:50:32 +0000 (05:50 +0000)]
Try to appease a buildbot.

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

8 years agoUpdate clang to use the updated LLVM EH instructions
David Majnemer [Sat, 12 Dec 2015 05:39:21 +0000 (05:39 +0000)]
Update clang to use the updated LLVM EH instructions

Depends on D15139.

Reviewers: rnk

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

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

8 years agoPreserve source location information for qualified names used in a constructor
Richard Smith [Sat, 12 Dec 2015 02:17:54 +0000 (02:17 +0000)]
Preserve source location information for qualified names used in a constructor
initializer list to name a base class. Patch by Shahms King!

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

8 years agoRevert r254647.
Easwaran Raman [Sat, 12 Dec 2015 01:11:09 +0000 (01:11 +0000)]
Revert r254647.

Reason: The testcase fails in many architectures.

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

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

8 years agoAttach maximum function count to Module when using PGO mode
Easwaran Raman [Sat, 12 Dec 2015 00:31:02 +0000 (00:31 +0000)]
Attach maximum function count to Module when using PGO mode

This sets the maximum entry count among all functions in the program to the
module using module flags. This allows the optimizer to use this information.

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

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

8 years agodocs: Document -fno-sanitize-trap= and -fsanitize-recover= flags for CFI.
Peter Collingbourne [Fri, 11 Dec 2015 23:54:18 +0000 (23:54 +0000)]
docs: Document -fno-sanitize-trap= and -fsanitize-recover= flags for CFI.

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

8 years ago[modules] If the semantic and lexical DC of a decl are the same, write out the
Richard Smith [Fri, 11 Dec 2015 22:41:00 +0000 (22:41 +0000)]
[modules] If the semantic and lexical DC of a decl are the same, write out the
second one as 0 instead of writing the same bits to the module file twice.
This typically reduces PCM file size by about 1%.

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

8 years agoAllow non-defining declarations of class template partial specializations to
Richard Smith [Fri, 11 Dec 2015 22:39:52 +0000 (22:39 +0000)]
Allow non-defining declarations of class template partial specializations to
have a nested name specifier. Strictly speaking, forward declarations of class
template partial specializations are not permitted at all, but that seems like
an obvious wording defect, and if we allow them without a nested name specifier
we should also allow them with a nested name specifier.

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

8 years ago[clang-cl] Let /W4 map to -Wall -Wextra instead of just -Wall.
Nico Weber [Fri, 11 Dec 2015 22:31:16 +0000 (22:31 +0000)]
[clang-cl] Let /W4 map to -Wall -Wextra instead of just -Wall.

There's no way to make a flag alias to two flags, so add a /WCL4 flag that
maps to the All, Extra diag groups.  Fixes PR25563.

http://reviews.llvm.org/D15350

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

8 years agoReapply "[Modules] Fix regression when an elaborated-type-specifier mentions a hidden...
Ben Langmuir [Fri, 11 Dec 2015 22:05:13 +0000 (22:05 +0000)]
Reapply "[Modules] Fix regression when an elaborated-type-specifier mentions a hidden tag"

Now not trying to use a C++ lookup mechanism in C (d'oh).  Unqualified
lookup is actually fine for this case in C.

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

8 years agoUnify diagnostics for type defintitions in bad contexts
Reid Kleckner [Fri, 11 Dec 2015 21:39:12 +0000 (21:39 +0000)]
Unify diagnostics for type defintitions in bad contexts

The message for a type definition in an "if" condition was different
from the other three for no particular reason.

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

8 years agoError on redeclaring with a conflicting asm label and on redeclaring with an asm...
Nick Lewycky [Fri, 11 Dec 2015 21:28:55 +0000 (21:28 +0000)]
Error on redeclaring with a conflicting asm label and on redeclaring with an asm label after the first ODR-use. Detects problems like the one in PR22830 where gcc and clang both compiled the file but with different behaviour.

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

8 years ago[PGO] Revert r255366: solution incomplete, not handling lambda yet
Xinliang David Li [Fri, 11 Dec 2015 20:23:12 +0000 (20:23 +0000)]
[PGO] Revert r255366: solution incomplete, not handling lambda yet

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

8 years ago[PGO] Stop using invalid char in instr variable names.
Xinliang David Li [Fri, 11 Dec 2015 19:53:35 +0000 (19:53 +0000)]
[PGO] Stop using invalid char in instr variable names.

(This is part-2 of the patch -- fixing test cases)

Before the patch, -fprofile-instr-generate compile will fail
if no integrated-as is specified when the file contains
any static functions (the -S output is also invalid).

This patch fixed the issue. With the change, the index format
version will be bumped up by 1. Backward compatibility is
preserved with this change.

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

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