]> granicus.if.org Git - clang/log
clang
9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

10 years agoFix my broken test cases.
Reid Kleckner [Fri, 29 Aug 2014 22:06:20 +0000 (22:06 +0000)]
Fix my broken test cases.

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

10 years agounique_ptrify PTHManager's PerIDCache using the newly added llvm::FreeDeleter
David Blaikie [Fri, 29 Aug 2014 22:04:45 +0000 (22:04 +0000)]
unique_ptrify PTHManager's PerIDCache using the newly added llvm::FreeDeleter

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

10 years agounique_ptrify some parameters to PTHManager::PTHManager
David Blaikie [Fri, 29 Aug 2014 22:04:40 +0000 (22:04 +0000)]
unique_ptrify some parameters to PTHManager::PTHManager

A couple of these arguments were passed by void* as a rather extreme
example of pimpling. Adjusting this to a more classic form of the idiom
(involving forward declarations) makes this more legible and allows
explicit passing of ownership via std::unique_ptr.

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

10 years agoFixup for r216763. Add a driver test.
Anna Zaks [Fri, 29 Aug 2014 21:51:22 +0000 (21:51 +0000)]
Fixup for r216763. Add a driver test.

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

10 years agoMake all virtual member pointers use variadic musttail calls
Reid Kleckner [Fri, 29 Aug 2014 21:43:29 +0000 (21:43 +0000)]
Make all virtual member pointers use variadic musttail calls

This avoids encoding information about the function prototype into the
thunk at the cost of some function prototype bitcast gymnastics.

Fixes PR20653.

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

10 years agoFix for PR20660, where unexpanded parameter pack in function parameter clause causes...
Larisse Voufo [Fri, 29 Aug 2014 21:08:16 +0000 (21:08 +0000)]
Fix for PR20660, where unexpanded parameter pack in function parameter clause causes clang to crash.

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

10 years agoAdd a comment, no functional change.
Nico Weber [Fri, 29 Aug 2014 21:05:44 +0000 (21:05 +0000)]
Add a comment, no functional change.

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

10 years agoObjective-C [qoi]. If property is going to be implemented
Fariborz Jahanian [Fri, 29 Aug 2014 20:29:31 +0000 (20:29 +0000)]
Objective-C [qoi]. If property is going to be implemented
in the super class, do not issue the warning about property
in current class's protocol will not be auto synthesized.
// rdar://18179833

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

10 years agounique_ptrify the raw_ostream argument to clang::serialized_diags::create
David Blaikie [Fri, 29 Aug 2014 20:17:13 +0000 (20:17 +0000)]
unique_ptrify the raw_ostream argument to clang::serialized_diags::create

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

10 years agounique_ptrify clang::ento::createCheckerManager
David Blaikie [Fri, 29 Aug 2014 20:11:03 +0000 (20:11 +0000)]
unique_ptrify clang::ento::createCheckerManager

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

10 years agounique_ptrify PathDiagnosticConsumer::HandlePathDiagnostic
David Blaikie [Fri, 29 Aug 2014 20:06:10 +0000 (20:06 +0000)]
unique_ptrify PathDiagnosticConsumer::HandlePathDiagnostic

FoldingSet, another intrusive data structure that could use some
unique_ptr love on its interfaces. Eventually.

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

10 years agoAdd an option to silence all analyzer warnings.
Anna Zaks [Fri, 29 Aug 2014 20:01:38 +0000 (20:01 +0000)]
Add an option to silence all analyzer warnings.

People have been incorrectly using "-analyzer-disable-checker" to
silence analyzer warnings on a file, when analyzing a project. Add
the "-analyzer-disable-all-checks" option, which would allow the
suppression and suggest it as part of the error message for
"-analyzer-disable-checker". The idea here is to compose this with
"--analyze" so that users can selectively opt out specific files from
static analysis.

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

10 years agounique_ptrify thep passing of BugReports to BugReportEquivClass
David Blaikie [Fri, 29 Aug 2014 19:57:52 +0000 (19:57 +0000)]
unique_ptrify thep passing of BugReports to BugReportEquivClass

I suspect llvm::ilist should take elements by unique_ptr, since it does
take ownership of the element (by stitching it into the linked list) -
one day.

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

