]> granicus.if.org Git - clang/log
clang
10 years agoHandle constructors and destructors a bit more uniformly in CodeGen.
Rafael Espindola [Mon, 8 Sep 2014 16:01:27 +0000 (16:01 +0000)]
Handle constructors and destructors a bit more uniformly in CodeGen.

There were code paths that are duplicated for constructors and destructors just
because we have both CXXCtorType and CXXDtorsTypes.

This patch introduces an unified enum and reduces code deplication a bit.

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

10 years agoAdd .clang-tidy configuration file to provide LLVM-optimized defaults for clang-tidy.
Alexander Kornienko [Mon, 8 Sep 2014 13:33:32 +0000 (13:33 +0000)]
Add .clang-tidy configuration file to provide LLVM-optimized defaults for clang-tidy.

Reviewers: chandlerc, djasper, alexfh

Reviewed By: alexfh

Subscribers: cfe-commits

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

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

10 years agoclang/test/CodeGen/builtin-assume*.c: Fixup for -Asserts.
NAKAMURA Takumi [Mon, 8 Sep 2014 01:12:55 +0000 (01:12 +0000)]
clang/test/CodeGen/builtin-assume*.c: Fixup for -Asserts.

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

10 years agoDon't test really-large alignments for now
Hal Finkel [Mon, 8 Sep 2014 00:09:15 +0000 (00:09 +0000)]
Don't test really-large alignments for now

Temporarily comment out the test for really-large powers of two. This seems to
be host-sensitive for some reason... trying to fix the clang-i386-freebsd
builder.

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

10 years agoAdd __builtin_assume and __builtin_assume_aligned using @llvm.assume.
Hal Finkel [Sun, 7 Sep 2014 22:58:14 +0000 (22:58 +0000)]
Add __builtin_assume and __builtin_assume_aligned using @llvm.assume.

This makes use of the recently-added @llvm.assume intrinsic to implement a
__builtin_assume(bool) intrinsic (to provide additional information to the
optimizer). This hooks up __assume in MS-compatibility mode to mirror
__builtin_assume (the semantics have been intentionally kept compatible), and
implements GCC's __builtin_assume_aligned as assume((p - o) & mask == 0). LLVM
now contains special logic to deal with assumptions of this form.

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

10 years agoAdjust test/CodeGenCXX/pr12251.cpp
Hal Finkel [Sun, 7 Sep 2014 21:28:53 +0000 (21:28 +0000)]
Adjust test/CodeGenCXX/pr12251.cpp

InstCombine just got a bit smarter about checking known bits of returned
values, and because this test runs the optimizer, it requires an update. We
should really rewrite this test to directly check the IR output from CodeGen.

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

10 years agoAvoid writing to the test directory as it may not be writable.
David Blaikie [Sun, 7 Sep 2014 17:34:18 +0000 (17:34 +0000)]
Avoid writing to the test directory as it may not be writable.

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

10 years agoFix test to not write output to the test directory, as it may not be writable.
David Blaikie [Sun, 7 Sep 2014 16:59:13 +0000 (16:59 +0000)]
Fix test to not write output to the test directory, as it may not be writable.

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

10 years agoTry to green test/Sema/format-strings.c on Win bots
Hans Wennborg [Sun, 7 Sep 2014 04:03:21 +0000 (04:03 +0000)]
Try to green test/Sema/format-strings.c on Win bots

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

10 years agoMS format strings: parse the 'Z' printf conversion specifier (PR20808)
Hans Wennborg [Sun, 7 Sep 2014 03:03:51 +0000 (03:03 +0000)]
MS format strings: parse the 'Z' printf conversion specifier (PR20808)

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

10 years agoMove x86-specific bits of warn-unused-local-typedef.cpp into their own file.
Nico Weber [Sat, 6 Sep 2014 18:16:37 +0000 (18:16 +0000)]
Move x86-specific bits of warn-unused-local-typedef.cpp into their own file.

That way, most of the test can run everywhere. Also give the new file an x86
triple in addition to a REQUIRES line.

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

10 years agoAttempt to fix ARM bot. (The test references a typedef from x86 asm.)
Nico Weber [Sat, 6 Sep 2014 15:48:53 +0000 (15:48 +0000)]
Attempt to fix ARM bot. (The test references a typedef from x86 asm.)

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

10 years ago[x86] Clean up the x86 builtin specs to reflect r217310 in LLVM which
Chandler Carruth [Sat, 6 Sep 2014 10:30:51 +0000 (10:30 +0000)]
[x86] Clean up the x86 builtin specs to reflect r217310 in LLVM which
made the 8-bit masks actually 8-bit arguments to these intrinsics.

These builtins are a mess. Many were missing the I qualifier which
I added where obviously correct. Most aren't tested, but I've updated
the relevant tests. I've tried to catch all the things that should
become 'c' in this round.

