]> granicus.if.org Git - clang/log
clang
9 years agoFix this code to follow the coding style regarding anonymous namespaces and
Richard Smith [Wed, 12 Nov 2014 01:24:00 +0000 (01:24 +0000)]
Fix this code to follow the coding style regarding anonymous namespaces and
static functions. Make a bunch of file-local functions static. Remove one
unused static function revealed by this.

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

9 years agoMake Sema::CollectMultipleMethodsInGlobalPool() public.
Douglas Gregor [Wed, 12 Nov 2014 01:12:47 +0000 (01:12 +0000)]
Make Sema::CollectMultipleMethodsInGlobalPool() public.

It's useful for out-of-tree clients to be able to query the global
Objective-C method pool, and only Sema can do that right now.

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

9 years agoclang/test/CodeGenCXX/debug-info-cxx1y.cpp: Add %itanium_abi_triple for incompatible...
NAKAMURA Takumi [Tue, 11 Nov 2014 23:51:53 +0000 (23:51 +0000)]
clang/test/CodeGenCXX/debug-info-cxx1y.cpp: Add %itanium_abi_triple for incompatible MS targets.

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

9 years ago[clang/asan] Do not emit memcpy for trivial operator= when -fsanitize-address-field...
Kostya Serebryany [Tue, 11 Nov 2014 23:38:13 +0000 (23:38 +0000)]
[clang/asan] Do not emit memcpy for trivial operator= when -fsanitize-address-field-padding >= 1

Summary: If we've added poisoned paddings to a type do not emit memcpy for operator=.

Test Plan: regression tests.

Reviewers: majnemer, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

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

9 years agoHave LookupMemberExprInRecord only call CorrectTypoDelayed, dropping the
Kaelyn Takata [Tue, 11 Nov 2014 23:26:58 +0000 (23:26 +0000)]
Have LookupMemberExprInRecord only call CorrectTypoDelayed, dropping the
code for calling CorrectTypo.

Includes a needed fix for non-C++ code to not choke on TypoExprs (which
also resolves a TODO from r220698).

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

9 years agoCreate two helpers for running the typo-correction tree transform.
Kaelyn Takata [Tue, 11 Nov 2014 23:26:56 +0000 (23:26 +0000)]
Create two helpers for running the typo-correction tree transform.

One takes an Expr* and the other is a simple wrapper that takes an
ExprResult instead, and handles checking whether the ExprResult is
invalid.

Additionally, allow an optional callback that is run on the full result
of the tree transform, for filtering potential corrections based on the
characteristics of the resulting expression once all of the typos have
been replaced.

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

9 years agoReplace MemberTypoDiags and MemberExprTypoRecovery with lambdas.
Kaelyn Takata [Tue, 11 Nov 2014 23:26:54 +0000 (23:26 +0000)]
Replace MemberTypoDiags and MemberExprTypoRecovery with lambdas.

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

9 years agoRemove unnecessary semicolon.
Kaelyn Takata [Tue, 11 Nov 2014 23:17:30 +0000 (23:17 +0000)]
Remove unnecessary semicolon.

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

9 years agoclang-format: Improve handling of comments in binary expressions.
Daniel Jasper [Tue, 11 Nov 2014 23:04:51 +0000 (23:04 +0000)]
clang-format: Improve handling of comments in binary expressions.

Before:
  b = a &&
      // Comment
      b.c &&
      d;

After:
  b = a &&
      // Comment
      b.c && d;

This fixes llvm.org/PR21535.

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

9 years agoMake LookupResult be copyable to avoid decomposing an existing one and
Kaelyn Takata [Tue, 11 Nov 2014 23:00:42 +0000 (23:00 +0000)]
Make LookupResult be copyable to avoid decomposing an existing one and
initializing a new one every time a copy is needed.

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

9 years agoExplicitly exclude keywords from the member validator.
Kaelyn Takata [Tue, 11 Nov 2014 23:00:40 +0000 (23:00 +0000)]
Explicitly exclude keywords from the member validator.

Also simply and remove dead code from MemberExprTypoRecovery.

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

9 years agoFix some formatting prior to refactoring the code.
Kaelyn Takata [Tue, 11 Nov 2014 23:00:38 +0000 (23:00 +0000)]
Fix some formatting prior to refactoring the code.

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

9 years agoIntroduce -fsanitize-coverage=N flag
Kostya Serebryany [Tue, 11 Nov 2014 22:15:07 +0000 (22:15 +0000)]
Introduce -fsanitize-coverage=N flag

Summary:
This change makes the asan-coverge (formerly -mllvm -asan-coverge)
accessible via a clang flag.
Companion patch to LLVM is http://reviews.llvm.org/D6152

Test Plan: regression tests, chromium

Reviewers: samsonov

Reviewed By: samsonov

Subscribers: cfe-commits

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

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

9 years agoBundle conditions checked by UBSan with sanitizer kinds they implement.
Alexey Samsonov [Tue, 11 Nov 2014 22:03:54 +0000 (22:03 +0000)]
Bundle conditions checked by UBSan with sanitizer kinds they implement.

