]> granicus.if.org Git - clang/log
clang
10 years agoPR18746: If a constexpr function has a dependent return type and no return
Richard Smith [Tue, 22 Apr 2014 23:14:23 +0000 (23:14 +0000)]
PR18746: If a constexpr function has a dependent return type and no return
statements, don't diagnose; the return type might end up being 'void'.

Patch by Rahul Jain! Tiny tweaks by me.

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

10 years agoDriver: Skip the -fmodules-cache-path argument in driver crash diags
Justin Bogner [Tue, 22 Apr 2014 21:30:17 +0000 (21:30 +0000)]
Driver: Skip the -fmodules-cache-path argument in driver crash diags

The modules cache path shouldn't be included in crash reports, as it's
a system (or run) specific directory.

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

10 years agoUse a manipulator to add a value to the current diagnostic flag.
Diego Novillo [Tue, 22 Apr 2014 19:56:49 +0000 (19:56 +0000)]
Use a manipulator to add a value to the current diagnostic flag.

Summary:
This addresses the feedback to
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140421/103598.html

Reviewers: rsmith

Subscribers: cfe-commits

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

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

10 years ago[Driver][ARM64] Add a testcase for r206227.
Quentin Colombet [Tue, 22 Apr 2014 18:29:43 +0000 (18:29 +0000)]
[Driver][ARM64] Add a testcase for r206227.

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

10 years agoObjective-C ARC. Under ARC, addition of 'bridge' attribute
Fariborz Jahanian [Tue, 22 Apr 2014 17:42:01 +0000 (17:42 +0000)]
Objective-C ARC. Under ARC, addition of 'bridge' attribute
on CF type is not sufficient and bridge casting is
still required for proper ownership semantics.
// rdar://16650445

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

10 years agoAttempt to fix null ASTContext in ASTUnit error path
Ben Langmuir [Tue, 22 Apr 2014 17:40:12 +0000 (17:40 +0000)]
Attempt to fix null ASTContext in ASTUnit error path

We don't need the ASTContext for the diagnostics, only the language
options, which we can get from the compiler invocation. It worries me
how many categorically different states the ASTUnit class can be in
depending on how it is being constructed/used.

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

10 years agoFix PR19487, PR19505 and PR19506 -- redundant vtordisp thunks when the final override...
Timur Iskhodzhanov [Tue, 22 Apr 2014 17:32:02 +0000 (17:32 +0000)]
Fix PR19487, PR19505 and PR19506 -- redundant vtordisp thunks when the final overrider is present in both a vbase and nvbase

Reviewed at http://reviews.llvm.org/D3449

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

10 years agoThread safety analysis: add array operations to SExpr.
DeLesley Hutchins [Tue, 22 Apr 2014 17:31:23 +0000 (17:31 +0000)]
Thread safety analysis: add array operations to SExpr.

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

10 years agoThread safety analysis: fix warning.
DeLesley Hutchins [Tue, 22 Apr 2014 14:51:04 +0000 (14:51 +0000)]
Thread safety analysis: fix warning.

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

10 years agoTry to fix warnings to escape '@' as '\@'. [-Wdocumentation-html]
NAKAMURA Takumi [Tue, 22 Apr 2014 13:28:08 +0000 (13:28 +0000)]
Try to fix warnings to escape '@' as '\@'. [-Wdocumentation-html]

  clang/include/clang/Format/Format.h:185:8: error: HTML tag 'tt' requires an end tag [-Werror,-Wdocumentation-html]
    /// <tt>@property (readonly)</tt> instead of <tt>@property(readonly)</tt>.
        ~^~~

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

10 years ago[OPENMP] parsing 'linear' clause (for directive 'omp simd')
Alexander Musman [Tue, 22 Apr 2014 13:09:42 +0000 (13:09 +0000)]
[OPENMP] parsing 'linear' clause (for directive 'omp simd')

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

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

10 years agoARM64: update NEON test to improved backend codegen
Tim Northover [Tue, 22 Apr 2014 12:45:55 +0000 (12:45 +0000)]
ARM64: update NEON test to improved backend codegen

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

10 years agoComment parsing: close a hole in CDATA escaping in XML output
Dmitri Gribenko [Tue, 22 Apr 2014 12:34:52 +0000 (12:34 +0000)]
Comment parsing: close a hole in CDATA escaping in XML output

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