It's also frustrating because the set of these is really ad-hoc and
doesn't really map that cleanly to the set supported by either GCC or
LLVM. Oh well...

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

10 years agoAdd error, recovery and fixit for "~A::A() {...}".
Richard Smith [Sat, 6 Sep 2014 02:06:12 +0000 (02:06 +0000)]
Add error, recovery and fixit for "~A::A() {...}".

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

10 years agoAdd -Wunused-local-typedef, a warning that finds unused local typedefs.
Nico Weber [Sat, 6 Sep 2014 01:25:55 +0000 (01:25 +0000)]
Add -Wunused-local-typedef, a warning that finds unused local typedefs.

The warning warns on TypedefNameDecls -- typedefs and C++11 using aliases --
that are !isReferenced(). Since the isReferenced() bit on TypedefNameDecls
wasn't used for anything before this warning it wasn't always set correctly,
so this patch also adds a few missing MarkAnyDeclReferenced() calls in
various places for TypedefNameDecls.

This is made a bit complicated due to local typedefs possibly being used only
after their local scope has closed. Consider:

    template <class T>
    void template_fun(T t) {
      typename T::Foo s3foo;  // YYY
      (void)s3foo;
    }
    void template_fun_user() {
      struct Local {
        typedef int Foo;  // XXX
      } p;
      template_fun(p);
    }

Here the typedef in XXX is only used at end-of-translation unit, when YYY in
template_fun() gets instantiated. To handle this, typedefs that are unused when
their scope exits are added to a set of potentially unused typedefs, and that
set gets checked at end-of-TU. Typedefs that are still unused at that point then
get warned on. There's also serialization code for this set, so that the
warning works with precompiled headers and modules. For modules, the warning
is emitted when the module is built, for precompiled headers each time the
header gets used.

Finally, consider a function using C++14 auto return types to return a local
type defined in a header:

    auto f() {
      struct S { typedef int a; };
      return S();
    }

Here, the typedef escapes its local scope and could be used by only some
translation units including the header. To not warn on this, add a
RecursiveASTVisitor that marks all delcs on local types returned from auto
functions as referenced. (Except if it's a function with internal linkage, or
the decls are private and the local type has no friends -- in these cases, it
_is_ safe to warn.)

Several of the included testcases (most of the interesting ones) were provided
by Richard Smith.

(gcc's spelling -Wunused-local-typedefs is supported as an alias for this
warning.)

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

10 years agoReword switch/goto diagnostics "protected scope" diagnostics. Making up a term
Richard Smith [Sat, 6 Sep 2014 00:24:58 +0000 (00:24 +0000)]
Reword switch/goto diagnostics "protected scope" diagnostics. Making up a term
"protected scope" is very unhelpful here and actively confuses users. Instead,
simply state the nature of the problem in the diagnostic: we cannot jump from
here to there. The notes explain nicely why not.

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

10 years agoFix r217275 to work without the need for standard headers being included
David Blaikie [Fri, 5 Sep 2014 23:36:59 +0000 (23:36 +0000)]
Fix r217275 to work without the need for standard headers being included

It seems (I guess) in ObjC that va_list is provided without the need for
inclusions. I verified that with this change the test still crashes in
the absence of the fix committed in r217275.

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

10 years agoMove the initialization of VAListTagName after InitializeSema()
Ben Langmuir [Fri, 5 Sep 2014 20:24:27 +0000 (20:24 +0000)]
Move the initialization of VAListTagName after InitializeSema()

This innocuous statement to get the identifier info for __va_list_tag
was causing an assertion failure:
  NextIsPrevious() && "decl became non-canonical unexpectedly"
if the __va_list_tag identifier was found in a PCH in some
circumstances, because it was looked up before the ASTReader had a Sema
object to use to find existing decls to merge with.

We could possibly move getting the identifier info even later, or make
it lazy if we wanted to, but this seemed like the minimal change.

Now why a PCH would have this identifier in the first place is a bit
mysterious. This seems to be related to the global module index in some
way, because when the test case is built without the global module index
it will not emit an identifier for __va_list_tag into the PCH, but with
the global module index it does.

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

10 years agoSeparate the matchers by type and statically dispatch to the right list.
Samuel Benzaquen [Fri, 5 Sep 2014 20:15:31 +0000 (20:15 +0000)]
Separate the matchers by type and statically dispatch to the right list.

Summary:
Separate the matchers by type and statically dispatch to the right list.
For any node type that we support, it reduces the number of matchers we
run it through.
For node types we do not support, it makes match() a noop.
This change improves our clang-tidy related benchmark by ~30%.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

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

10 years agoRequire an x86 target for ms-inline-asm-return.cpp instead of XFAIL
Reid Kleckner [Fri, 5 Sep 2014 20:06:06 +0000 (20:06 +0000)]
Require an x86 target for ms-inline-asm-return.cpp instead of XFAIL

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