Summary:
This change makes CodeGenFunction::EmitCheck() take several
conditions that needs to be checked (all of them need to be true),
together with sanitizer kinds these checks are for. This would allow
to split one call into UBSan runtime into several calls in case
different sanitizer kinds would have different recoverability
settings.

Tests should be fixed accordingly, I'm working on it.

Test Plan: regression test suite.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

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

9 years agoRemove this test too.
Fariborz Jahanian [Tue, 11 Nov 2014 21:54:53 +0000 (21:54 +0000)]
Remove this test too.

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

9 years agoRevert r221702 until I address Richard Trieu's
Fariborz Jahanian [Tue, 11 Nov 2014 21:54:19 +0000 (21:54 +0000)]
Revert r221702 until I address Richard Trieu's
comments.

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

9 years agoSimplify the test by using multiple --check-prefix arguments
Alexey Samsonov [Tue, 11 Nov 2014 21:50:44 +0000 (21:50 +0000)]
Simplify the test by using multiple --check-prefix arguments

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

9 years agoRevert "IR: MDNode => Value: Update for LLVM API change in r221375"
Duncan P. N. Exon Smith [Tue, 11 Nov 2014 21:31:03 +0000 (21:31 +0000)]
Revert "IR: MDNode => Value: Update for LLVM API change in r221375"

This reverts commit r221376.

The API change was reverted in r221711.

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

9 years agoPR16091 continued: Debug Info for member functions with undeduced return types.
David Blaikie [Tue, 11 Nov 2014 20:44:45 +0000 (20:44 +0000)]
PR16091 continued: Debug Info for member functions with undeduced return types.

So DWARF5 specs out auto deduced return types as DW_TAG_unspecified_type
with DW_AT_name "auto", and GCC implements this somewhat, but it
presents a few problems to do this with Clang.

GCC's implementation only applies to member functions where the auto
return type isn't deduced immediately (ie: member functions of templates
or member functions defined out of line). In the common case of an
inline deduced return type function, GCC emits the DW_AT_type as the
deduced return type.

Currently GDB doesn't seem to behave too well with this debug info - it
treats the return type as 'void', even though the definition of the
function has the correctly deduced return type (I guess it sees the
return type the declaration has, doesn't understand it, and assumes
void). This means the function's ABI might be broken (non-trivial return
types, etc), etc.

Clang, on the other hand doesn't track this particular case of a
deducable return type that is deduced immediately versus one that is
deduced 'later'. So if we implement the DWARF5 representation, all
deducible return type functions would get adverse GDB behavior
(including deduced return type lambda functions, inline deduced return
type functions, etc).

Also, we can't just do this for auto types that are not deduced -
because Clang marks even the declaration's return type as deduced (&
provides the underlying type) once a definition is seen that allows the
deduction. So we have to ignore even deduced types - but we can't do
that for auto variables (because this representation only applies to
function declarations - variables and function definitions need the real
type so the function can be called, etc) so we'd need to add an extra
flag to the type unwrapping/creation code to indicate when we want to
see through deduced types and when we don't. It's also not as simple as
just checking at the top level when building a function type (for one
thing, we reuse the function type building for building function pointer
types which might also have 'auto' in them - but be the type of a
variable instead) because the auto might be arbitrarily deeply nested
("auto &", "auto (*)()", etc...)

So, with all that said, let's do the simple thing that works in existing
debuggers for now and treat these functions the same way we do function
templates and implicit special members: omit them from the member list,
since they can't be correctly called anyway (without knowing the return
type the ABI isn't know and a function call could put the arguments in
the wrong place) so they're not much use to the user.

At some point in the future, when GDB understands the DWARF5
representation better it might be worth plumbing through the extra type
builder handling to avoid looking through AutoType for some callers,
etc...

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

9 years agoPatch to warn when logical evaluation of operand evalutes to a true value;
Fariborz Jahanian [Tue, 11 Nov 2014 19:59:16 +0000 (19:59 +0000)]
Patch to warn when logical evaluation of operand evalutes to a true value;
That this is a c-only patch. c++ already has this warning.
This addresses rdar://18716393

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

9 years agoclang-format: Preserve trailing-comma logic even with comments.
Daniel Jasper [Tue, 11 Nov 2014 19:34:57 +0000 (19:34 +0000)]
clang-format: Preserve trailing-comma logic even with comments.

Before:
  vector<int> SomeVector = {// aaa
                            1, 2,
  };

After:
  vector<int> SomeVector = {
      // aaa
      1, 2,
  };

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

9 years agoFirst half of CWG1962: decltype(__func__) should not be a reference type,
Richard Smith [Tue, 11 Nov 2014 19:30:41 +0000 (19:30 +0000)]
First half of CWG1962: decltype(__func__) should not be a reference type,
because __func__ is supposed to act like a local static variable.

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

