]> granicus.if.org Git - clang/log
clang
9 years agoDon't emit strong vtable definitions for imported classes with key functions (PR21355)
Hans Wennborg [Thu, 23 Oct 2014 22:40:46 +0000 (22:40 +0000)]
Don't emit strong vtable definitions for imported classes with key functions (PR21355)

Clang would previously assert on the following code when targeting MinGW:

  struct __declspec(dllimport) S {
      virtual ~S();
  };
  S::~S() {}

Because ~S is a key function and the class is dllimport, we would try to emit a
strong definition of the vtable, with dllimport - which is a conflict. We
should not emit strong vtable definitions for imported classes.

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

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

9 years agoDriver: Include driver diagnostics when we --serialize-diagnostics
Justin Bogner [Thu, 23 Oct 2014 22:20:11 +0000 (22:20 +0000)]
Driver: Include driver diagnostics when we --serialize-diagnostics

Currently, when --serialize-diagnostics is passed this only includes
the diagnostics from clang -cc1, and driver diagnostics are
dropped. This causes issues for tools that use the serialized
diagnostics, since stderr is lost and these diagnostics aren't seen at
all.

We handle this by merging the diagnostics from the CC1 process and the
driver diagnostics into a single file when the driver invokes CC1.

Fixes rdar://problem/10585062

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

9 years ago[modules] Simplify reading of INPUT_FILE_OFFSETS record and make it robust against...
Richard Smith [Thu, 23 Oct 2014 22:18:29 +0000 (22:18 +0000)]
[modules] Simplify reading of INPUT_FILE_OFFSETS record and make it robust against changes to record order.

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

9 years agoFactor out common checks from module map deserialization. No functionality change.
Richard Smith [Thu, 23 Oct 2014 22:12:14 +0000 (22:12 +0000)]
Factor out common checks from module map deserialization. No functionality change.

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

9 years agoclang-format: Fix incorrect space after "<".
Daniel Jasper [Thu, 23 Oct 2014 20:22:22 +0000 (20:22 +0000)]
clang-format: Fix incorrect space after "<".

Before:
  bool a = 2 <::SomeFunction();

After:
  bool a = 2 < ::SomeFunction();

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

9 years agoRemove code duplication and cut dependency from clangRewrite on
Daniel Jasper [Thu, 23 Oct 2014 19:47:36 +0000 (19:47 +0000)]
Remove code duplication and cut dependency from clangRewrite on
clangAST.

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

9 years agopatch to issue warning on comparing parameters with
Fariborz Jahanian [Thu, 23 Oct 2014 19:00:10 +0000 (19:00 +0000)]
patch to issue warning on comparing parameters with
nonnull attribute when comparison is always
true/false. Patch by Steven Wu with few fixes and minor
refactoring and adding tests by me. rdar://18712242

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

9 years agoAdd a "signature" to AST files to verify that they haven't changed
Ben Langmuir [Thu, 23 Oct 2014 18:05:36 +0000 (18:05 +0000)]
Add a "signature" to AST files to verify that they haven't changed

Since the order of the IDs in the AST file (e.g. DeclIDs, SelectorIDs)
is not stable, it is not safe to load an AST file that depends on
another AST file that has been rebuilt since the importer was built,
even if "nothing changed". We previously used size and modtime to check
this, but I've seen cases where a module rebuilt quickly enough to foil
this check and caused very hard to debug build errors.

To save cycles when we're loading the AST, we just generate a random
nonce value and check that it hasn't changed when we load an imported
module, rather than actually hash the whole file.

This is slightly complicated by the fact that we need to verify the
signature inside addModule, since we might otherwise consider that a
mdoule is "OutOfDate" when really it is the importer that is out of
date. I didn't see any regressions in module load time after this
change.

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

9 years agoDebugInfo: Correctly describe the lexical decl context of static member variable...
David Blaikie [Thu, 23 Oct 2014 16:39:49 +0000 (16:39 +0000)]
DebugInfo: Correctly describe the lexical decl context of static member variable definitions.

The previous IR representation used the non-lexical decl context, which
placed the definitions in the same scope as the declarations (ie: within
the class) - this was hidden by the fact that LLVM currently doesn't
respect the context of global variable definitions at all, and always
puts them at the top level (as direct children of the compile_unit).
Having the correct lexical scope improves source fidelity and simplify
backend global variable emission (with changes coming shortly).

Doing something similar for non-member global variables would help
simplify/cleanup things further (see FIXME in the commit) and provide
similar source fidelity benefits to the final debug info.

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

9 years agoRevert accidentally-committed files in r220460.
Richard Smith [Thu, 23 Oct 2014 02:02:31 +0000 (02:02 +0000)]
Revert accidentally-committed files in r220460.

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

9 years agoRefactor implementation of 'exclude header'.
Richard Smith [Thu, 23 Oct 2014 02:01:19 +0000 (02:01 +0000)]
Refactor implementation of 'exclude header'.