10 years ago-frewrite-includes: Normalize line endings to match the main source file
Reid Kleckner [Fri, 5 Sep 2014 16:49:50 +0000 (16:49 +0000)]
-frewrite-includes: Normalize line endings to match the main source file

It is very common to include headers with DOS-style line endings, such
as windows.h, from source files with Unix-style line endings.
Previously, we would end up with mixed line endings and #endifs that
appeared to be on the same line:

  #if 0 /* expanded by -frewrite-includes */
  #include <windows.h>^M#endif /* expanded by -frewrite-includes */

Clang treats either of \r or \n as a line ending character, so this is
purely a cosmetic issue.

This has no automated test because most Unix tools on Windows will
implictly convert CRLF to LF when reading files, making it very hard to
detect line ending mismatches. FileCheck doesn't understand {{\r}}
either.

Fixes PR20552.

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

10 years ago[analyzer] Don't crash if malloc() has an unexpected function prototype.
Jordan Rose [Fri, 5 Sep 2014 16:33:51 +0000 (16:33 +0000)]
[analyzer] Don't crash if malloc() has an unexpected function prototype.

Patch by Daniel Fahlgren!

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

10 years ago[ARMv8] Add support for 32-bit MIN/MAXNM and directed rounding.
James Molloy [Fri, 5 Sep 2014 13:50:34 +0000 (13:50 +0000)]
[ARMv8] Add support for 32-bit MIN/MAXNM and directed rounding.

This patch adds support for the 32bit numeric max/min and directed round-to-integral NEON intrinsics that were added as part of v8, along with unit tests.

Patch by Graham Hunter!

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

10 years agoMark ms-inline-asm as xfail on ARM
Renato Golin [Fri, 5 Sep 2014 13:29:23 +0000 (13:29 +0000)]
Mark ms-inline-asm as xfail on ARM

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

10 years agoclang-format: [JS] Format embedded function literals more efficently.
Daniel Jasper [Fri, 5 Sep 2014 09:27:38 +0000 (09:27 +0000)]
clang-format: [JS] Format embedded function literals more efficently.

Before:
  return {
    a: a,
    link:
        function() {
          f();  //
        },
    link:
        function() {
          f();  //
        }
  };

After:
  return {
    a: a,
    link: function() {
      f();  //
    },
    link: function() {
      f();  //
    }
  };

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

10 years agoclang-format: [JS] JavaScript does not have the */&/&& madness.
Daniel Jasper [Fri, 5 Sep 2014 08:53:45 +0000 (08:53 +0000)]
clang-format: [JS] JavaScript does not have the */&/&& madness.

Before:
  e&& e.SomeFunction();

After:
  e && e.SomeFunction();

Yeah, this might be useful for C++, too, but it is not such a frequent
pattern there (plus the fix is much harder).

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

10 years agoclang-format: [JS] Better support for empty function literals.
Daniel Jasper [Fri, 5 Sep 2014 08:42:27 +0000 (08:42 +0000)]
clang-format: [JS] Better support for empty function literals.

Before:
  SomeFunction(function(){});

After:
  SomeFunction(function() {});

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

10 years agoclang-format: [JS] Fix indentation in dict literals.
Daniel Jasper [Fri, 5 Sep 2014 08:29:31 +0000 (08:29 +0000)]
clang-format: [JS] Fix indentation in dict literals.

Before:
  return {
    'finish':
        //
        a
        };

After:
  return {
    'finish':
        //
        a
  };

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

10 years agoclang/test/CXX/drs/dr5xx.cpp: Fix up assumption of thiscall. It affects not x64 but...
NAKAMURA Takumi [Fri, 5 Sep 2014 08:18:53 +0000 (08:18 +0000)]
clang/test/CXX/drs/dr5xx.cpp: Fix up assumption of thiscall. It affects not x64 but x86.

Note, i686-cygwin doesn't use thiscall.

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

10 years agoRemove suppression of dr547 test and instead test that deduction succeeds if we
Richard Smith [Fri, 5 Sep 2014 00:17:00 +0000 (00:17 +0000)]
Remove suppression of dr547 test and instead test that deduction succeeds if we
use __thiscall. (This doesn't actually work for MSVC; they don't allow the
__thiscall qualifier here, but it's sufficient to demonstrate that we do
implement the intent of the DR.)

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

10 years agounique_ptrify AnalysisConsumer.cpp::CreateUbiViz
David Blaikie [Fri, 5 Sep 2014 00:14:57 +0000 (00:14 +0000)]
unique_ptrify AnalysisConsumer.cpp::CreateUbiViz

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

10 years agoRemove a use of raw pointer ownership (then non-ownership) in TrimmedGraph::popNextRe...
David Blaikie [Fri, 5 Sep 2014 00:11:25 +0000 (00:11 +0000)]
Remove a use of raw pointer ownership (then non-ownership) in TrimmedGraph::popNextReportGraph