9 years agoThis patch fixes a crash after rebuilding call AST of
Fariborz Jahanian [Tue, 11 Nov 2014 16:56:21 +0000 (16:56 +0000)]
This patch fixes a crash after rebuilding call AST of
an __unknown_anytype(...). In this case, we rebuild the
vararg function type specially to convert the call expression
to  something that IRGen can handle. However, FunctionDecl
as rebuilt in RebuildUnknownAnyExpr::resolveDecl is bogus and
results in crash when accessing its params later on. This
patch fixes the crash by rebuilding the FunctionDecl to match
its new resolved type. rdar://15297105.
(patch reapplied after lldb issue was fixed in r221660).

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

9 years agoDiagnosticParseKinds is close to running into DiagnosticASTKinds.
Manuel Klimek [Tue, 11 Nov 2014 15:45:49 +0000 (15:45 +0000)]
DiagnosticParseKinds is close to running into DiagnosticASTKinds.

$ grep "def " include/clang/Basic/DiagnosticParseKinds.td |wc -l
396

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

9 years agoCGOpenMPRuntime.h: Fix a couple of \param(s) introduced in r221663. [-Wdocumentation]
NAKAMURA Takumi [Tue, 11 Nov 2014 07:58:06 +0000 (07:58 +0000)]
CGOpenMPRuntime.h: Fix a couple of \param(s) introduced in r221663. [-Wdocumentation]

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

9 years ago[OPENMP] Codegen for threadprivate variables
Alexey Bataev [Tue, 11 Nov 2014 04:05:39 +0000 (04:05 +0000)]
[OPENMP] Codegen for threadprivate variables
For all threadprivate variables which have constructor/destructor emit call to void __kmpc_threadprivate_register(ident_t * <Current Location>, void *<Original Global Addr>, kmpc_ctor <Constructor>, kmpc_cctor NULL, kmpc_dtor <Destructor>);
In expressions all references to such variables are replaced by calls to void *__kmpc_threadprivate_cached(ident_t *<Current Location>, kmp_int32 <Current Thread Id>, void *<Original Global Addr>, size_t <Size of Data>, void ***<Pointer to autogenerated cache – array of private copies of threadprivate variable>);
Test test/OpenMP/threadprivate_codegen.cpp checks that codegen is correct. Also it checks that codegen is correct after serialization/deserialization and one of passes verifies debug info.
Differential Revision: http://reviews.llvm.org/D4002

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

9 years agoFix parsing of fold-expressions within a cast expression. We parse the
Richard Smith [Tue, 11 Nov 2014 03:28:50 +0000 (03:28 +0000)]
Fix parsing of fold-expressions within a cast expression. We parse the
parenthesized expression a bit differently in this case, just in case the
commas have special meaning.

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

9 years agoInstrProf: Remove an unnecessary helper function (NFC)
Justin Bogner [Tue, 11 Nov 2014 02:47:05 +0000 (02:47 +0000)]
InstrProf: Remove an unnecessary helper function (NFC)

VisitSubStmtRBraceState is really just Visit, as long as
VisitCompoundStatement handles braces correctly.

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

9 years agoCGExpr.cpp: Suppress a warning. [-Wunused-variable]
NAKAMURA Takumi [Tue, 11 Nov 2014 01:36:11 +0000 (01:36 +0000)]
CGExpr.cpp: Suppress a warning. [-Wunused-variable]

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

9 years ago[Sanitizer] Refactor sanitizer options in LangOptions.
Alexey Samsonov [Tue, 11 Nov 2014 01:26:14 +0000 (01:26 +0000)]
[Sanitizer] Refactor sanitizer options in LangOptions.

Get rid of ugly SanitizerOptions class thrust into LangOptions:
* Make SanitizeAddressFieldPadding a regular language option,
  and rely on default behavior to initialize/reset it.
* Make SanitizerBlacklistFile a regular member LangOptions.
* Introduce the helper class "SanitizerSet" to represent the
  set of enabled sanitizers and make it a member of LangOptions.
  It is exactly the entity we want to cache and modify in CodeGenFunction,
  for instance. We'd also be able to reuse SanitizerSet in
  CodeGenOptions for storing the set of recoverable sanitizers,
  and in the Driver to represent the set of sanitizers
  turned on/off by the commandline flags.

No functionality change.

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

9 years agoMove CodeGenOptions constructor out-of-line and add missing headers. NFC.
Alexey Samsonov [Tue, 11 Nov 2014 00:22:12 +0000 (00:22 +0000)]
Move CodeGenOptions constructor out-of-line and add missing headers. NFC.

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

9 years agoMove SanitizerKind class to a separate header. NFC.
Alexey Samsonov [Tue, 11 Nov 2014 00:19:46 +0000 (00:19 +0000)]
Move SanitizerKind class to a separate header. NFC.

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

9 years ago[libclang] When initializing an ObjC object via the "[[ClassName alloc] init*]" pattern,
Argyrios Kyrtzidis [Mon, 10 Nov 2014 23:21:35 +0000 (23:21 +0000)]
[libclang] When initializing an ObjC object via the "[[ClassName alloc] init*]" pattern,
report the 'init*' invocation as non-dynamic via clang_Cursor_isDynamicCall.