10 years agoComment parsing: in the generated XML file, mark HTML that is safe to pass
Dmitri Gribenko [Tue, 22 Apr 2014 10:59:13 +0000 (10:59 +0000)]
Comment parsing: in the generated XML file, mark HTML that is safe to pass
through to the output even if the input comment comes from an untrusted source

Attribute filtering is currently based on a blacklist, which right now includes
all event handler attributes (they contain JavaScipt code).  It should be
switched to a whitelist, but going over all of the HTML5 spec requires a
significant amount of time.

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

10 years agoDiagnosticsEngine::Report(): Fix a warning. [-Wdocumentation]
NAKAMURA Takumi [Tue, 22 Apr 2014 08:32:01 +0000 (08:32 +0000)]
DiagnosticsEngine::Report(): Fix a warning. [-Wdocumentation]

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

10 years agoUpdate clang/test/PCH/single-token-macro.c corresponding to r206791.
NAKAMURA Takumi [Tue, 22 Apr 2014 08:16:58 +0000 (08:16 +0000)]
Update clang/test/PCH/single-token-macro.c corresponding to r206791.

__stdcall is defined as __attribute__((__stdcall__)) for targeting mingw32.

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

10 years ago[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
Chandler Carruth [Tue, 22 Apr 2014 03:17:02 +0000 (03:17 +0000)]
[Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all of the header #include lines, clang edition.

If you want more details about this, you can see some of the commits to
Debug.h in LLVM recently. This is just the clang section of a cleanup
I've done for all uses of DEBUG_TYPE in LLVM.

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

10 years agoMove the C++11 ExtWarn for converting a string literal to 'char*' out of
Richard Smith [Tue, 22 Apr 2014 01:11:06 +0000 (01:11 +0000)]
Move the C++11 ExtWarn for converting a string literal to 'char*' out of
-Wc++11-compat-deprecated-writable-strings. It's neither a C++11 compatibility
warning nor a deprecated feature, it's just ill-formed.

In passing, add that warning to -Wdeprecated, where it belongs.

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

10 years agoMove the warning of implicit cast of a floating point to an integer out of
Richard Trieu [Tue, 22 Apr 2014 01:01:05 +0000 (01:01 +0000)]
Move the warning of implicit cast of a floating point to an integer out of
-Wconversion and into it's own group, -Wfloating-point-conversion.

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

10 years agoThread safety analysis: misc updates to SExpr handling. Fix to minimal SSA,
DeLesley Hutchins [Mon, 21 Apr 2014 23:18:18 +0000 (23:18 +0000)]
Thread safety analysis:  misc updates to SExpr handling.  Fix to minimal SSA,
function parameters, and compound assignment.

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

10 years agoAllow adding a value to a flag in diagnostics.
Diego Novillo [Mon, 21 Apr 2014 23:16:03 +0000 (23:16 +0000)]
Allow adding a value to a flag in diagnostics.

Summary:
This allows callers of Diags.Report() to append a value to the name of
the flag associated with the diagnostic. This is useful in cases like
the -Rpass flag, where we want the diagnostic to show the name of the
pass that matched the pattern. Instead of showing "... [-Rpass]", this
allows us to show "... [-Rpass=passname]".

Reviewers: rsmith

CC: cfe-commits
Differential Revision: http://reviews.llvm.org/D3441

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

10 years ago[Modules] Update Clang's two files that use DEBUG(...) without defining
Chandler Carruth [Mon, 21 Apr 2014 22:55:36 +0000 (22:55 +0000)]
[Modules] Update Clang's two files that use DEBUG(...) without defining
DEBUG_TYPE to do so. LLVM's Debug.h requires this as of r206822.

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

10 years ago[Modules] Remove the only use of the DEBUG(...) macro in the compiler
Chandler Carruth [Mon, 21 Apr 2014 22:32:54 +0000 (22:32 +0000)]
[Modules] Remove the only use of the DEBUG(...) macro in the compiler
parts of Clang. I don't really have any opinion about whether using that
macro is good or bad, but its odd that this is the only one, and Eric
seemed happy with just nuking it for now.

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

10 years agoTry to fix bad Twine usage in r206791 with std::string
Reid Kleckner [Mon, 21 Apr 2014 22:29:45 +0000 (22:29 +0000)]
Try to fix bad Twine usage in r206791 with std::string

I'm pretty sure I was referencing destroyed temporaries here.  I'm open
to suggestions on how to write this better.

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

10 years agoMinGW: Define __stdcall&co when -fms-extensions is disabled
Reid Kleckner [Mon, 21 Apr 2014 20:58:00 +0000 (20:58 +0000)]
MinGW: Define __stdcall&co when -fms-extensions is disabled

This is for compatibility with GCC.

Reviewers: asl

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

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

10 years agoSplit out the rest of MS ABI multiple inheritance tests
Timur Iskhodzhanov [Mon, 21 Apr 2014 20:23:34 +0000 (20:23 +0000)]
Split out the rest of MS ABI multiple inheritance tests

Intentionally duplicate base class definitions per test, so it's easier to copy tests while debugging failures.

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

10 years agoObjective-C. Patch to allow use of dot syntax on class
Fariborz Jahanian [Mon, 21 Apr 2014 20:22:17 +0000 (20:22 +0000)]
Objective-C. Patch to allow use of dot syntax on class
objects to fund root class's instance methods.
// rdar://16650575

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

10 years agoAllow submodule inferrences with a missing umbrella when the module is unavailable
Ben Langmuir [Mon, 21 Apr 2014 19:49:57 +0000 (19:49 +0000)]
Allow submodule inferrences with a missing umbrella when the module is unavailable

If the module is unavailable because of a missing header, don't diagnose
a "module * {}" declaration for having a missing umbrella.

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

10 years agoHandle possible trailing '/' in xcode-select output. Patch by Jeff Olson.
Ted Kremenek [Mon, 21 Apr 2014 14:13:22 +0000 (14:13 +0000)]
Handle possible trailing '/' in xcode-select output.  Patch by Jeff Olson.

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

10 years agoInitialize clang::Module::IsMissingRequirement. Fix msan issue and hopefully some...
Richard Smith [Mon, 21 Apr 2014 07:28:16 +0000 (07:28 +0000)]
Initialize clang::Module::IsMissingRequirement. Fix msan issue and hopefully some builder failures.

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

10 years agoARM64: Do not expand variadic HFA/HVA arguments with the Darwin ABI.
Bob Wilson [Mon, 21 Apr 2014 01:23:39 +0000 (01:23 +0000)]
ARM64: Do not expand variadic HFA/HVA arguments with the Darwin ABI.

Unlike the standard AAPCS64 ABI, variadic arguments are always passed on the
stack with the Darwin ABI, and this was not being considered when deciding
whether to expand HFA/HVA arguments in a call. An HFA argument with a "float"
base type was being expanded into separate "float" arguments, each of which
was then extended to a double, resulting in a serious mismatch from what is
expected by the va_arg implementation. <rdar://problem/15777067>

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

10 years agoFix a comment typo.
Bob Wilson [Mon, 21 Apr 2014 01:23:36 +0000 (01:23 +0000)]
Fix a comment typo.

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

10 years agocindex.py: Avoid deprecated function
Alp Toker [Sun, 20 Apr 2014 01:07:03 +0000 (01:07 +0000)]
cindex.py: Avoid deprecated function

Implement Diagnostic::category_name() using clang_getDiagnosticCategoryText()
instead of the deprected clang_getDiagnosticCategoryName().

Preserves existing behaviour and API covered by existing tests.

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

10 years agoRemove some empty statements
Alp Toker [Sat, 19 Apr 2014 23:55:49 +0000 (23:55 +0000)]
Remove some empty statements

Cleanup only.

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

10 years agoFix and restore the macro-multiline.c test
Alp Toker [Sat, 19 Apr 2014 21:40:58 +0000 (21:40 +0000)]
Fix and restore the macro-multiline.c test

This test didn't work as intended and was ultimately disabled some years ago in
r169458.

Indeed it's not clear if the '\n' was ever passed through to the driver
correctly given that lit would insert '&& {' at the newline.

Test rewritten to use printf/xargs to insert '\n' in a more reliable manner and
to use FileCheck for verification.

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

10 years agoDisallow driver use in more Sema tests
Alp Toker [Sat, 19 Apr 2014 19:07:31 +0000 (19:07 +0000)]
Disallow driver use in more Sema tests

There are now only a handful of Sema tests remaining that use %clang in
SemaCXX, SemaObjC and SemaTemplate.

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

10 years agoMove ObjC Cocoa.h header test to Headers
Alp Toker [Sat, 19 Apr 2014 19:07:24 +0000 (19:07 +0000)]
Move ObjC Cocoa.h header test to Headers

This tests for broad compatibility with platform SDK headers using the clang
driver and so belongs alongside the other header ingtegration tests.

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

10 years agoRe-enable the C++11 modules integration test on OS X
Alp Toker [Sat, 19 Apr 2014 19:07:19 +0000 (19:07 +0000)]
Re-enable the C++11 modules integration test on OS X

XCode 5.1.1 has shipped with fixed SDK headers.

This reverts commit r200256.

Fixes PR18322.

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

10 years agoclang/test/Index/pch-with-errors.c: Remove XFAIL added in r206294. It has been fixed...
NAKAMURA Takumi [Sat, 19 Apr 2014 16:49:22 +0000 (16:49 +0000)]
clang/test/Index/pch-with-errors.c: Remove XFAIL added in r206294. It has been fixed since r206644.

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

10 years agoSpeculative fix for buildbot failure. Apparently Clang 3.1 got move semantics wrong.
Richard Smith [Sat, 19 Apr 2014 04:28:00 +0000 (04:28 +0000)]
Speculative fix for buildbot failure. Apparently Clang 3.1 got move semantics wrong.

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

10 years agoThread Safety Analysis: Convert to minimal SSA.
DeLesley Hutchins [Sat, 19 Apr 2014 03:54:41 +0000 (03:54 +0000)]
Thread Safety Analysis:  Convert to minimal SSA.

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

10 years agoWhen a module completes the definition of a class template specialization imported...
Richard Smith [Sat, 19 Apr 2014 03:48:30 +0000 (03:48 +0000)]
When a module completes the definition of a class template specialization imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations.

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

10 years agoThread Safety Analysis: Update SSA pass to handle loops.
DeLesley Hutchins [Sat, 19 Apr 2014 00:35:54 +0000 (00:35 +0000)]
Thread Safety Analysis:  Update SSA pass to handle loops.

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

10 years agoFix a hole with nested unavailable submodules from r206664
Ben Langmuir [Fri, 18 Apr 2014 23:51:00 +0000 (23:51 +0000)]
Fix a hole with nested unavailable submodules from r206664

If a module doesn't meet a requirement, neither do its submodules. If we
don't propogate that, we might think it's an error to be missing a
header in one of those submodules.

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

10 years agoCodeGen: Remove an unused include
Justin Bogner [Fri, 18 Apr 2014 22:31:07 +0000 (22:31 +0000)]
CodeGen: Remove an unused include

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

10 years agoDon't build modules with (submodules with) missing headers
Ben Langmuir [Fri, 18 Apr 2014 22:07:31 +0000 (22:07 +0000)]
Don't build modules with (submodules with) missing headers

Unless they are in submodules that aren't available anyway, due to
requirements not being met.  Also, mark children as unavailable when the
parent is.

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

10 years agoFix sphinx-build warnings in clang docs.
Reid Kleckner [Fri, 18 Apr 2014 21:55:49 +0000 (21:55 +0000)]
Fix sphinx-build warnings in clang docs.

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

10 years agoAdd support for building Sphinx documentation when being inside LLVM source tree...
Reid Kleckner [Fri, 18 Apr 2014 21:55:46 +0000 (21:55 +0000)]
Add support for building Sphinx documentation when being inside LLVM source tree and using CMake

Patch by Daniel Liew <daniel.liew@imperial.ac.uk>!

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

10 years agoCodeGen: Use LLVM's InstrProfReader in -fprofile-instr-use=
Justin Bogner [Fri, 18 Apr 2014 21:52:00 +0000 (21:52 +0000)]
CodeGen: Use LLVM's InstrProfReader in -fprofile-instr-use=

Update clang to use the InstrProfReader from LLVM to read
instrumentation based profile data. This also switches us from the
naive text format to the binary format, since that's what's
implemented in the reader.

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

10 years ago[Cleanup] Remove a trailing whitespace
Justin Bogner [Fri, 18 Apr 2014 21:51:09 +0000 (21:51 +0000)]
[Cleanup] Remove a trailing whitespace

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

10 years agoDon't read CompilerInstance fields that don't exist in ASTUnit
Ben Langmuir [Fri, 18 Apr 2014 20:39:48 +0000 (20:39 +0000)]
Don't read CompilerInstance fields that don't exist in ASTUnit

When transferring data from a CompilerInstance in an error path we need
to consider cases where the various fields are uninitialized.

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

10 years agoTeach users of OnDiskHashTable to define hash_value and offset types
Justin Bogner [Fri, 18 Apr 2014 20:27:24 +0000 (20:27 +0000)]
Teach users of OnDiskHashTable to define hash_value and offset types

This paves the way to making OnDiskHashTable work with hashes that are
not 32 bits wide and to making OnDiskHashTable work very large hash
tables. The LLVM change to use these types is upcoming.

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

10 years agoRemove OnDiskHashTable.h, since it's been moved to llvm
Justin Bogner [Fri, 18 Apr 2014 19:57:06 +0000 (19:57 +0000)]
Remove OnDiskHashTable.h, since it's been moved to llvm

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

10 years agoSplit out the no-thunk multiple inheritance tests
Timur Iskhodzhanov [Fri, 18 Apr 2014 15:10:05 +0000 (15:10 +0000)]
Split out the no-thunk multiple inheritance tests

Also, intentionally duplicate base class definitions per test, so it's easier to copy tests while debugging failures

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

10 years agoAdd more constness to module-related APIs
Dmitri Gribenko [Fri, 18 Apr 2014 14:36:51 +0000 (14:36 +0000)]
Add more constness to module-related APIs

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

10 years agoARM64: make sure the caller is expected to extend in AAPCS.
Tim Northover [Fri, 18 Apr 2014 13:46:08 +0000 (13:46 +0000)]
ARM64: make sure the caller is expected to extend in AAPCS.

This is one of those DarwinPCS differences. It'd been caught in
arguments, but not return values.

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

10 years agoUpdating to use more range-based for loops, nullptr and auto. No functional changes.
Aaron Ballman [Fri, 18 Apr 2014 13:13:15 +0000 (13:13 +0000)]
Updating to use more range-based for loops, nullptr and auto. No functional changes.

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

10 years agoARM64: make sure HFAs on the stack get properly aligned.
Tim Northover [Fri, 18 Apr 2014 10:47:44 +0000 (10:47 +0000)]
ARM64: make sure HFAs on the stack get properly aligned.

Another AAPCS bug, part of PR19432.

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

10 years agoFix a -Wmicrosoft warning on an unrepresentable enum
Reid Kleckner [Fri, 18 Apr 2014 01:21:55 +0000 (01:21 +0000)]
Fix a -Wmicrosoft warning on an unrepresentable enum

0x80000000 isn't representable as an int, which is the default enum
type.

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

10 years agoBackendUtil: Pass through -mdisable-tail-calls
Duncan P. N. Exon Smith [Fri, 18 Apr 2014 01:05:25 +0000 (01:05 +0000)]
BackendUtil: Pass through -mdisable-tail-calls

The frontend option -fno-optimize-sibling-calls resolves to -cc1's
-mdisable-tail-calls, which is passed to the TargetMachine in the
backend.  PassManagerBuilder was adding the -tailcallelim pass anyway.

Use a new DisableTailCalls option in PassManagerBuilder to disable tail
calls harder.

Requires the matching commit in LLVM that adds DisableTailCalls.

<rdar://problem/16050591>

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

10 years agotest: Use llvm-profdata merge in Profile tests
Justin Bogner [Thu, 17 Apr 2014 22:49:06 +0000 (22:49 +0000)]
test: Use llvm-profdata merge in Profile tests

In preparation for using a binary format for instrumentation based
profiling, explicitly treat the test inputs as text and transform them
before running. This will allow us to leave the checked in files in
human readable format once the instrumentation format is binary.

No functional change.

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

10 years agoMS ABI: Don't append to vbtables that we shouldn't extend
Reid Kleckner [Thu, 17 Apr 2014 22:47:52 +0000 (22:47 +0000)]
MS ABI: Don't append to vbtables that we shouldn't extend

This was probably a benign bug, since nobody would look at the vbtable
slots that we were filling in.

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

10 years agoFollow-up to r206457 -- fix static adjustments for some subtle virtual inheritance...
Timur Iskhodzhanov [Thu, 17 Apr 2014 22:01:48 +0000 (22:01 +0000)]
Follow-up to r206457 -- fix static adjustments for some subtle virtual inheritance cases

Reviewed at http://reviews.llvm.org/D3410

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

10 years agoMaking some public members into private members. This also introduces a bit more...
Aaron Ballman [Thu, 17 Apr 2014 21:44:08 +0000 (21:44 +0000)]
Making some public members into private members. This also introduces a bit more const-correctness, and now uses some range-based for loops. No functional changes intended.

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

10 years agoFix comment.
Richard Smith [Thu, 17 Apr 2014 20:39:09 +0000 (20:39 +0000)]
Fix comment.

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

10 years agoAdd missing serialization code for one of the CXXRecordDecl definition flags.
Richard Smith [Thu, 17 Apr 2014 20:33:01 +0000 (20:33 +0000)]
Add missing serialization code for one of the CXXRecordDecl definition flags.

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

10 years agoNitpicky refactoring -- use of nullptr and auto, made a bit more const-correct. No...
Aaron Ballman [Thu, 17 Apr 2014 20:08:36 +0000 (20:08 +0000)]
Nitpicky refactoring -- use of nullptr and auto, made a bit more const-correct. No functional changes intended.

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

10 years agoRevised per Dmitri's comments. My first exposure to range-based for loops, thanks!
John Thompson [Thu, 17 Apr 2014 18:17:36 +0000 (18:17 +0000)]
Revised per Dmitri's comments. My first exposure to range-based for loops, thanks!

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

10 years agoclang-format.py: Don't omit the first two words from error messages.
Nico Weber [Thu, 17 Apr 2014 17:51:57 +0000 (17:51 +0000)]
clang-format.py: Don't omit the first two words from error messages.

This reverts r172072.  clang-format used to use DiagnosticEngine to output
errors: http://llvm.org/viewvc/llvm-project?view=revision&revision=172071. Now
it doesn't, so this code is obsolete.

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

10 years agoBug 18567: Fix constantexpr pointer casts with address spaces.
Matt Arsenault [Thu, 17 Apr 2014 17:45:37 +0000 (17:45 +0000)]
Bug 18567: Fix constantexpr pointer casts with address spaces.

Getting a pointer into a struct at a non-zero offset would try to
use the default address space.

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

10 years agoRevised per Dmitri's comments. My first exposure to range-based for loops, thanks!
John Thompson [Thu, 17 Apr 2014 17:06:13 +0000 (17:06 +0000)]
Revised per Dmitri's comments. My first exposure to range-based for loops, thanks!

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

10 years agoFix alignment of trailing block comments.
Alexander Kornienko [Thu, 17 Apr 2014 16:12:46 +0000 (16:12 +0000)]
Fix alignment of trailing block comments.

Summary:
This patch ensures that the lines of the block comments retain relative
column offsets. In order to do this WhitespaceManager::Changes representing
continuation of block comments keep a pointer on the change representing the
whitespace change before the block comment, and a relative column offset to this
change, so that the correct column can be reconstructed at the end of alignment
process.

Fixes http://llvm.org/PR19325

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D3408

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

10 years agoSince the object is new'ed in the enterCFG function, now deleting in the exitCFG...
Aaron Ballman [Thu, 17 Apr 2014 15:23:50 +0000 (15:23 +0000)]
Since the object is new'ed in the enterCFG function, now deleting in the exitCFG function instead of the destructor to ensure proper pairing. This allows reuse of the builder without creating a memory leak.

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

10 years agoFix Profile:cxx-lambda.cpp test for targets that do not generate zeroext
Keith Walker [Thu, 17 Apr 2014 13:04:53 +0000 (13:04 +0000)]
Fix Profile:cxx-lambda.cpp test for targets that do not generate zeroext

Change an expected match to allow for the fact that some targets
may not generated the zeroext operation.

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

10 years ago[ARM64] Fix __clear_cache - ensure it is predefined.
James Molloy [Thu, 17 Apr 2014 12:51:42 +0000 (12:51 +0000)]
[ARM64] Fix __clear_cache - ensure it is predefined.

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

10 years ago[ARM64] Add ARM64 RUN lines to a bunch of tests that had AARCH64 RUN lines.
James Molloy [Thu, 17 Apr 2014 12:51:36 +0000 (12:51 +0000)]
[ARM64] Add ARM64 RUN lines to a bunch of tests that had AARCH64 RUN lines.

This covers all tests in tests/Driver and tests/Preprocessor, but there are some
failing tests in test/Sema that need looking into.

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

10 years ago[ARM64] Teach Targets.cpp about Cortex-A53 and Cortex-A57, and enable more tests.
James Molloy [Thu, 17 Apr 2014 12:51:28 +0000 (12:51 +0000)]
[ARM64] Teach Targets.cpp about Cortex-A53 and Cortex-A57, and enable more tests.

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

10 years ago[ARM64] Plumb in big-endian - add arm64_be to the many switches where it was missing.
James Molloy [Thu, 17 Apr 2014 12:51:23 +0000 (12:51 +0000)]
[ARM64] Plumb in big-endian - add arm64_be to the many switches where it was missing.

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

10 years ago[ARM64] Default to the 'generic' CPU, unless -arch is present for backwards compatibi...
James Molloy [Thu, 17 Apr 2014 12:51:17 +0000 (12:51 +0000)]
[ARM64] Default to the 'generic' CPU, unless -arch is present for backwards compatibility.

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

10 years agoPreventing future MSVC 2012 surprises with SimpleArray by giving it an explicit move...
Aaron Ballman [Thu, 17 Apr 2014 12:50:54 +0000 (12:50 +0000)]
Preventing future MSVC 2012 surprises with SimpleArray by giving it an explicit move assignment operator.

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

10 years agoclang-format: Respect BinPackParameters in Cpp11BracedListStyle.
Daniel Jasper [Thu, 17 Apr 2014 11:32:02 +0000 (11:32 +0000)]
clang-format: Respect BinPackParameters in Cpp11BracedListStyle.

With BinPackParameters=false and Cpp11BracedListStyle=true (i.e. mostly
for Chromium):

Before:
  const Aaaaaa aaaaa = {aaaaa, bbbbb,  ccccc,  ddddd,  eeeee, ffffff,
                        ggggg, hhhhhh, iiiiii, jjjjjj, kkkkkk};

After:
  const Aaaaaa aaaaa = {aaaaa,
                        bbbbb,
                        ccccc,
                        ddddd,
                        eeeee,
                        ffffff,
                        ggggg,
                        hhhhhh,
                        iiiiii,
                        jjjjjj,
                        kkkkkk};

This fixes llvm.org/PR19359. I am not sure we'll want this in all cases
in the long run, but I'll guess we'll get feedback on that.

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

10 years agoFix PR19408 - Missing static this adjustment in a vtordisp thunk
Timur Iskhodzhanov [Thu, 17 Apr 2014 11:01:41 +0000 (11:01 +0000)]
Fix PR19408 - Missing static this adjustment in a vtordisp thunk

Also fix a few other vtordisp-related bugs.

Reviewed at http://reviews.llvm.org/D3400

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

10 years agoARM64: remove holes from *all* HFAs on the stack.
Tim Northover [Thu, 17 Apr 2014 10:20:38 +0000 (10:20 +0000)]
ARM64: remove holes from *all* HFAs on the stack.

My first attempt to make sure HFAs were contiguous was in the block dealing
with padding registers, which meant it only triggered on the first stack-based
HFA. This should extend it to the rest as well.

Another part of PR19432.

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

10 years agoSemaTemplate.cpp: Rework r206451. Removing an argument was really bad idea.
NAKAMURA Takumi [Thu, 17 Apr 2014 08:57:09 +0000 (08:57 +0000)]
SemaTemplate.cpp: Rework r206451. Removing an argument was really bad idea.

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

10 years agoSemaTemplate.cpp: Appease msvc to get rid of default argument in lambda definition.
NAKAMURA Takumi [Thu, 17 Apr 2014 08:42:31 +0000 (08:42 +0000)]
SemaTemplate.cpp: Appease msvc to get rid of default argument in lambda definition.

  clang\lib\Sema\SemaTemplate.cpp(1826) : error C2064: term does not evaluate to a function taking 1 arguments

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

10 years agoPR19340: If we see a declaration of a member of an unspecialized class template
Richard Smith [Thu, 17 Apr 2014 03:52:20 +0000 (03:52 +0000)]
PR19340: If we see a declaration of a member of an unspecialized class template
that looks like it might be an explicit specialization, don't recover as an
explicit specialization (bypassing the check that would reject that).

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

10 years agoWhen writing YAML in libclang, use yaml::escape instead of write_escaped
Ben Langmuir [Thu, 17 Apr 2014 03:31:02 +0000 (03:31 +0000)]
When writing YAML in libclang, use yaml::escape instead of write_escaped

The YAMLParser has its own escaped string representation, and does not
handle octal escape sequences. When writing the virtual file system to a
YAML file, use yaml::escape().

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

10 years agoRefactor all the checking for missing 'template<>'s when a declaration has a
Richard Smith [Thu, 17 Apr 2014 03:29:33 +0000 (03:29 +0000)]
Refactor all the checking for missing 'template<>'s when a declaration has a
template-id after its scope specifier into a single place.

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

10 years agoDon't emit an ExtWarn on declarations of variable template specializations;
Richard Smith [Thu, 17 Apr 2014 02:56:49 +0000 (02:56 +0000)]
Don't emit an ExtWarn on declarations of variable template specializations;
we'll already have issued the relevant diagnostic when we saw the declaration
of the primary template.

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

10 years ago[Parser] Remove "add -fmodules" from the "use of '@import' when modules are disabled...
Argyrios Kyrtzidis [Thu, 17 Apr 2014 02:32:52 +0000 (02:32 +0000)]
[Parser] Remove "add -fmodules" from the "use of '@import' when modules are disabled, add -fmodules" error.

We disable modules for C++, at which point this is confusing.
rdar://16641918

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

10 years agoAdding type info for f16c floating-point type. This is consistent with the
Yunzhong Gao [Thu, 17 Apr 2014 02:26:26 +0000 (02:26 +0000)]
Adding type info for f16c floating-point type. This is consistent with the
Itanium ABI in 2.9.2 Place of Emission.

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

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

10 years agoImplement [over.match.oper]p3 properly, by filtering the non-candidates out
Richard Smith [Thu, 17 Apr 2014 01:52:14 +0000 (01:52 +0000)]
Implement [over.match.oper]p3 properly, by filtering the non-candidates out
when building the candidate set, rather than trying to contort name lookup into
handling this.

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

10 years agoPR19452: Implement more of [over.match.oper]p3's restrictions on which non-member...
Richard Smith [Thu, 17 Apr 2014 01:12:17 +0000 (01:12 +0000)]
PR19452: Implement more of [over.match.oper]p3's restrictions on which non-member overloaded operators can be found when no operand is of class type. We used to fail to implement this rule if there was an operand of dependent type.

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

10 years agoFurther simplify r206430.
Adrian Prantl [Thu, 17 Apr 2014 01:04:01 +0000 (01:04 +0000)]
Further simplify r206430.

rdar://problem/16636569.

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

10 years agoRename lib/Headers/module.map to module.modulemap
Ben Langmuir [Thu, 17 Apr 2014 00:52:48 +0000 (00:52 +0000)]
Rename lib/Headers/module.map to module.modulemap

Don't install a file using the legacy spelling.

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

10 years agoDebug info: When collecting the parameters of C++ partial template
Adrian Prantl [Thu, 17 Apr 2014 00:30:48 +0000 (00:30 +0000)]
Debug info: When collecting the parameters of C++ partial template
specializations collect all arguments and not just the ones from the
class template partial specialization from which this class template
specialization was instantiated. The debug info does not represent the
partial specialization otherwise and so specialized parameters would
go missing.

rdar://problem/16636569.

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

10 years agoAttempting to unbreak the MSVC 2012 build a second time.
Aaron Ballman [Wed, 16 Apr 2014 21:32:23 +0000 (21:32 +0000)]
Attempting to unbreak the MSVC 2012 build a second time.

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

10 years agoAdded dump method for global module index.
John Thompson [Wed, 16 Apr 2014 21:03:41 +0000 (21:03 +0000)]
Added dump method for global module index.

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

10 years agoHandle -m32 for NetBSD/sparc64 correctly. Extend test case to also check
Joerg Sonnenberger [Wed, 16 Apr 2014 20:44:17 +0000 (20:44 +0000)]
Handle -m32 for NetBSD/sparc64 correctly. Extend test case to also check
ARM, MIPS and i386 ABIs.

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

10 years agoRevert "Move -fms-extensions predefined macros into InitPreprocessor"
Reid Kleckner [Wed, 16 Apr 2014 20:10:16 +0000 (20:10 +0000)]
Revert "Move -fms-extensions predefined macros into InitPreprocessor"

This reverts commit r206413.

This was proposed before, but it's not clear if this is really a good
idea:
http://reviews.llvm.org/D3034

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