(just cleaning up unique_ptr stuff by finding interesting 'reset' calls
at the moment)

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

10 years agoFix comment indentation.
David Blaikie [Fri, 5 Sep 2014 00:07:20 +0000 (00:07 +0000)]
Fix comment indentation.

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

10 years agounique_ptrify ExplodedGraph::trim
David Blaikie [Fri, 5 Sep 2014 00:04:19 +0000 (00:04 +0000)]
unique_ptrify ExplodedGraph::trim

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

10 years agounique_ptrify the result of ConstraintManagerCreator and StoreManagerCreator
David Blaikie [Thu, 4 Sep 2014 23:54:37 +0000 (23:54 +0000)]
unique_ptrify the result of ConstraintManagerCreator and StoreManagerCreator

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

10 years agounique_ptrify BugReporter::visitors
David Blaikie [Thu, 4 Sep 2014 23:54:33 +0000 (23:54 +0000)]
unique_ptrify BugReporter::visitors

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

10 years agoclang/test/CXX/drs/dr5xx.cpp: Suppress dr547 also for MinGW
Hans Wennborg [Thu, 4 Sep 2014 23:48:47 +0000 (23:48 +0000)]
clang/test/CXX/drs/dr5xx.cpp: Suppress dr547 also for MinGW

This is a follow-up to r216841.

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

10 years agoStop double visiting some expressions during self reference checking.
Richard Trieu [Thu, 4 Sep 2014 23:19:34 +0000 (23:19 +0000)]
Stop double visiting some expressions during self reference checking.

Originally, self reference checking made a double pass over some expressions
to handle reference type checking.  Now, allow HandleValue to also check
reference types, and fallback to Visit for unhandled expressions.

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

10 years agoDon't allow inline asm statements to reference parameters in naked functions
Hans Wennborg [Thu, 4 Sep 2014 22:16:48 +0000 (22:16 +0000)]
Don't allow inline asm statements to reference parameters in naked functions

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

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

10 years agoDon't allow non-ASM statements in naked functions
Hans Wennborg [Thu, 4 Sep 2014 22:16:40 +0000 (22:16 +0000)]
Don't allow non-ASM statements in naked functions

Naked functions don't have prologues or epilogues, so doing
codegen for anything other than inline assembly would be completely
hit or miss.

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

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

10 years agoDon't emit prologues or epilogues for naked functions (PR18791, PR20028)
Hans Wennborg [Thu, 4 Sep 2014 22:16:33 +0000 (22:16 +0000)]
Don't emit prologues or epilogues for naked functions (PR18791, PR20028)

For naked functions with parameters, Clang would still emit stores in the prologue
that would clobber the stack, because LLVM doesn't set up a stack frame. (This
shows up in -O0 compiles, because the stores are optimized away otherwise.)

For example:

  __attribute__((naked)) int f(int x) {
    asm("movl $42, %eax");
    asm("retl");
  }

Would result in:

  _Z1fi:
  movl    12(%esp), %eax
  movl    %eax, (%esp)    <--- Oops.
  movl    $42, %eax
  retl

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

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

10 years agoPR20844: If we fail to list-initialize a reference, map to the referenced type
Richard Smith [Thu, 4 Sep 2014 22:13:39 +0000 (22:13 +0000)]
PR20844: If we fail to list-initialize a reference, map to the referenced type
before retrying the initialization to produce diagnostics. Otherwise, we may
fail to produce any diagnostics, and silently produce invalid AST in a -Asserts
build. Also add a note to this codepath to make it more clear why we were
trying to create a temporary.

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

10 years agoMS format strings: allow the 'h' length modifier with C, C, s and S (PR20808)
Hans Wennborg [Thu, 4 Sep 2014 21:39:52 +0000 (21:39 +0000)]
MS format strings: allow the 'h' length modifier with C, C, s and S (PR20808)

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

10 years agoMS format strings: support the 'w' length modifier (PR20808)
Hans Wennborg [Thu, 4 Sep 2014 21:39:46 +0000 (21:39 +0000)]
MS format strings: support the 'w' length modifier (PR20808)

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

10 years agoAdd triple to ms-inline-asm-return.cpp test
Reid Kleckner [Thu, 4 Sep 2014 20:16:12 +0000 (20:16 +0000)]
Add triple to ms-inline-asm-return.cpp test

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

10 years agoMS inline asm: Allow __asm blocks to set a return value
Reid Kleckner [Thu, 4 Sep 2014 20:04:38 +0000 (20:04 +0000)]
MS inline asm: Allow __asm blocks to set a return value

If control falls off the end of a function after an __asm block, MSVC
assumes that the inline assembly filled the EAX and possibly EDX
registers with an appropriate return value. This functionality is used
in inline functions returning 64-bit integers in system headers, so we
need some amount of compatibility.