Of course it is dynamic at runtime, but for purposes of indexing we can treat as an invocation to ClassName's init*.

Addresses rdar://18916871.

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

9 years agoPropagate SanitizerKind into CodeGenFunction::EmitCheck() call.
Alexey Samsonov [Mon, 10 Nov 2014 22:27:30 +0000 (22:27 +0000)]
Propagate SanitizerKind into CodeGenFunction::EmitCheck() call.

Make sure CodeGenFunction::EmitCheck() knows which sanitizer
it emits check for. Make CheckRecoverableKind enum an
implementation detail and move it away from header.

Currently CheckRecoverableKind is determined by the type of
sanitizer ("unreachable" and "return" are unrecoverable,
"vptr" is always-recoverable, all the rest are recoverable).
This will change in future if we allow to specify which sanitizers
are recoverable, and which are not by -fsanitize-recover= flag.

No functionality change.

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

9 years agoValidate user headers even if -fmodules-validate-once-per-build-session
Ben Langmuir [Mon, 10 Nov 2014 22:13:10 +0000 (22:13 +0000)]
Validate user headers even if -fmodules-validate-once-per-build-session

is enabled. Unlike system headers, we want to be more careful about
modifications to user headers, because it's still easy to edit a header
while you're building.

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

9 years agoAArch64: set all processor features from -arch if nothing else present
Tim Northover [Mon, 10 Nov 2014 21:17:23 +0000 (21:17 +0000)]
AArch64: set all processor features from -arch if nothing else present

Darwin's "-arch arm64" option implies full Cyclone CPU, for both architectural
and tuning purposes. So if neither of the explicit options have been given,
forward that on to the proper invocation.

rdar://problem/18906227

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

9 years agoImprove diagnostics if _Noreturn is placed after a function declarator. (This sometim...
Richard Smith [Mon, 10 Nov 2014 21:10:32 +0000 (21:10 +0000)]
Improve diagnostics if _Noreturn is placed after a function declarator. (This sometimes happens when a macro is used that expands to either the GNU noreturn attribute or _Noreturn.)

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

9 years agoRemove change to set SDKROOT when building compiler-rt on Darwin.
Bob Wilson [Mon, 10 Nov 2014 20:01:19 +0000 (20:01 +0000)]
Remove change to set SDKROOT when building compiler-rt on Darwin.

This reverts the runtime library portion of r194168. As of r221621,
the libclang_rt libraries for Darwin build with explicit SDK options
so there is no need to set SDKROOT here.

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

9 years agoUpdate fold-expression mangling to match cxx-abi-dev discussion.
Richard Smith [Mon, 10 Nov 2014 19:44:15 +0000 (19:44 +0000)]
Update fold-expression mangling to match cxx-abi-dev discussion.

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

9 years agoOnly build iOS runtime libraries when the iOS SDKs are available.
Bob Wilson [Mon, 10 Nov 2014 17:46:55 +0000 (17:46 +0000)]
Only build iOS runtime libraries when the iOS SDKs are available.

This was already set up for the iOS simulator ASan dylib simulator,
and this change extends that to the other iOS runtime libraries.
This is in preparation for building all those iOS libraries against
the real SDKs instead of the fake SDKs in compiler-rt.

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

9 years agoclang-format: Fix pointer formatting.
Daniel Jasper [Mon, 10 Nov 2014 16:57:30 +0000 (16:57 +0000)]
clang-format: Fix pointer formatting.

Before:
  void f(Bar* a = nullptr, Bar * b);
After:
  void f(Bar* a = nullptr, Bar* b);

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

9 years agoclang-format: [Java] Never treat @interface as annotation.
Nico Weber [Mon, 10 Nov 2014 16:30:02 +0000 (16:30 +0000)]
clang-format: [Java] Never treat @interface as annotation.

'@' followed by any keyword can't be an annotation, but @interface is currently
the only combination of '@' and a keyword that's allowed, so limit it to this
case. `@interface Foo` without a leading `public` was misformatted prior to
this patch.

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

9 years agoclang-format: Document that --assume-filename affects the language.
Nico Weber [Mon, 10 Nov 2014 16:14:54 +0000 (16:14 +0000)]
clang-format: Document that --assume-filename affects the language.

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

9 years agoRemove unused diagnostic.
Benjamin Kramer [Mon, 10 Nov 2014 16:07:58 +0000 (16:07 +0000)]
Remove unused diagnostic.

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

9 years ago[Tooling] Restore current directory after processing each file.
Alexander Kornienko [Mon, 10 Nov 2014 15:42:31 +0000 (15:42 +0000)]
[Tooling] Restore current directory after processing each file.

Summary:
If we actually change directory before processing a file, we need to
restore it afterwards. This was broken in r216620.

Added a comment for the changes in r216620.

Reviewers: klimek

Reviewed By: klimek

Subscribers: klimek, cfe-commits

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

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

9 years agoMissing testcase from r221581.
Aaron Ballman [Sat, 8 Nov 2014 17:09:50 +0000 (17:09 +0000)]
Missing testcase from r221581.

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

9 years agoUpdated the wording for a diagnostic to be more grammatically correct, and use a...
Aaron Ballman [Sat, 8 Nov 2014 17:07:15 +0000 (17:07 +0000)]
Updated the wording for a diagnostic to be more grammatically correct, and use a %select. Also ensure that nested namespace definitions are diagnosed properly. Both changes are motivated by post-commit feedback from r221580.

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

9 years ago[c++1z] Support for attributes on namespaces and enumerators.
Aaron Ballman [Sat, 8 Nov 2014 15:33:35 +0000 (15:33 +0000)]
[c++1z] Support for attributes on namespaces and enumerators.

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

9 years ago[c++1z] Support for u8 character literals.
Richard Smith [Sat, 8 Nov 2014 06:08:42 +0000 (06:08 +0000)]
[c++1z] Support for u8 character literals.

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

9 years ago[c++1z] Implement nested-namespace-definitions.
Richard Smith [Sat, 8 Nov 2014 05:37:34 +0000 (05:37 +0000)]
[c++1z] Implement nested-namespace-definitions.

This allows 'namespace A::B { ... }' as a shorthand for 'namespace A {
namespace B { ... } }'. We already supported this correctly for error recovery;
promote that support to a full implementation.