10 years agounique_ptrify HeaderMap::FileBuffer
David Blaikie [Fri, 29 Aug 2014 19:51:32 +0000 (19:51 +0000)]
unique_ptrify HeaderMap::FileBuffer

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

10 years agounique_ptrify Preprocessor's TokenLexerCache
David Blaikie [Fri, 29 Aug 2014 19:36:52 +0000 (19:36 +0000)]
unique_ptrify Preprocessor's TokenLexerCache

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

10 years agounique_ptrify the result of CFG::buildCFG/CFGBuilder::buildCFG
David Blaikie [Fri, 29 Aug 2014 18:53:26 +0000 (18:53 +0000)]
unique_ptrify the result of CFG::buildCFG/CFGBuilder::buildCFG

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

10 years agounique_ptrify the diagnostics in CXDiagnosticSetImpl
David Blaikie [Fri, 29 Aug 2014 18:43:24 +0000 (18:43 +0000)]
unique_ptrify the diagnostics in CXDiagnosticSetImpl

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

10 years agoObjective-C. Tweak diagnosing properties that are not auto-synthesized.
Fariborz Jahanian [Fri, 29 Aug 2014 18:31:16 +0000 (18:31 +0000)]
Objective-C. Tweak diagnosing properties that are not auto-synthesized.
Do not warn when property declared in class's protocol will be auto-synthesized
by its uper class implementation because super class has also declared this
property while this class has not. Continue to warn if current class
has declared the property also (because this declaration will not result
in a 2nd synthesis).
rdar://18152478

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

10 years agounique_ptrify PathDiagnostic::setEndOfPath's argument
David Blaikie [Fri, 29 Aug 2014 18:18:47 +0000 (18:18 +0000)]
unique_ptrify PathDiagnostic::setEndOfPath's argument

Again, if shared ownership is the right model here (I assume it is,
given graph algorithms & such) this could be tidied up (the 'release'
call removed in favor of something safer) by having
IntrunsiveRefCntPointer constructible from a unique_ptr.

(& honestly I'd probably favor taking a page out of shared_ptr's book,
allowing implicit construction from a unique_ptr rvalue, and only allow
explicit from a raw pointer - currently IntrusiveRefCntPointer can
implicitly own from a raw pointer, which seems unsafe)

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

10 years agounique_ptr-ify PathDiagnosticPiece ownership
David Blaikie [Fri, 29 Aug 2014 18:18:43 +0000 (18:18 +0000)]
unique_ptr-ify PathDiagnosticPiece ownership

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

10 years agoCheck in a test case for the problem with late-dropped dllimport (PR20803)
Hans Wennborg [Fri, 29 Aug 2014 17:36:11 +0000 (17:36 +0000)]
Check in a test case for the problem with late-dropped dllimport (PR20803)

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

10 years agoOne other BuryPointer of a unique_ptr cleanup.
David Blaikie [Fri, 29 Aug 2014 17:02:26 +0000 (17:02 +0000)]
One other BuryPointer of a unique_ptr cleanup.

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

10 years agoProvide a BuryPointer for unique_ptrs.
David Blaikie [Fri, 29 Aug 2014 16:53:14 +0000 (16:53 +0000)]
Provide a BuryPointer for unique_ptrs.

In theory, it'd be nice if we could move to a case where all buried
pointers were buried via unique_ptr to demonstrate that the program had
finished with the value (that we could really have cleanly deallocated
it) but instead chose to bury it.

I think the main reason that's not possible right now is the various
IntrusiveRefCntPtrs in the Frontend, sharing ownership for a variety of
compiler bits (see the various similar
"CompilerInstance::releaseAndLeak*" functions). I have yet to figure out
their correct ownership semantics - but perhaps, even if the
intrusiveness can be removed, the shared ownership may yet remain and
that would lead to a non-unique burying as is there today. (though we
could model that a little better - by passing in a shared_ptr, etc -
rather than needing the two step that's currently used in those other
releaseAndLeak* functions)

This might be a bit more robust if BuryPointer took the boolean:

BuryPointer(bool, unique_ptr<T>)

and the choice to bury was made internally - that way, even when
DisableFree was not set, the unique_ptr would still be null in the
caller and there'd be no chance of accidentally having a different
codepath where the value is used after burial in !DisableFree, but it
becomes null only in DisableFree, etc...

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