This is implemented in Clang by adding extra output constraints to every
inline asm block, and storing the resulting output registers into the
return value slot. If we see an asm block somewhere in the function
body, we emit a normal epilogue instead of marking the end of the
function with a return type unreachable.

Normal returns in functions not using this functionality will overwrite
the return value slot, and in most cases LLVM should be able to
eliminate the dead stores.

Fixes PR17201.

Reviewed By: majnemer

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

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

10 years agoclang-format: [JS] Support alternative operator names as identifiers.
Daniel Jasper [Thu, 4 Sep 2014 18:23:42 +0000 (18:23 +0000)]
clang-format: [JS] Support alternative operator names as identifiers.

Before:
  not. and . or . not_eq = 1;

After:
  not.and.or.not_eq = 1;

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

10 years agoWin64: Add the uwtable attribute by default on Win64
Reid Kleckner [Thu, 4 Sep 2014 18:13:12 +0000 (18:13 +0000)]
Win64: Add the uwtable attribute by default on Win64

Now that LLVM emits correct .pdata and .xdata for inline functions, we
can reenable this.

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

10 years agoMS inline asm: Add a test for xgetbv clobbers
Reid Kleckner [Thu, 4 Sep 2014 16:58:47 +0000 (16:58 +0000)]
MS inline asm: Add a test for xgetbv clobbers

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

10 years agounique_ptrify JobList::Jobs
David Blaikie [Thu, 4 Sep 2014 16:04:28 +0000 (16:04 +0000)]
unique_ptrify JobList::Jobs

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

10 years agoFix the clang -Werror build after r217152 by flagging a polymorphically used but...
David Blaikie [Thu, 4 Sep 2014 16:01:24 +0000 (16:01 +0000)]
Fix the clang -Werror build after r217152 by flagging a polymorphically used but statically owned hierarchy with a protected base dtor and final classes to satisfy -Wnon-virtual-dtor

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

10 years agoFix double full-stop that was accidentally added in r217160.
Daniel Sanders [Thu, 4 Sep 2014 15:07:43 +0000 (15:07 +0000)]
Fix double full-stop that was accidentally added in r217160.

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

10 years ago[mips] Mark aggregates returned in registers with the 'inreg' attribute.
Daniel Sanders [Thu, 4 Sep 2014 15:05:39 +0000 (15:05 +0000)]
[mips] Mark aggregates returned in registers with the 'inreg' attribute.

Summary:
This allows us to easily find them in the backend after the aggregates have
been lowered to other types. This is important on big-endian targets using
the N32/N64 ABI's since these ABI's must shift small structures into the
upper bits of the register.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: llvm-commits

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

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

10 years agoclang-format: [JS] Supprot "catch" as function name.
Daniel Jasper [Thu, 4 Sep 2014 15:03:34 +0000 (15:03 +0000)]
clang-format: [JS] Supprot "catch" as function name.

Before:
  someObject.catch ();

After:
  someObject.catch();

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

10 years agoclang-format: [JS] Support comments in dict literals.
Daniel Jasper [Thu, 4 Sep 2014 14:58:30 +0000 (14:58 +0000)]
clang-format: [JS] Support comments in dict literals.

Before:
  var stuff = {
    // comment for update
    update : false,
             // comment for update
    modules : false,
              // comment for update
    tasks : false
  };

After:
  var stuff = {
    // comment for update
    update : false,
    // comment for update
    modules : false,
    // comment for update
    tasks : false
  };

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

10 years agoRefactor VariantMatcher::MatcherOps to reduce the amount of generated code.
Samuel Benzaquen [Thu, 4 Sep 2014 14:13:58 +0000 (14:13 +0000)]
Refactor VariantMatcher::MatcherOps to reduce the amount of generated code.

Summary:
Refactor VariantMatcher::MatcherOps to reduce the amount of generated code.
 - Make some code type agnostic and move it to the cpp file.
 - Return a DynTypedMatcher instead of storing the object in MatcherOps.

This change reduces the number of symbols generated in Registry.cpp by
~19%, the object byte size by ~17% and the compilation time (in non-release mode) by ~20%.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

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

10 years ago[mips] Zero-sized structs cannot be ignored in MipsABIInfo::classifyReturnType()...
Daniel Sanders [Thu, 4 Sep 2014 13:28:14 +0000 (13:28 +0000)]
[mips] Zero-sized structs cannot be ignored in MipsABIInfo::classifyReturnType() for O32

Summary:
They are returned indirectly which causes the other arguments to move to
the next argument slot.

With this, utils/ABITest does not discover any failing cases in the first
500 attempts on big/little endian for O32. Previously some of these failed.
Also tested N32/N64 little endian (big endian has other known issues) with
no issues.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: atanasyan, cfe-commits

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

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