This is not the right implementation: we do not maintain source fidelity
because we desugar the nested namespace definition in the parser. This is
tricky to avoid, since the definition genuinely does inject one named
entity per level in the namespace name.

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

9 years ago[c++1z] N4295: fold-expressions.
Richard Smith [Sat, 8 Nov 2014 05:07:16 +0000 (05:07 +0000)]
[c++1z] N4295: fold-expressions.

This is a new form of expression of the form:

  (expr op ... op expr)

where one of the exprs is a parameter pack. It expands into

  (expr1 op (expr2onwards op ... op expr))

(and likewise if the pack is on the right). The non-pack operand can be
omitted; in that case, an empty pack gives a fallback value or an error,
depending on the operator.

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

9 years agoCheck module signature when the module has already been loaded
Ben Langmuir [Sat, 8 Nov 2014 00:34:30 +0000 (00:34 +0000)]
Check module signature when the module has already been loaded

We may need to verify the signature on subsequent imports as well, just
like we verify the size/modtime:
@import A;
@import B; // imports A
@import C; // imports A

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

9 years agoFixed a buildbot failure.
Fariborz Jahanian [Sat, 8 Nov 2014 00:23:55 +0000 (00:23 +0000)]
Fixed a buildbot failure.

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

9 years agoFix unintended fallthrough in ASTReader
Ben Langmuir [Sat, 8 Nov 2014 00:06:39 +0000 (00:06 +0000)]
Fix unintended fallthrough in ASTReader

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

9 years ago[Objective-C Sema]. Issue availability/deprecated warning when
Fariborz Jahanian [Fri, 7 Nov 2014 23:51:15 +0000 (23:51 +0000)]
[Objective-C Sema]. Issue availability/deprecated warning when
there is a uinque method found when message is sent to receiver
of 'id' type. // rdar://18848183

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

9 years agoARM ABI: simplify decisions on whether args can be expanded.
Tim Northover [Fri, 7 Nov 2014 22:30:50 +0000 (22:30 +0000)]
ARM ABI: simplify decisions on whether args can be expanded.

Homogeneous aggregates on AAPCS_VFP ARM need to be passed *without* being
flattened (e.g. [2 x float] rather than "float, float") for various weird ABI
reasons. However, this isn't the case for anything else; further, we know at
the ABIArgInfo::getDirect callsites whether this flattening is allowed.

So, we can get more unified ARM code, with a simpler Clang, by just using that
knowledge directly.

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

9 years agoIntroduce a SanitizerKind enum to LangOptions.
Alexey Samsonov [Fri, 7 Nov 2014 22:29:38 +0000 (22:29 +0000)]
Introduce a SanitizerKind enum to LangOptions.

Use the bitmask to store the set of enabled sanitizers instead of a
bitfield. On the negative side, it makes syntax for querying the
set of enabled sanitizers a bit more clunky. On the positive side, we
will be able to use SanitizerKind to eventually implement the
new semantics for -fsanitize-recover= flag, that would allow us
to make some sanitizers recoverable, and some non-recoverable.

No functionality change.

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

9 years agoUse @rpath for ASan dylib in Makefiles
Kuba Brecka [Fri, 7 Nov 2014 22:27:43 +0000 (22:27 +0000)]
Use @rpath for ASan dylib in Makefiles

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

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

9 years agoFix style.
Michael J. Spencer [Fri, 7 Nov 2014 21:30:32 +0000 (21:30 +0000)]
Fix style.

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

9 years agoFix clash of gcc toolchains in hexagon driver regression tests.
Samuel Antao [Fri, 7 Nov 2014 17:48:03 +0000 (17:48 +0000)]
Fix clash of gcc toolchains in hexagon driver regression tests.