10 years agounique_ptrify Directives in VerifyDiagnosticConsumer
David Blaikie [Fri, 29 Aug 2014 16:30:23 +0000 (16:30 +0000)]
unique_ptrify Directives in VerifyDiagnosticConsumer

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

10 years agoclang-format: Fix unary operator detection in corner case.
Daniel Jasper [Fri, 29 Aug 2014 12:54:38 +0000 (12:54 +0000)]
clang-format: Fix unary operator detection in corner case.

Before:
  decltype(* ::std::declval<const T &>()) void F();

After:
  decltype(*::std::declval<const T &>()) void F();

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

10 years agoASTMatchers: Replace some copies of the bound nodes tree builder with moves.
Benjamin Kramer [Fri, 29 Aug 2014 11:22:47 +0000 (11:22 +0000)]
ASTMatchers: Replace some copies of the bound nodes tree builder with moves.

But don't move if all we do is clearing the thing. The move method is too large
to be inlined and performs a ton of unnecessary checking when the RHS is empty.

No functionality change.

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

10 years agoUse store size instead of alloc size when coercing.
James Molloy [Fri, 29 Aug 2014 10:17:52 +0000 (10:17 +0000)]
Use store size instead of alloc size when coercing.

Previously, EnterStructPointerForCoercedAccess used Alloc size when determining how to convert. This was problematic, because there were situations were the alloc size was larger than the store size. For example, if the first element of a structure were i24 and the destination type were i32, the old code would generate a GEP and a load i24. The code should compare store sizes to ensure the whole object is loaded. I have attached a test case.