10 years agoARM: Default to apcs-gnu ABI for NetBSD
Oliver Stannard [Thu, 4 Sep 2014 10:38:53 +0000 (10:38 +0000)]
ARM: Default to apcs-gnu ABI for NetBSD

r216662 changed the default ABI for 32-bit ARM targets to be "aapcs"
when no environment is given in the triple, however NetBSD requires it
to be "apcs-gnu".

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

10 years agoAdd matcher for linkage specification
Manuel Klimek [Thu, 4 Sep 2014 08:51:06 +0000 (08:51 +0000)]
Add matcher for linkage specification

Patch by Jacques Pienaar.

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

10 years agoAdjust test to handle fallout from r217102.
David Majnemer [Wed, 3 Sep 2014 23:20:58 +0000 (23:20 +0000)]
Adjust test to handle fallout from r217102.

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

10 years ago[modules] Make NamespaceAliasDecl redeclarable, as it should be. This fixes
Richard Smith [Wed, 3 Sep 2014 23:11:22 +0000 (23:11 +0000)]
[modules] Make NamespaceAliasDecl redeclarable, as it should be. This fixes
merging of namespace aliases across modules and improves source fidelity.
Incidentally also fixes PR20816.

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

10 years agoAdd ubsan/not_ubsan features to Clang lit tests and use
Alexey Samsonov [Wed, 3 Sep 2014 19:46:32 +0000 (19:46 +0000)]
Add ubsan/not_ubsan features to Clang lit tests and use
them to exclude tests with large stack usage from UBSan bootstrap.

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

10 years agoFix member function call on null pointer in Sema::FindInstantiatedDecl.
Alexey Samsonov [Wed, 3 Sep 2014 18:45:45 +0000 (18:45 +0000)]
Fix member function call on null pointer in Sema::FindInstantiatedDecl.

This bug was reported by UBSan.

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

10 years agoEnhance the 'Vectors and Extended Vectors' section.
Anton Yartsev [Wed, 3 Sep 2014 17:59:21 +0000 (17:59 +0000)]
Enhance the 'Vectors and Extended Vectors' section.

Added cast operations to the table of vector operations. Supported status 'no' means that there are no tests in the Clang test suite for the given cast.

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

10 years agoUpdate for LLVM api change.
Rafael Espindola [Wed, 3 Sep 2014 17:31:52 +0000 (17:31 +0000)]
Update for LLVM api change.

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

10 years agoFix indentation. No behavior change.
Nico Weber [Wed, 3 Sep 2014 15:28:00 +0000 (15:28 +0000)]
Fix indentation. No behavior change.

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

10 years agoSplit off CUDA-specific Sema parts to a new file
Eli Bendersky [Wed, 3 Sep 2014 15:27:03 +0000 (15:27 +0000)]
Split off CUDA-specific Sema parts to a new file

In line with SemaOpenMP.cpp, etc. CUDA-specific semantic analysis code goes into
a separate file. This is in anticipation of adding extra functionality here in
the near future.

No change in functionality.

Review: http://reviews.llvm.org/D5160

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

10 years agoCGBuiltin: Use @llvm.fabs rather than fabs libcall when emitting builtins
Tom Stellard [Wed, 3 Sep 2014 15:24:29 +0000 (15:24 +0000)]
CGBuiltin: Use @llvm.fabs rather than fabs libcall when emitting builtins

Using the intrinsic allows the SelectionDAGBuilder to turn this call
into the FABS Node and also the intrinsic is something the vectorizer knows
how to vectorize.

This patch also sets the readnone attribute on this call, which should
enable additional optmizations.

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

10 years agoFix configure and make build of clang-interpreter.
Iain Sandoe [Wed, 3 Sep 2014 13:13:50 +0000 (13:13 +0000)]
Fix configure and make build of clang-interpreter.

Replaced 'jit' link component with 'mcjit'.
Updated the required libraries.

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

10 years agoASTMatchers: Add a matcher to detect whether a decl or stmt is inside a template...
Benjamin Kramer [Wed, 3 Sep 2014 12:08:14 +0000 (12:08 +0000)]
ASTMatchers: Add a matcher to detect whether a decl or stmt is inside a template instantiation.

This is hoisted from clang-tidy where it's used everywhere. The implementation
is not particularly efficient right now, but there is no easy fix for that.

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

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

10 years agoParse: Replace polymorphic functor objects with lambdas and llvm::function_ref.
Benjamin Kramer [Wed, 3 Sep 2014 11:06:10 +0000 (11:06 +0000)]
Parse: Replace polymorphic functor objects with lambdas and llvm::function_ref.

No change in functionality.

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

10 years agoclang-format: Add an option 'SpaceAfterCStyleCast'.
Daniel Jasper [Wed, 3 Sep 2014 07:37:29 +0000 (07:37 +0000)]
clang-format: Add an option 'SpaceAfterCStyleCast'.