If clang was configured with a custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the equivalent configure command), the path to the custom gcc toolchain path takes precedence to the one specified by -ccc-install-dir. This causes several regression tests to fail as they will be using an unexpected path. Adding the switch --gcc-toolchain="" in each test command is not enough as the hexagon toolchain implementation in the driver is not evaluating this argument. This commit modifies the hexagon toolchain to take the --gcc-toolchain="" argument into account when deciding the toolchain path, similarly to what is already done for other targets toolchains. Additionally, the faulty regression tests are modified in order to --gcc-toolchain="" be passed to the commands.

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

9 years agoRevert r221404 which caused lldb to not display
Fariborz Jahanian [Fri, 7 Nov 2014 16:47:05 +0000 (16:47 +0000)]
Revert r221404 which caused lldb to not display
vararg expressions.

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

9 years agoImprove comments in vtordisp tests: fix a typo, add a bit more clarity
Timur Iskhodzhanov [Fri, 7 Nov 2014 14:11:14 +0000 (14:11 +0000)]
Improve comments in vtordisp tests: fix a typo, add a bit more clarity

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

9 years agoCodeGen, Itanium: Properly dllimport RTTI data
David Majnemer [Fri, 7 Nov 2014 07:26:38 +0000 (07:26 +0000)]
CodeGen, Itanium: Properly dllimport RTTI data

We would blindly assume that RTTI data should have the same linkage as
the vtable because we didn't think the RTTI data was external.  This
oversight stemmed because we didn't take dllimport into account.

This fixes PR21512.

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

9 years agoReturn a DIDescriptor from CGDebugInfo::getDeclarationOrDefinition...
Frederic Riss [Thu, 6 Nov 2014 21:12:06 +0000 (21:12 +0000)]
Return a DIDescriptor from CGDebugInfo::getDeclarationOrDefinition...

... instead of a DIScope that might wrap something that's not actually
a DIScope (eg. a DIGlobalVariable);

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

9 years agoRemove references to the cortex-a9-mp CPU.
Charlie Turner [Thu, 6 Nov 2014 14:59:30 +0000 (14:59 +0000)]
Remove references to the cortex-a9-mp CPU.

This CPU definition is redundant. The Cortex-A9 is defined as
supporting multiprocessing extensions. Remove references to this CPU.

This CPU was recently removed from LLVM. See http://reviews.llvm.org/D6057

Change-Id: I62ae7cc656fcae54fbaefc4b6976e77e694a8678

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

9 years agoDon't manually insert L prefixes.
Rafael Espindola [Thu, 6 Nov 2014 13:30:38 +0000 (13:30 +0000)]
Don't manually insert L prefixes.

Simply marking the symbol private conveys the desire to hide them to LLVM.

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

9 years ago[X86] Slightly refactor default features for AMD bdver cpus (NFC). Also add missing...
Andrea Di Biagio [Thu, 6 Nov 2014 12:08:57 +0000 (12:08 +0000)]
[X86] Slightly refactor default features for AMD bdver cpus (NFC). Also add missing checks to test for target features.

This patch simplifies how default target features are set for AMD bdver2
and bdver1. In particular, method 'getDefaultFeatures' now implements a
fallthrough from case 'CK_BDVER2' to case 'CK_BDVER1'.
That is because 'bdver2' has the same features available in bdver1 plus
BMI, FMA, F16C and TBM.

This patch also adds missing checks for predefined macros in test
predefined-arch-macros.c. In the case of BTVER2, the test now also checks
for F16C, BMI and PCLMUL. In the case of BDVER3 and BDVER4, the test now
also checks for the presence of FSGSBASE.

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

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

9 years agoFix for exception specification mismatch in explicit instantiation.
Alexey Bataev [Thu, 6 Nov 2014 10:10:50 +0000 (10:10 +0000)]
Fix for exception specification mismatch in explicit instantiation.
According to C++ standard if an exception-specification is specified in an explicit instantiation directive, it shall be compatible with the exception-specifications of other declarations of that function. This patch adds checks for this.
Differential Revision: http://reviews.llvm.org/D5822

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

9 years ago[X86] Use fallthroughs to reduce the number of calls to setFeatureEnabled for differe...
Craig Topper [Thu, 6 Nov 2014 05:52:19 +0000 (05:52 +0000)]
[X86] Use fallthroughs to reduce the number of calls to setFeatureEnabled for different CPUs.

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

9 years agoUse FileCheck.
Rafael Espindola [Thu, 6 Nov 2014 04:56:05 +0000 (04:56 +0000)]
Use FileCheck.

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

9 years agoDelete dead test.
Rafael Espindola [Thu, 6 Nov 2014 04:48:05 +0000 (04:48 +0000)]
Delete dead test.

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

9 years agoPatch for small addition to availability attribute.
Fariborz Jahanian [Wed, 5 Nov 2014 23:58:55 +0000 (23:58 +0000)]
Patch for small addition to availability attribute.
This is to accept "NA" in place of vesion number for availability
attribute. Used on introduced=NA to mean unavailable
and deprecated=NA to mean nothing (not deprecated).
rdar://18804883

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