This was not a real header role, and was never exposed to clients of ModuleMap.
Remove the enumeration value for it and track it as marking the header as
'known' rather than creating an extra KnownHeader entry that *every single*
client ignores.

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

9 years agoFix covered-switch warning.
Richard Smith [Thu, 23 Oct 2014 01:03:45 +0000 (01:03 +0000)]
Fix covered-switch warning.

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

9 years agoRevert r218541 - Don't link in sanitizer runtimes if -nostdlib/-nodefaultlibs is...
Alexey Samsonov [Thu, 23 Oct 2014 00:46:10 +0000 (00:46 +0000)]
Revert r218541 - Don't link in sanitizer runtimes if -nostdlib/-nodefaultlibs is provided.

This is a sad thing to do, but all the alternatives look ugly.

Looks like there are legitimate cases when users may want to link
with sanitizer runtimes *and* -nodefaultlibs (and ensure they provide
replacements for system libraries). For example, this happens in libc++
test suite.

"-nodefaultlibs" is told to link only the libraries explicitly provided
by the user, and providing "-fsanitize=address" is a clear indication of
intention to link with ASan runtime.
We can't easily introduce analogue of "-print-libgcc-name": linking with
sanitizers runtimes is not trivial: some runtimes are split into several
archive libraries, which are required to be wrapped in
-whole-archive/-no-whole-archive.

If "-fsanitize=whatever" and "-nodefaultlibs" are provided, system library
dependencies of sanitizer runtimes (-lc/-ldl/-lpthread/-lrt) will *not* be
linked, and user would have to link them in manually. Note that this can
cause problems, as failing to provide "-lrt" might lead to crashes in runtime
during ASan initialization. But looks like we should bite this bullet.

See r218541 review thread for the discussion.

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

9 years agoUpdate the documentation for API change to CreateASTConsumer the rest of the way.
Nick Lewycky [Wed, 22 Oct 2014 23:57:14 +0000 (23:57 +0000)]
Update the documentation for API change to CreateASTConsumer the rest of the way.

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

9 years agoTest files I forgot to svn add in r220448.
Richard Smith [Wed, 22 Oct 2014 23:52:04 +0000 (23:52 +0000)]
Test files I forgot to svn add in r220448.

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

9 years ago[modules] Add support for 'textual header' directives.
Richard Smith [Wed, 22 Oct 2014 23:50:56 +0000 (23:50 +0000)]
[modules] Add support for 'textual header' directives.

This allows a module to specify that it logically contains a file, but that
said file is non-modular and intended for textual inclusion. This allows
layering checks to work properly in the presence of such files.

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

9 years agoBasic: Add ext_delete_void_ptr_operand to -Wdelete-incomplete
David Majnemer [Wed, 22 Oct 2014 23:03:58 +0000 (23:03 +0000)]
Basic: Add ext_delete_void_ptr_operand to -Wdelete-incomplete

This fixes PR21340.

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

9 years agoFix C++ compliance issue. string literals must be const char *
Zachary Turner [Wed, 22 Oct 2014 21:48:56 +0000 (21:48 +0000)]
Fix C++ compliance issue.  string literals must be const char *

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

9 years agoParse: Ignore "long" and "short" in #pragma section
David Majnemer [Wed, 22 Oct 2014 21:08:43 +0000 (21:08 +0000)]
Parse: Ignore "long" and "short" in #pragma section

This fixes PR21337.

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

9 years agoRemoving the setLBracLoc and setRBracLoc functions from CompoundStmt -- their only...
Aaron Ballman [Wed, 22 Oct 2014 21:06:18 +0000 (21:06 +0000)]
Removing the setLBracLoc and setRBracLoc functions from CompoundStmt -- their only use was with the AST reader, and friendship can be used to handle that. Drive-by rename of "Brac" to "Brace" for the private data members. NFC.

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

9 years agoFix up attribute documentation links to MSDN in a nicer way
Reid Kleckner [Wed, 22 Oct 2014 20:54:25 +0000 (20:54 +0000)]
Fix up attribute documentation links to MSDN in a nicer way

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

9 years agoMake a good guess about where MSVC and Windows SDK libraries are for linking.
Zachary Turner [Wed, 22 Oct 2014 20:40:43 +0000 (20:40 +0000)]
Make a good guess about where MSVC and Windows SDK libraries are for linking.

When a user has not configured a standard Visual Studio environment
by running vcvarsall, clang tries its best to find Visual Studio
include files and executables anyway.  This patch makes clang also
try to find system and Windows SDK libraries for linking against,
as well.

Reviewed by: Hans Wennborg
Differential Revision: http://reviews.llvm.org/D5873

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

9 years agoResubmit "Improve Windows toolchain support for non-standard environments."
Zachary Turner [Wed, 22 Oct 2014 20:40:28 +0000 (20:40 +0000)]
Resubmit "Improve Windows toolchain support for non-standard environments."

This resubmits change r220226.  That change broke the chromium
build bots because chromium it ships an hermetic MSVC toolchain
that it expects clang to fallback to by finding it on the path.