This permits to add a space after closing parenthesis of a C-style cast.
Defaults to false to preserve old behavior.

Fixes llvm.org/PR19982.

Before:
  (int)i;

After:
  (int) i;

Patch by Marek Kurdej.

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

10 years agoAllow a scoped lockable object to acquire/release multiple locks.
Ed Schouten [Wed, 3 Sep 2014 06:00:11 +0000 (06:00 +0000)]
Allow a scoped lockable object to acquire/release multiple locks.

Scoped lockable objects (mutex guards) are implemented as if it is a
lock itself that is acquired upon construction and unlocked upon
destruction. As it if course needs to be used to actually lock down
something else (a mutex), it keeps track of this knowledge through its
underlying mutex field in its FactEntry.

The problem with this approach is that this only allows us to lock down
a single mutex, so extend the code to use a vector of underlying
mutexes. This, however, makes the code a bit more complex than
necessary, so subclass FactEntry into LockableFactEntry and
ScopedLockableFactEntry and move all the logic that differs between
regular locks and scoped lockables into member functions.

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

10 years ago[modules] Use DeclContext::equals rather than == on DeclContext* when
Richard Smith [Wed, 3 Sep 2014 02:33:22 +0000 (02:33 +0000)]
[modules] Use DeclContext::equals rather than == on DeclContext* when
determining whether a declaration is out of line, instead of assuming
that the semantic and lexical DeclContext will be the same declaration
whenever they're the same entity.

This fixes behavior of declarations within merged classes and enums.

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

10 years agoReinstate "Update for llvm API change.""
Eric Christopher [Tue, 2 Sep 2014 22:35:49 +0000 (22:35 +0000)]
Reinstate "Update for llvm API change.""

This reinstates r215113.

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

10 years agoFix up formatting.
Eli Bendersky [Tue, 2 Sep 2014 22:00:06 +0000 (22:00 +0000)]
Fix up formatting.

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