This patch modifies the output of arm64-be-bitfield.c test case, but the new IR seems to be equivalent, and after -O3, the compiler generates identical ARM assembly. (asr x0, x0, #54)

Patch by Thomas Jablin!

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

10 years agounique_ptrify SourceManager::createFileID
David Blaikie [Fri, 29 Aug 2014 07:59:55 +0000 (07:59 +0000)]
unique_ptrify SourceManager::createFileID

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

10 years agoCodeGen: Don't completely mess-up optimized atomic libcalls
David Majnemer [Fri, 29 Aug 2014 07:27:49 +0000 (07:27 +0000)]
CodeGen: Don't completely mess-up optimized atomic libcalls

Summary:
We did a great job getting this wrong:
- We messed up which LLVM IR types to use for arguments and return values.
  The optimized libcalls use integer types for values.

  Clang attempted to use the IR type which corresponds to the value
  passed in instead of using an appropriately sized integer type.  This
  would result in violations of the ABI for, as an example, floating
  point types.
- We didn't bother recording the result of the atomic libcall in the
  destination memory.

Instead, call the functions with arguments matching the type of the
libcall prototype's parameters.

This fixes PR20780.

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

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

10 years agounique_ptrify Driver Action handling
David Blaikie [Fri, 29 Aug 2014 07:25:23 +0000 (07:25 +0000)]
unique_ptrify Driver Action handling

It hits a limit when we reach ActionList, which is used for dynamic
conditional ownership, so we lose type safety there.

This did expose at least one caller "lying" about ownership (passing
ownership to an Action, then updating the Action to specify that it
doesn't actually own the thing that was passed) - changing this to
unique_ptr just makes that oddity more obvious.

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

10 years agoImprove unique_ptr-y ownership in ASTUnit::ComputePreamble
David Blaikie [Fri, 29 Aug 2014 06:34:53 +0000 (06:34 +0000)]
Improve unique_ptr-y ownership in ASTUnit::ComputePreamble

Rather than having a pair of pairs and a reference out parameter, build
a structure with everything together and named. A raw pointer and a
unique_ptr, rather than a raw pointer and a boolean, are used to
communicate ownership transfer.

It's possible one day we'll end up with a conditional pointer (probably
represented by a raw pointer and a boolean) abstraction to use in places
like this. Conditional ownership seems to be coming up more often than
I'd hoped...

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

10 years agoUse llvm::makeArrayRef instead of explicitly calling ArrayRef constructor and mention...
Craig Topper [Fri, 29 Aug 2014 06:05:01 +0000 (06:05 +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@216710 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agounique_ptrify clang::BackendConsumer::takeModule
David Blaikie [Fri, 29 Aug 2014 05:08:19 +0000 (05:08 +0000)]
unique_ptrify clang::BackendConsumer::takeModule

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

10 years agocall __asan_load_cxx_array_cookie when loading array cookie in asan mode.
Kostya Serebryany [Fri, 29 Aug 2014 01:01:32 +0000 (01:01 +0000)]
call __asan_load_cxx_array_cookie when loading array cookie in asan mode.

Summary:
The current implementation of asan cookie is incorrect:
we add nosanitize metadata to the cookie load, but the metadata may be lost
and we will instrument the load from poisoned memory.
This change replaces the load with a call to __asan_load_cxx_array_cookie (r216692)

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

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

10 years agoIntroduce -DLLVM_USE_SANITIZER=Undefined CMake option to build UBSan-ified version...
Alexey Samsonov [Fri, 29 Aug 2014 00:50:36 +0000 (00:50 +0000)]
Introduce -DLLVM_USE_SANITIZER=Undefined CMake option to build UBSan-ified version of LLVM/Clang.

I've fixed most of the simple bugs and currently "check-llvm" test suite
has 26 failures, and "check-clang" suite has 5 failures.

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

10 years agoBetter codegen support for DLL attributes being dropped after the first declaration...
Hans Wennborg [Fri, 29 Aug 2014 00:16:06 +0000 (00:16 +0000)]
Better codegen support for DLL attributes being dropped after the first declaration (PR20792)

For the following code:

  __declspec(dllimport) int f(int x);
  int user(int x) {
    return f(x);
  }
  int f(int x) { return 1; }

Clang will drop the dllimport attribute in the AST, but CodeGen would have
already put it on the LLVM::Function, and that would never get updated.
(The same thing happens for global variables.)

This makes Clang check dropped DLL attribute case each time the LLVM object
is referenced.

This isn't perfect, because we will still get it wrong if the function is
never referenced by codegen after the attribute is dropped, but this handles
the common cases and makes us not fail in the verifier.

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

10 years agoDon't create a null reference in ASTUnit::LoadFromCommandLine.
Alexey Samsonov [Thu, 28 Aug 2014 23:51:01 +0000 (23:51 +0000)]
Don't create a null reference in ASTUnit::LoadFromCommandLine.

This change is the last in the pack of five commits
(also see r216691, r216694, r216695, and r216696) that reduces the number
of test failures in "check-clang" invocation in UBSan bootstrap
from 2443 down to 5.

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

10 years agoDon't load invalid enum value in Sema::LazilyCreateBuiltin.
Alexey Samsonov [Thu, 28 Aug 2014 23:34:32 +0000 (23:34 +0000)]
Don't load invalid enum value in Sema::LazilyCreateBuiltin.

This bug was reported by UBSan.

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

10 years agoDon't load ill-formed AmbiguityKind in Sema::Lookup.
Alexey Samsonov [Thu, 28 Aug 2014 23:17:55 +0000 (23:17 +0000)]
Don't load ill-formed AmbiguityKind in Sema::Lookup.

This bug was reported by UBSan.

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

10 years agoProperly align inline space for ImplicitConversionSequences in OverloadSet.
Alexey Samsonov [Thu, 28 Aug 2014 22:59:39 +0000 (22:59 +0000)]
Properly align inline space for ImplicitConversionSequences in OverloadSet.

This bug was reported by UBSan.

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

10 years agoDon't create a null reference to NestedNameSpecifier.
Alexey Samsonov [Thu, 28 Aug 2014 22:18:42 +0000 (22:18 +0000)]
Don't create a null reference to NestedNameSpecifier.

This bug was reported by UBSan.

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

10 years agoCall powerpc-darwin external tools with -arch ppc.
Rafael Espindola [Thu, 28 Aug 2014 21:23:05 +0000 (21:23 +0000)]
Call powerpc-darwin external tools with -arch ppc.

With this patch we call external tools for powerpc-darwin with "-arch ppc"
instead of "-arch powerpc", so as to be compatible with the cctools assembler
and ld64 linker.

Patch by Stephen Drake!

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

10 years agoOops, use correct RUN: line for test.
Richard Smith [Thu, 28 Aug 2014 21:09:23 +0000 (21:09 +0000)]
Oops, use correct RUN: line for test.

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