This patch fixes the issue by bumping up the prioritization of PATH
when looking for MSVC binaries.

Reviewed by: Hans Wennborg, Reid Kleckner
Differential Revision: http://reviews.llvm.org/D5892

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

9 years agoCreate a documentation category for the new calling convention documentation. Drive...
Aaron Ballman [Wed, 22 Oct 2014 20:33:24 +0000 (20:33 +0000)]
Create a documentation category for the new calling convention documentation. Drive-by fixing of duplicate target names from a previous commit.

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

9 years agoAdd support for profiling the matchers used.
Samuel Benzaquen [Wed, 22 Oct 2014 20:31:05 +0000 (20:31 +0000)]
Add support for profiling the matchers used.

Summary:
Add support for profiling the matchers used.
This will be connected with clang-tidy to generate a report to determine
and debug slow checks.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

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

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

9 years agoTry to fix link errors in mingw cmake -DBUILD_SHARED_LIBS=ON
Reid Kleckner [Wed, 22 Oct 2014 20:20:35 +0000 (20:20 +0000)]
Try to fix link errors in mingw cmake -DBUILD_SHARED_LIBS=ON

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

9 years agoAdd documentation for calling convention attributes
Reid Kleckner [Wed, 22 Oct 2014 20:14:27 +0000 (20:14 +0000)]
Add documentation for calling convention attributes

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

9 years agoRemove unused DiagnosticsEngine::NumErrorsSuppressed member.
Rafael Espindola [Wed, 22 Oct 2014 20:09:12 +0000 (20:09 +0000)]
Remove unused DiagnosticsEngine::NumErrorsSuppressed member.

Patch by Brad King!

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

9 years agoCorrect importing of the type of a TemplateArgument
David Blaikie [Wed, 22 Oct 2014 19:54:16 +0000 (19:54 +0000)]
Correct importing of the type of a TemplateArgument

It's not clear how this would be tested - I imagine we should have an
ASTImporter test that RAVs the new AST and checks that all the elements
in it are from this ASTContext and not the foreign one... but I know
little about the ASTImporter and how/where that testing might be done.

(post-commit review feedback from Richard Smith on r219900)

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

9 years agoDebugInfo: Omit scopes in -gmlt to reduce metadata size (on disk and in memory)
David Blaikie [Wed, 22 Oct 2014 19:34:33 +0000 (19:34 +0000)]
DebugInfo: Omit scopes in -gmlt to reduce metadata size (on disk and in memory)

I haven't done any actual impact analysis of this change as it's a
strict improvement, but I'd be curious to know how much it helps.

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

9 years agoFixup for r220403: Use getFileLoc() instead of getSpellingLoc() in SanitizerBlacklist.
Alexey Samsonov [Wed, 22 Oct 2014 19:34:25 +0000 (19:34 +0000)]
Fixup for r220403: Use getFileLoc() instead of getSpellingLoc() in SanitizerBlacklist.

This also handles the case where function name (not its body)
is obtained from macro expansion.

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

9 years agoSanitizerBlacklist: Use spelling location for blacklisting purposes.
Alexey Samsonov [Wed, 22 Oct 2014 18:26:07 +0000 (18:26 +0000)]
SanitizerBlacklist: Use spelling location for blacklisting purposes.

When SanitizerBlacklist decides if the SourceLocation is blacklisted,
we need to first turn it into a SpellingLoc before fetching the filename
and scanning "src:" entries. Otherwise we will fail to fecth the
correct filename for function definitions coming from macro expansion.

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

9 years agoReland r219810 "Fix late template parsing leak with incremental processing"
Reid Kleckner [Wed, 22 Oct 2014 17:50:19 +0000 (17:50 +0000)]
Reland r219810 "Fix late template parsing leak with incremental processing"

Original message:
Add a second late template parser callback meant to cleanup any
resources allocated by late template parsing.  Call it from the
Sema::ActOnEndOfTranslationUnit method after all pending template
instantiations have been completed.  Teach Parser::ParseTopLevelDecl to
install the cleanup callback when incremental processing is enabled so
that Parser::TemplateIds can be freed.

Patch by Brad King!

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

9 years agoMS ABI: Emit more canonical vbptr stores and loads
Reid Kleckner [Wed, 22 Oct 2014 17:26:00 +0000 (17:26 +0000)]
MS ABI: Emit more canonical vbptr stores and loads

This eliminates some i8* GEPs and makes the IR that clang emits a bit
more canonical. More work is needed for vftables, but that isn't a clear
win so I plan to send it for review.

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

9 years agoRemove unused StmtVector& parameters from declaration parsing functions.
Rafael Espindola [Wed, 22 Oct 2014 14:27:08 +0000 (14:27 +0000)]
Remove unused StmtVector& parameters from declaration parsing functions.

Patch by Eelis van der Weegen!

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