10 years agoAvoid test failure on platforms where size_t is long long (and thus can't be
Richard Smith [Tue, 2 Sep 2014 21:39:21 +0000 (21:39 +0000)]
Avoid test failure on platforms where size_t is long long (and thus can't be
directly written in strictly-conforming source code).

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

10 years agoAdd --analyze to clang-cl
Reid Kleckner [Tue, 2 Sep 2014 21:35:28 +0000 (21:35 +0000)]
Add --analyze to clang-cl

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

10 years agoTests for DR550-572.
Richard Smith [Tue, 2 Sep 2014 21:29:16 +0000 (21:29 +0000)]
Tests for DR550-572.

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

10 years agoUse /usr/bin/env python instead of /usr/bin/python.
Ed Schouten [Tue, 2 Sep 2014 20:59:13 +0000 (20:59 +0000)]
Use /usr/bin/env python instead of /usr/bin/python.

On operating systems like the BSDs, it is typically the case that
/usr/bin/python does not exist. We should therefore use /usr/bin/env
instead. This is also done in various other scripts in tools/.

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

10 years agoDon't indent inside a namespace.
Rafael Espindola [Tue, 2 Sep 2014 19:37:08 +0000 (19:37 +0000)]
Don't indent inside a namespace.

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

10 years agoDon't allow lambdas to capture invalid decls during template instantiations.
Richard Trieu [Tue, 2 Sep 2014 19:32:44 +0000 (19:32 +0000)]
Don't allow lambdas to capture invalid decls during template instantiations.

Fixes PR20731.

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

10 years agoFixing a typo in the documented __builtin_convertvector example.
Yunzhong Gao [Tue, 2 Sep 2014 19:24:14 +0000 (19:24 +0000)]
Fixing a typo in the documented __builtin_convertvector example.
  "vf[0]" ==> "vs[0]"

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

10 years agoFix for LLVM API change to SpecialCaseList::create
David Blaikie [Tue, 2 Sep 2014 18:13:58 +0000 (18:13 +0000)]
Fix for LLVM API change to SpecialCaseList::create

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

10 years agoTest cleanup: move CHECK close to code.
Rafael Espindola [Mon, 1 Sep 2014 22:29:32 +0000 (22:29 +0000)]
Test cleanup: move CHECK close to code.

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

10 years agoFrontend: Reindent Opts.CoverageFile
David Majnemer [Mon, 1 Sep 2014 18:50:05 +0000 (18:50 +0000)]
Frontend: Reindent Opts.CoverageFile

No functional change intended.

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

10 years agoMS ABI: Reindent MicrosoftCXXABI::GetVirtualBaseClassOffset
David Majnemer [Mon, 1 Sep 2014 18:50:02 +0000 (18:50 +0000)]
MS ABI: Reindent MicrosoftCXXABI::GetVirtualBaseClassOffset

No functional change intended.

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

10 years agoTypo fix, no functionality change.
Alexander Potapenko [Mon, 1 Sep 2014 12:35:57 +0000 (12:35 +0000)]
Typo fix, no functionality change.

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

10 years agoclang/test/CXX/drs/dr5xx.cpp: Suppress dr547 for targeting MSVC x86 for now, due...
NAKAMURA Takumi [Sun, 31 Aug 2014 12:21:50 +0000 (12:21 +0000)]
clang/test/CXX/drs/dr5xx.cpp: Suppress dr547 for targeting MSVC x86 for now, due to incompatibility of attribute(thiscall).

With targeting i686-win32,

  error: 'error' diagnostics seen but not expected:
    File clang/test/CXX/drs/dr5xx.cpp Line 521: implicit instantiation of undefined template 'dr547::X<void () __attribute__((thiscall)) const>'
    File clang/test/CXX/drs/dr5xx.cpp Line 518: implicit instantiation of undefined template 'dr547::X<void () __attribute__((thiscall)) const>'
    File clang/test/CXX/drs/dr5xx.cpp Line 518: implicit instantiation of undefined template 'dr547::X<void () __attribute__((thiscall)) const>'
  error: 'note' diagnostics seen but not expected:
    File clang/test/CXX/drs/dr5xx.cpp Line 516: template is declared here
    File clang/test/CXX/drs/dr5xx.cpp Line 521: in instantiation of function template specialization 'dr547::f<void () __attribute__((thiscall)) const, dr547::S>' requested here
    File clang/test/CXX/drs/dr5xx.cpp Line 516: template is declared here
    File clang/test/CXX/drs/dr5xx.cpp Line 516: template is declared here
  7 errors generated.

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

10 years agocxx_status: we did support some of C++14 in Clang 3.3.
Richard Smith [Sun, 31 Aug 2014 04:18:54 +0000 (04:18 +0000)]
cxx_status: we did support some of C++14 in Clang 3.3.

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

10 years agocxx_status: the name C++14 isn't provisional any more.
Richard Smith [Sun, 31 Aug 2014 04:17:48 +0000 (04:17 +0000)]
cxx_status: the name C++14 isn't provisional any more.

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

10 years agoTests for DR525-550.
Richard Smith [Sun, 31 Aug 2014 03:06:20 +0000 (03:06 +0000)]
Tests for DR525-550.

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

10 years agoclang/test/CodeGenCXX/debug-info-access.cpp: Use %itanium_abi_triple to appease msvc...
NAKAMURA Takumi [Sun, 31 Aug 2014 00:27:00 +0000 (00:27 +0000)]
clang/test/CodeGenCXX/debug-info-access.cpp: Use %itanium_abi_triple to appease msvc. "[def] [free]" can be seen in different order.

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

10 years agoFix some cases where StringRef was being passed by const reference. Remove const...
Craig Topper [Sat, 30 Aug 2014 16:55:52 +0000 (16:55 +0000)]
Fix some cases where StringRef was being passed by const reference. Remove const from some other StringRefs since its implicitly const already.

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

10 years agoUse llvm::makeArrayRef instead of explicitly calling ArrayRef constructor and mention...
Craig Topper [Sat, 30 Aug 2014 16:55:39 +0000 (16:55 +0000)]
Use llvm::makeArrayRef instead of explicitly calling ArrayRef constructor and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>.

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

10 years agoCleanup test.
Rafael Espindola [Sat, 30 Aug 2014 00:15:37 +0000 (00:15 +0000)]
Cleanup test.

This should make it easier to add more tests to this file.

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

10 years ago[modules] Fix deserialization cycle when loading a tag declaration with a typedef...
Richard Smith [Sat, 30 Aug 2014 00:04:23 +0000 (00:04 +0000)]
[modules] Fix deserialization cycle when loading a tag declaration with a typedef name for linkage purposes. When loading the type, delay loading its typedef until we've finished loading and merging the type. In its place, save out the name of the typedef, which we need for merging purposes.

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

10 years agoCleanup the test a bit. It was too dependent on the output order.
Rafael Espindola [Fri, 29 Aug 2014 23:45:52 +0000 (23:45 +0000)]
Cleanup the test a bit. It was too dependent on the output order.

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

10 years agoDebug info: Only emit C++ accessibility specifiers when they are diverging
Adrian Prantl [Fri, 29 Aug 2014 22:44:27 +0000 (22:44 +0000)]
Debug info: Only emit C++ accessibility specifiers when they are diverging
from the default for the containing type.

rdar://problem/18154959

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

10 years agoAdd some missing test coverage for merging 'extern "C"' functions with modules.
Richard Smith [Fri, 29 Aug 2014 22:33:38 +0000 (22:33 +0000)]
Add some missing test coverage for merging 'extern "C"' functions with modules.

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