9 years agocmake: Only export targets in the standalone build
Reid Kleckner [Wed, 5 Nov 2014 23:51:45 +0000 (23:51 +0000)]
cmake: Only export targets in the standalone build

Trying to fix bots that didn't like the fact that I exported targets
that depended on LLVM without exporting targets from LLVM.

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

9 years agoMake it easier to build against a pre-built Clang package with CMake
Reid Kleckner [Wed, 5 Nov 2014 23:14:59 +0000 (23:14 +0000)]
Make it easier to build against a pre-built Clang package with CMake

Installing <prefix>/share/clang/cmake/ClangConfig.cmake makes CMake's
builtin find_package() utility work with Clang. This also allows
downstream consumers of Clang to statically link against libraries like
clangAST and have that pull in dependencies like clangBasic and
LLVMSupport.

See the CMake docs on packages:
http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html

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

9 years agoThread Safety Analysis: move warnings on range-based for loops out of beta
DeLesley Hutchins [Wed, 5 Nov 2014 23:09:28 +0000 (23:09 +0000)]
Thread Safety Analysis: move warnings on range-based for loops out of beta
and into -Wthread-safety.

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

9 years agoThis patch fixes a crash after rebuilding call AST of
Fariborz Jahanian [Wed, 5 Nov 2014 21:50:22 +0000 (21:50 +0000)]
This patch fixes a crash after rebuilding call AST of
an __unknown_anytype(...). In this case, we rebuild the
vararg function type specially to convert the call expression
to  something that IRGen can handle. However, FunctionDecl
as rebuilt in RebuildUnknownAnyExpr::resolveDecl is bogus and
results in crash when accessing its params later on. This
patch fixes the crash by rebuilding the FunctionDecl to match
its new resolved type. rdar://15297105.
John McCall, please review post-commit.

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

9 years agocmake: Conditionalize CodeGen's dependency on intrinsics_gen
Reid Kleckner [Wed, 5 Nov 2014 20:30:55 +0000 (20:30 +0000)]
cmake: Conditionalize CodeGen's dependency on intrinsics_gen

Custom targets in cmake cannot be exported, and this dependency is only
needed in the combined build to ensure that Intrinsics.gen is created
before compiling CodeGen. In the standalone, all of LLVM is build first.

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

9 years ago[DebugInfo] Do not record artificial global initializer functions in the DeclCache.
Frederic Riss [Wed, 5 Nov 2014 19:19:04 +0000 (19:19 +0000)]
[DebugInfo] Do not record artificial global initializer functions in the DeclCache.

When we are generating the global initializer functions, we call
CGDebugInfo::EmitFunctionStart() with a valid decl which is describing
the initialized global variable. Do not update the DeclCache with this
key as it will overwrite the the cached variable DIGlobalVariable with
the newly created artificial DISubprogram.

One could wonder if we should put artificial subprograms in the DIE tree
at all (there are vaild uses for them carrying line information though).

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

9 years agoIR: MDNode => Value: Update for LLVM API change in r221375
Duncan P. N. Exon Smith [Wed, 5 Nov 2014 18:16:35 +0000 (18:16 +0000)]
IR: MDNode => Value: Update for LLVM API change in r221375

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

9 years agoRevert "clang-format: [js] Updates to Google's JavaScript style."
Daniel Jasper [Wed, 5 Nov 2014 17:22:31 +0000 (17:22 +0000)]
Revert "clang-format: [js] Updates to Google's JavaScript style."

This reverts commit eefd2eaad43c5c2b17953ae7ed1e72b28e696f7b.

Apparently, this change was a bit premature.

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

9 years agoRemove superceded warning warn_forgotten_module_header
Ben Langmuir [Wed, 5 Nov 2014 16:43:18 +0000 (16:43 +0000)]
Remove superceded warning warn_forgotten_module_header

This DefaultIgnore warning under -Wincomplete-module was firing on
any module map files that happened to be parsed (it's only supposed to
fire on headers), and it has been superceded by
-Wnon-modular-include-in-module anyway.

For compatibility, I rewired -Wincomplete-module to imply
-Wnon-modular-include-in-module.

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

9 years agoSupport LLVM_BUILD_STATIC.
Rafael Espindola [Wed, 5 Nov 2014 14:04:25 +0000 (14:04 +0000)]
Support LLVM_BUILD_STATIC.

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

9 years agoMS ABI: Correctly mangle CV qualifiers from typedefs
Will Wilson [Wed, 5 Nov 2014 13:54:21 +0000 (13:54 +0000)]
MS ABI: Correctly mangle CV qualifiers from typedefs

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

9 years agoclang-format: Add test to prevent regression in r221125.
Daniel Jasper [Wed, 5 Nov 2014 10:55:36 +0000 (10:55 +0000)]
clang-format: Add test to prevent regression in r221125.

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

9 years agoclang-format: Improve free-standing macro detection.
Daniel Jasper [Wed, 5 Nov 2014 10:48:04 +0000 (10:48 +0000)]
clang-format: Improve free-standing macro detection.