9 years agoSupport using sample profiles with partial debug info (driver)
Diego Novillo [Wed, 22 Oct 2014 13:00:05 +0000 (13:00 +0000)]
Support using sample profiles with partial debug info (driver)

Summary:
When using a profile, we used to require the use -gmlt so that we could
get access to the line locations. This is used to match line numbers in
the input profile to the line numbers in the function's IR.

But this is actually not necessary. The driver can provide source
location tracking without the emission of debug information. In these
cases, the annotation 'llvm.dbg.cu' is missing from the IR, but the
actual line location annotations are still present.

This patch tells the driver to only emit source location tracking
when -fprofile-sample-use is present in the command line.

Reviewers: echristo, dblaikie

Subscribers: llvm-commits

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

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

9 years agoclang-format: Fix tests after recent change to ObjC block formatting.
Daniel Jasper [Wed, 22 Oct 2014 09:50:23 +0000 (09:50 +0000)]
clang-format: Fix tests after recent change to ObjC block formatting.

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

9 years agoclang-format: Use AllowShortBlocksOnASingleLine for ObjC blocks, too.
Daniel Jasper [Wed, 22 Oct 2014 09:12:44 +0000 (09:12 +0000)]
clang-format: Use AllowShortBlocksOnASingleLine for ObjC blocks, too.

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

9 years agoclang-format: Fix broken test.
Daniel Jasper [Wed, 22 Oct 2014 09:01:12 +0000 (09:01 +0000)]
clang-format: Fix broken test.

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

9 years agoclang-format: Fix incorrect trailing return arrow detection.
Daniel Jasper [Wed, 22 Oct 2014 08:42:58 +0000 (08:42 +0000)]
clang-format: Fix incorrect trailing return arrow detection.

Before:
  auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa -> f()) {}

After:
  auto doSomething(Aaaaaa* aaaaaa) -> decltype(aaaaaa->f()) {}

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

9 years agoFix style issue from r220363. No functional change.
Richard Trieu [Wed, 22 Oct 2014 05:21:59 +0000 (05:21 +0000)]
Fix style issue from r220363.  No functional change.

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

9 years agoDisable the uninitialized field warning in uninstantiated classes.
Richard Trieu [Wed, 22 Oct 2014 02:52:00 +0000 (02:52 +0000)]
Disable the uninitialized field warning in uninstantiated classes.

If a templated class is not instantiated, then the AST for it could be missing
some things that would throw the field checker off.  Wait until specialization
before emitting these warnings.

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

9 years agoDriver: rename Windows to MSVCToolChain
Saleem Abdulrasool [Wed, 22 Oct 2014 02:37:29 +0000 (02:37 +0000)]
Driver: rename Windows to MSVCToolChain

This renames the Windows toolchain to MSVCToolChain.  This is a preparatory step
for adding a CrossWindowsToolChain which uses clang/libc++/(ld/lld) without the
standard GCC toolchain lookup.  NFC.

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

9 years ago[modules] Initial support for explicitly loading .pcm files.
Richard Smith [Wed, 22 Oct 2014 02:05:46 +0000 (02:05 +0000)]
[modules] Initial support for explicitly loading .pcm files.

Implicit module builds are not well-suited to a lot of build systems. In
particular, they fare badly in distributed build systems, and they lead to
build artifacts that are not tracked as part of the usual dependency management
process. This change allows explicitly-built module files (which are already
supported through the -emit-module flag) to be explicitly loaded into a build,
allowing build systems to opt to manage module builds and dependencies
themselves.

This is only the first step in supporting such configurations, and it should
be considered experimental and subject to change or removal for now.

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

9 years ago<float.h>: Don't seek #include_next if -ffreestanding for targeting mingw.
NAKAMURA Takumi [Wed, 22 Oct 2014 01:25:49 +0000 (01:25 +0000)]
<float.h>: Don't seek #include_next if -ffreestanding for targeting mingw.

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

9 years agoPR21327 / C++ DR1652 / C++ DR73: comparing a past-the-end pointer for one
Richard Smith [Tue, 21 Oct 2014 23:01:04 +0000 (23:01 +0000)]
PR21327 / C++ DR1652 / C++ DR73: comparing a past-the-end pointer for one
complete object to a pointer to the start of another complete object does
not evaluate to the constant 'false'. All other comparisons between the
addresses of subobjects of distinct complete objects still do.

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

9 years agoR600: Update for div_fmas intrinsic change
Matt Arsenault [Tue, 21 Oct 2014 22:21:41 +0000 (22:21 +0000)]
R600: Update for div_fmas intrinsic change

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

9 years ago[modules] When building an injected-class-name type, we may have to insert it
Richard Smith [Tue, 21 Oct 2014 21:15:18 +0000 (21:15 +0000)]
[modules] When building an injected-class-name type, we may have to insert it
into multiple merged classes' TypeForDecl slots.

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

9 years agoRemoving unused variable (assigned into, but never read from); NFC.
Aaron Ballman [Tue, 21 Oct 2014 19:37:56 +0000 (19:37 +0000)]
Removing unused variable (assigned into, but never read from); NFC.

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

9 years agoFollow-up commit to r211657 which introduced these macros, but not for MSVC. This...
Aaron Ballman [Tue, 21 Oct 2014 19:24:06 +0000 (19:24 +0000)]
Follow-up commit to r211657 which introduced these macros, but not for MSVC. This turns out to break our freestanding tests on Windows when compiling in MSVC-compatible mode. It was decided (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20141020/116942.html is the start of the thread) to support this as part of Clang's interface on all platforms.

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

9 years agoTreat -g1 as -gline-tables-only
Hal Finkel [Tue, 21 Oct 2014 19:20:21 +0000 (19:20 +0000)]
Treat -g1 as -gline-tables-only

-g1 on gcc (and also IBM's xlc) are documented to be very similar to
-gline-tables-only. Our -gline-tables-only might still be more verbose than -g1
on other compilers, but currently we treat -g1 as -g, and so we're producing
much more debug info at -g1 than everybody else. Treating -g1 as
-gline-tables-only brings us much closer to what everyone else is doing.

For more information, see the discussion on
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039649.html

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

9 years agoDriver: Quote the command in crash reproduction scripts.
Justin Bogner [Tue, 21 Oct 2014 18:03:08 +0000 (18:03 +0000)]
Driver: Quote the command in crash reproduction scripts.

This fixes crash report generation when filenames have spaces. It also
removes an awkward workaround that quoted *some* arguments when
generating crash reports.

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

9 years agoDriver: Move crash report command mangling into Command::Print
Justin Bogner [Tue, 21 Oct 2014 17:24:44 +0000 (17:24 +0000)]
Driver: Move crash report command mangling into Command::Print

This pushes the logic for generating a crash reproduction script
entirely into Command::Print, instead of Command doing half of the
work and then relying on textual substitution for the rest. This makes
this logic much easier to read and will simplify fixing a couple of
issues in this area.

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

9 years agoThe nodebug attribute has a C++11-style spelling supported by GCC as well. This modif...
Aaron Ballman [Tue, 21 Oct 2014 15:46:57 +0000 (15:46 +0000)]
The nodebug attribute has a C++11-style spelling supported by GCC as well. This modifies it so we support that spelling as well.

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

9 years agoFixing the MSVC build by removing friendship with CodeGenFunction; NFC.
Aaron Ballman [Tue, 21 Oct 2014 13:39:56 +0000 (13:39 +0000)]
Fixing the MSVC build by removing friendship with CodeGenFunction; NFC.

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

9 years ago[analyzer] Move the NewDeleteLeaks checker from CplusplusAlpha to Cplusplus package.
Anton Yartsev [Tue, 21 Oct 2014 12:41:36 +0000 (12:41 +0000)]
[analyzer] Move the NewDeleteLeaks checker from CplusplusAlpha to Cplusplus package.

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

9 years agoclang-format: [Java] Understand string literal concatenation.
Daniel Jasper [Tue, 21 Oct 2014 11:34:53 +0000 (11:34 +0000)]
clang-format: [Java] Understand string literal concatenation.

Before:
  String someString = "abc" + "cde";

After:
  String someString = "abc"
                      + "cde";

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

9 years agoclang-format: [Java] Fix formatting of multiple annotations.
Daniel Jasper [Tue, 21 Oct 2014 11:17:56 +0000 (11:17 +0000)]
clang-format: [Java] Fix formatting of multiple annotations.

Before:
  @SuppressWarnings(value = "unchecked")
  @Author(name = "abc") public void doSomething() {
  }

After:
  @SuppressWarnings(value = "unchecked")
  @Author(name = "abc")
  public void doSomething() {
  }

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

9 years agoclang-format: [Java] Fix space in generic method calls.
Daniel Jasper [Tue, 21 Oct 2014 11:13:31 +0000 (11:13 +0000)]
clang-format: [Java] Fix space in generic method calls.

Before:
  A.<B>doSomething();

After:
  A.<B>doSomething();

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

9 years agoclang-format: [Java] Improve annotation handling.
Daniel Jasper [Tue, 21 Oct 2014 10:58:14 +0000 (10:58 +0000)]
clang-format: [Java] Improve annotation handling.

Before:
@SuppressWarnings(
    value = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") public static int iiiiiiiiiiiiiiiiiiiiiiii;

After:
  @SuppressWarnings(value = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
  public static int iiiiiiiiiiiiiiiiiiiiiiii;

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

9 years agoclang-format: [Java] Make annotation formatting more consistent.
Daniel Jasper [Tue, 21 Oct 2014 10:02:03 +0000 (10:02 +0000)]
clang-format: [Java] Make annotation formatting more consistent.

Before:
  DoSomething(new A() {
    @Override public String toString() {
    }
  });

After:
  DoSomething(new A() {
    @Override
    public String toString() {
    }
  });

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

9 years agoclang-format: [Java] Improve generic support.
Daniel Jasper [Tue, 21 Oct 2014 09:57:09 +0000 (09:57 +0000)]
clang-format: [Java] Improve generic support.

Before:
  Iterable< ? > a;
  Iterable< ? extends SomeObject > a;

After:
  Iterable<?> a;
  Iterable<? extends SomeObject> a;

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

9 years agoclang-format: [Java] Support extending inner classes.
Daniel Jasper [Tue, 21 Oct 2014 09:31:29 +0000 (09:31 +0000)]
clang-format: [Java] Support extending inner classes.

Before:
  class A extends B
  .C {}

After:
  class A extends B.C {}

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

9 years agoclang-format: [Java] Support annotations with parameters.
Daniel Jasper [Tue, 21 Oct 2014 09:25:39 +0000 (09:25 +0000)]
clang-format: [Java] Support annotations with parameters.

Before:
  @SuppressWarnings
  (value = "unchecked") public void doSomething() { .. }

After:
  @SuppressWarnings(value = "unchecked")
  public void doSomething() { .. }

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

9 years agoclang-format: [Java] Wrap after each function annotation.
Daniel Jasper [Tue, 21 Oct 2014 08:24:18 +0000 (08:24 +0000)]
clang-format: [Java] Wrap after each function annotation.

Before:
  @Override public String toString() { .. }

After:
  @Override
  public String toString() { .. }

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

9 years agoTest case B: fixed check rule
Evgeny Astigeevich [Tue, 21 Oct 2014 08:16:42 +0000 (08:16 +0000)]
Test case B: fixed check rule

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

9 years agoTest case B is updated to work for 32-bit and 64-bit platforms
Evgeny Astigeevich [Tue, 21 Oct 2014 08:01:37 +0000 (08:01 +0000)]
Test case B is updated to work for 32-bit and 64-bit platforms

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

9 years agoclang-format: [ObjC] Fix spacing in block variable parameters.
Daniel Jasper [Tue, 21 Oct 2014 07:57:50 +0000 (07:57 +0000)]
clang-format: [ObjC] Fix spacing in block variable parameters.

Before:
  { void (^block)(Object * x); }

After:
  { void (^block)(Object *x); }

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

9 years agoclang-format: Fix space in direct destructor calls.
Daniel Jasper [Tue, 21 Oct 2014 07:51:54 +0000 (07:51 +0000)]
clang-format: Fix space in direct destructor calls.

Before:
  void F(int& i) { i. ~int(); }

After:
  void F(int& i) { i.~int(); }

Also, some cleanups.

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

9 years agoAdd missing qualifier to documentation.
Nick Lewycky [Tue, 21 Oct 2014 06:44:23 +0000 (06:44 +0000)]
Add missing qualifier to documentation.

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

9 years agoUpdate documentation to match API change in r215323.
Nick Lewycky [Tue, 21 Oct 2014 06:43:08 +0000 (06:43 +0000)]
Update documentation to match API change in r215323.

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

9 years agoOpenMPClause.h: Fix a warning. [-Wdocumentation]
NAKAMURA Takumi [Tue, 21 Oct 2014 06:40:57 +0000 (06:40 +0000)]
OpenMPClause.h: Fix a warning. [-Wdocumentation]

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

9 years agoDriver: Tighten up crash report tests
Justin Bogner [Tue, 21 Oct 2014 05:13:09 +0000 (05:13 +0000)]
Driver: Tighten up crash report tests

These tests were a little bit too flexible in terms of filenames.

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

9 years agoRemove unused member variable.
Craig Topper [Tue, 21 Oct 2014 04:19:18 +0000 (04:19 +0000)]
Remove unused member variable.

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

9 years ago[OPENMP] Codegen for 'private' clause in 'parallel' directive.
Alexey Bataev [Tue, 21 Oct 2014 03:16:40 +0000 (03:16 +0000)]
[OPENMP] Codegen for 'private' clause in 'parallel' directive.
This patch generates some helper variables which used as a private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by default (with the default constructor, if any). In outlined function references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables and implicit barier is set by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables.
Differential Revision: http://reviews.llvm.org/D4752

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

9 years agoRemove including <complex.h> in test case, and change to use _Complex instead.
Jiangning Liu [Tue, 21 Oct 2014 02:19:58 +0000 (02:19 +0000)]
Remove including <complex.h> in test case, and change to use _Complex instead.

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

9 years agoLower compound assignment for the missing type llvm::Type::FP128TyID.
Jiangning Liu [Tue, 21 Oct 2014 01:34:34 +0000 (01:34 +0000)]
Lower compound assignment for the missing type llvm::Type::FP128TyID.

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

9 years agoSwitch C compilations to C11 by default.
Richard Smith [Mon, 20 Oct 2014 23:26:58 +0000 (23:26 +0000)]
Switch C compilations to C11 by default.

This is long-since overdue, and matches GCC 5.0. This should also be
backwards-compatible, because we already supported all of C11 as an extension
in C99 mode.

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

9 years agoRevert "Improve Windows toolchain support for non-standard environments." (r220226)
Hans Wennborg [Mon, 20 Oct 2014 23:26:03 +0000 (23:26 +0000)]
Revert "Improve Windows toolchain support for non-standard environments." (r220226)

In environments where PATH was set to point to the VS installation, Clang would
override that by looking in the registry and finding the latest VS installation.

If the environment is set up to point to a VS installation, that should take
precedence.

Reverting this until we can fix it.

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

9 years agoDriver: Consolidate the logic for naming the module crashdump cache
Justin Bogner [Mon, 20 Oct 2014 22:47:23 +0000 (22:47 +0000)]
Driver: Consolidate the logic for naming the module crashdump cache

List the module cache we use for crashdumps as a tempfile. This
simplifies how we pick up this directory when generating the actual
crash diagnostic and removes some duplicate logic.

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

9 years agoDriver: Name crashdump scripts after the first temp file
Justin Bogner [Mon, 20 Oct 2014 21:47:56 +0000 (21:47 +0000)]
Driver: Name crashdump scripts after the first temp file

In practice there's only ever one temporary output file when
generating a crashdump, but even if there were many iterating over
each and creating a duplicate run script for each one wouldn't make
very much sense.

This updates the behaviour to only generate the script once, based on
the first filename.

This should make it more reasonable to generate extra output files to
include in the crashdump going forward, so I've also added a FIXME to
look into doing just that with the extra module crashdump files.

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

9 years agoDriver: Use an early return instead of a long if condition (NFC)
Justin Bogner [Mon, 20 Oct 2014 21:20:27 +0000 (21:20 +0000)]
Driver: Use an early return instead of a long if condition (NFC)

This just flattens an if block by returning early on the "else"
condition.

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

9 years agoDriver: Make FailingCommand mandatory for generateCompilationDiagnostics
Justin Bogner [Mon, 20 Oct 2014 21:02:05 +0000 (21:02 +0000)]
Driver: Make FailingCommand mandatory for generateCompilationDiagnostics

We currently use a null FailingCommand when generating crash reports
as an indication that the cause is FORCE_CLANG_DIAGNOSTICS_CRASH, the
environment variable that exists to test crash dumps. This means that
our tests don't actually cover real crashes at all, and adds a more
complicated code path that's only used in the tests.

Instead, we can have the driver synthesize that every command failed
and just call generateCompilationDiagnostics normally.

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

9 years agoFix whitespace introduced in r220221
David Blaikie [Mon, 20 Oct 2014 20:29:35 +0000 (20:29 +0000)]
Fix whitespace introduced in r220221

Post commit review feedback from Yaron Keren.

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

9 years agoImprove Windows toolchain support for non-standard environments.
Zachary Turner [Mon, 20 Oct 2014 20:08:04 +0000 (20:08 +0000)]
Improve Windows toolchain support for non-standard environments.

Typically clang finds Visual Studio by the user explicitly setting
up a Visual Studio environment via vcvarsall.  But we still try to
behave intelligently and fallback to different methods of finding
Visual Studio when this is not done.  This patch improves various
fallback codepaths to make Visual Studio locating more robust.

Specifically, this patch:

* Adds support for searching environment variables for VS 12.0
* Correctly locates include folders for Windows SDK 8.x (this was
  previously broken, and would cause clang to error)
* Prefers locating link.exe in the same location as cl.exe.  This
  is helpful in case another link.exe is in the path earlier than
  Visual Studio (e.g. GnuWin32)
* Minor cleanup in the registry reading code to make it more
  robust in the presence of long pathnames.

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

9 years agoPR21312: Fix a regression in non-type template parameters of function type that are...
David Blaikie [Mon, 20 Oct 2014 18:56:54 +0000 (18:56 +0000)]
PR21312: Fix a regression in non-type template parameters of function type that are static member functions.

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

9 years agoFix indentation.
David Blaikie [Mon, 20 Oct 2014 17:42:23 +0000 (17:42 +0000)]
Fix indentation.

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

9 years agoAdd RestrictQualifierLoc to DeclaratorChunk::FunctionTypeInfo
Hal Finkel [Mon, 20 Oct 2014 17:32:04 +0000 (17:32 +0000)]
Add RestrictQualifierLoc to DeclaratorChunk::FunctionTypeInfo

Clang supports __restrict__ as a function qualifier, but
DeclaratorChunk::FunctionTypeInfo lacked a field to track the qualifier's
source location (as we do with volatile, etc.). This was the subject of a FIXME
in GetFullTypeForDeclarator (in SemaType.cpp). This should also prove useful as
we add more warnings regarding questionable uses of the restrict qualifier.

There is no significant functional change (except for an improved source range
associated with the err_invalid_qualified_function_type diagnostic fixit
generated by GetFullTypeForDeclarator).

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

9 years agoRevert most of r215810, which is no longer needed
Ben Langmuir [Mon, 20 Oct 2014 16:27:32 +0000 (16:27 +0000)]
Revert most of r215810, which is no longer needed

Now that we no longer add mappings when there are no local entities,
there is no need to always bump the size of the tables that correspond
to ContinuousRangeMaps.

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

9 years agoDon't add ID mappings for offsets with no entities in a module
Ben Langmuir [Mon, 20 Oct 2014 16:27:30 +0000 (16:27 +0000)]
Don't add ID mappings for offsets with no entities in a module

This is a better fix for 'duplicate key' problems in module continuous
range maps (vs what I added in r215810) by not adding any mappings at
all when there are no local entities. Now it also covers selectors,
which were not always being bumped because the record SELECTOR_OFFSET is
not always emitted.  I'll back out most of r215810 in a future commit,
since it should no longer be needed.

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

9 years agoclang-format: Fix overloaded operator edge case.
Daniel Jasper [Mon, 20 Oct 2014 13:56:30 +0000 (13:56 +0000)]
clang-format: Fix overloaded operator edge case.

Before:
  template <class F>
  void Call(F f) {
    f.template operator() <int>();
  }

After:
  template <class F>
  void Call(F f) {
    f.template operator()<int>();
  }

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

9 years agoD5823: Fix typo in Clang test arm-cortex-cpus.c; patch by Gabor Ballabas!
Artyom Skrobov [Mon, 20 Oct 2014 13:48:19 +0000 (13:48 +0000)]
D5823: Fix typo in Clang test arm-cortex-cpus.c; patch by Gabor Ballabas!

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

9 years agoclang-format: [ObjC] Fix using selector names as macro arguments.
Daniel Jasper [Mon, 20 Oct 2014 12:01:45 +0000 (12:01 +0000)]
clang-format: [ObjC] Fix using selector names as macro arguments.

Before:
  [self aaaaa:MACRO(a, b :, c :)];

After:
  [self aaaaa:MACRO(a, b:, c:)];

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

9 years agoclang-format: Fix indentation of struct definitions with array init.
Daniel Jasper [Mon, 20 Oct 2014 11:12:51 +0000 (11:12 +0000)]
clang-format: Fix indentation of struct definitions with array init.

Before:
  struct {
    int x;
    int y;
  } points[] = {
        {1, 2}, {2, 3},
  };

After:
  struct {
    int x;
    int y;
  } points[] = {
      {1, 2}, {2, 3},
  };

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

9 years agoCommit to test commit access
Evgeny Astigeevich [Mon, 20 Oct 2014 09:15:05 +0000 (09:15 +0000)]
Commit to test commit access

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

9 years agoCodeGen: Update for LLVM API change
David Majnemer [Mon, 20 Oct 2014 06:13:36 +0000 (06:13 +0000)]
CodeGen: Update for LLVM API change

Callers of DataLayout::RoundUpAlignment should switch to
RoundUpToAlignment.

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

9 years ago[modules] Add support for #include_next.
Richard Smith [Mon, 20 Oct 2014 00:15:49 +0000 (00:15 +0000)]
[modules] Add support for #include_next.

#include_next interacts poorly with modules: it depends on where in the list of
include paths the current file was found. Files covered by module maps are not
found in include search paths when building the module (and are not found in
include search paths when @importing the module either), so this isn't really
meaningful. Instead, we fake up the result that #include_next *should* have
given: find the first path that would have resulted in the given file being
picked, and search from there onwards.

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

9 years agoCodeGen: ConstStructBuilder must verify packed constraints after padding
David Majnemer [Sun, 19 Oct 2014 23:40:06 +0000 (23:40 +0000)]
CodeGen: ConstStructBuilder must verify packed constraints after padding

This reverts commit r220169 which reverted r220153.  However, it also
contains additional changes:
- We may need to add padding *after* we've packed the struct.  This
  occurs when the aligned next field offset is greater than the new
  field's offset.  When this occurs, we make the struct packed.
  *However*, once packed the next field offset might be less than the
  new feild's offset.  It is in this case that we might further pad the
  struct.
- We would pad structs which were perfectly sized!  This behavior is
  immensely old.  This behavior came from blindly subtracting
  NextFieldOffsetInChars from RecordSize.  This doesn't take into
  account the fact that the struct might have a greater overall
  alignment than the last field.

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

9 years agoPreprocessor.h: Suppress a warning in SkipMainFilePreamble. [-Wsign-compare]
NAKAMURA Takumi [Sun, 19 Oct 2014 19:58:33 +0000 (19:58 +0000)]
Preprocessor.h: Suppress a warning in SkipMainFilePreamble. [-Wsign-compare]

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

9 years agoRevert r220153: "CodeGen: ConstStructBuilder must verify packed constraints after...
Chandler Carruth [Sun, 19 Oct 2014 19:41:46 +0000 (19:41 +0000)]
Revert r220153: "CodeGen: ConstStructBuilder must verify packed constraints after padding"

This commit caused two tests in LNT to regress. I'm able to reproduce on
any platform and will send reproduction steps to the original commit
log. This should restore the LNT bots that have been failing.

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