Before:
  SOME_WEIRD_LOG_MACRO
  << "Something long enough to cause a line break";

After:
  SOME_WEIRD_LOG_MACRO
      << "Something long enough to cause a line break";

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

9 years agoMark darwin-debug-flags.c as REQUIRES:shell, due to quoting issue.
NAKAMURA Takumi [Wed, 5 Nov 2014 05:04:00 +0000 (05:04 +0000)]
Mark darwin-debug-flags.c as REQUIRES:shell, due to quoting issue.

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

9 years agoclang-format: Make it possible to (require 'clang-format)
Justin Bogner [Wed, 5 Nov 2014 04:32:54 +0000 (04:32 +0000)]
clang-format: Make it possible to (require 'clang-format)

This makes the emacs integration ``provide`` a clang-format feature,
so that a .emacs can ``require`` it.

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

9 years agoDebug info: Emit the correct type for the __FuncPtr field in a block
Adrian Prantl [Wed, 5 Nov 2014 01:01:30 +0000 (01:01 +0000)]
Debug info: Emit the correct type for the __FuncPtr field in a block
descriptor.

rdar://problem/15984431

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

9 years agoFilter out non-static class members when correcting non-member-references.
Kaelyn Takata [Wed, 5 Nov 2014 00:09:29 +0000 (00:09 +0000)]
Filter out non-static class members when correcting non-member-references.

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

9 years agoFix the test failure on Windows introduced by r221279.
Kuba Brecka [Tue, 4 Nov 2014 23:38:57 +0000 (23:38 +0000)]
Fix the test failure on Windows introduced by r221279.

http://reviews.llvm.org/D6018

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

9 years agoUse backslashes to escape spaces and other backslashes in -dwarf-debug-flags.
Bob Wilson [Tue, 4 Nov 2014 22:28:48 +0000 (22:28 +0000)]
Use backslashes to escape spaces and other backslashes in -dwarf-debug-flags.

The command line options are specified in a space-separated list that is an
argument to -dwarf-debug-flags, so that breaks if there are spaces in the
options. This feature came from Apple's internal version of GCC, so I went back
to check how llvm-gcc handled this and matched that behavior.
rdar://problem/18775420

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

9 years agoMake helper function static. NFC.
Benjamin Kramer [Tue, 4 Nov 2014 20:26:01 +0000 (20:26 +0000)]
Make helper function static. NFC.

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

9 years agoSince the file has both ppc and ppc64 tests in it rename it.
Roman Divacky [Tue, 4 Nov 2014 18:49:15 +0000 (18:49 +0000)]
Since the file has both ppc and ppc64 tests in it rename it.

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

9 years agoRewrite the test to not require asserts.
Roman Divacky [Tue, 4 Nov 2014 18:48:20 +0000 (18:48 +0000)]
Rewrite the test to not require asserts.

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

9 years agoUse @rpath as LC_ID_DYLIB for ASan dylib on OS X
Kuba Brecka [Tue, 4 Nov 2014 17:35:17 +0000 (17:35 +0000)]
Use @rpath as LC_ID_DYLIB for ASan dylib on OS X

Change the LC_ID_DYLIB of ASan's dynamic libraries on OS X to be set to "@rpath/libclang_rt.asan_osx_dynamic.dylib" and similarly for iossim. Clang driver then sets the "-rpath" to be the real path to where clang currently has the dylib (because clang uses the relative path to its current executable). This means if you move the compiler or install the binary release, -fsanitize=address will link to the proper library.

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

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

9 years agoRe-enable this test on Windows since it passes with GnuWin32 env.exe.
Yaron Keren [Tue, 4 Nov 2014 14:54:37 +0000 (14:54 +0000)]
Re-enable this test on Windows since it passes with GnuWin32 env.exe.

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

9 years agoRemove "REQUIRES:shell" from tests. They work for me.
NAKAMURA Takumi [Tue, 4 Nov 2014 13:41:33 +0000 (13:41 +0000)]
Remove "REQUIRES:shell" from tests. They work for me.

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

9 years agoclang/test/Tooling: Remove mention to PR15590 out of a couple of tests. They are...
NAKAMURA Takumi [Tue, 4 Nov 2014 13:32:29 +0000 (13:32 +0000)]
clang/test/Tooling: Remove mention to PR15590 out of a couple of tests. They are suppressed with another issue.

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

9 years agoclang/test/Tooling: [PR15590] Avoid backslashes in JSON. Should work on win32.
NAKAMURA Takumi [Tue, 4 Nov 2014 13:32:17 +0000 (13:32 +0000)]
clang/test/Tooling: [PR15590] Avoid backslashes in JSON. Should work on win32.

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

9 years agoclang/test/VFS/umbrella-mismatch.m: Let it work on win32 to avoid backslashes in...
NAKAMURA Takumi [Tue, 4 Nov 2014 13:05:23 +0000 (13:05 +0000)]
clang/test/VFS/umbrella-mismatch.m: Let it work on win32 to avoid backslashes in yaml.

FIXME: Is it intentional? s;OUT_DIR;%/S/Inputs;

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