]> granicus.if.org Git - clang/log
clang
10 years ago[objcmt] Revert r191796, it's not needed anymore.
Argyrios Kyrtzidis [Mon, 28 Apr 2014 02:38:51 +0000 (02:38 +0000)]
[objcmt] Revert r191796, it's not needed anymore.

rdar://16223810

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

10 years agoCodeGen: remove an unused variable
Saleem Abdulrasool [Mon, 28 Apr 2014 02:29:11 +0000 (02:29 +0000)]
CodeGen: remove an unused variable

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

10 years ago[SemaCXX] Silence -Wconstant-logical-operand if the operand is a 0/1 from a macro.
Argyrios Kyrtzidis [Mon, 28 Apr 2014 00:20:16 +0000 (00:20 +0000)]
[SemaCXX] Silence -Wconstant-logical-operand if the operand is a 0/1 from a macro.

Libraries specify enabled/disabled features using macro defs of 0/1, in such cases the -Wconstant-logical-operand
is noise.

rdar://15410291

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

10 years ago[Index/DocComments] When cloning a full comment, pick the template parameters from...
Argyrios Kyrtzidis [Sun, 27 Apr 2014 22:53:03 +0000 (22:53 +0000)]
[Index/DocComments] When cloning a full comment, pick the template parameters from the original FullComment,
if the parameters are not already set (e.g. because it is a typedef).

Fixes crash of rdar://16128173

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

10 years agoremove less relevant information + about packaging/Mac OS X + link to cfe-dev
Sylvestre Ledru [Sun, 27 Apr 2014 15:17:15 +0000 (15:17 +0000)]
remove less relevant information + about packaging/Mac OS X + link to cfe-dev

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

10 years agoRemove no longer relevant information in the gcc/llvm comparison page + minor updates
Sylvestre Ledru [Sun, 27 Apr 2014 15:02:05 +0000 (15:02 +0000)]
Remove no longer relevant information in the gcc/llvm comparison page + minor updates

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

10 years agoremove useless code
Sylvestre Ledru [Sun, 27 Apr 2014 14:57:31 +0000 (14:57 +0000)]
remove useless code

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

10 years agoRemove deprecated information about performances:
Sylvestre Ledru [Sun, 27 Apr 2014 14:54:11 +0000 (14:54 +0000)]
Remove deprecated information about performances:
* It is better if we leave third parties to do "independent" benchmark.
* We compare Clang (version unspecified) with gcc 4.0 or 4.2.
* The graphs have not been updated for a while.
* Clang is well known now. I don't think we still need to explain why
Clang is great.

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

10 years agoclang-format: Fix bug when aligning trailing /**/-comments in macros.
Daniel Jasper [Sun, 27 Apr 2014 10:03:19 +0000 (10:03 +0000)]
clang-format: Fix bug when aligning trailing /**/-comments in macros.

Previously this could lead to a column limit violation with the
required escaped newlines.

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

10 years agoFix the method len of the CompletionString object. Patch by Christopher Greene
Sylvestre Ledru [Sun, 27 Apr 2014 04:42:55 +0000 (04:42 +0000)]
Fix the method len of the CompletionString object. Patch by Christopher Greene

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

10 years agoc-arcmt-test/Makefile: Update USEDLIBS for -static.
NAKAMURA Takumi [Sun, 27 Apr 2014 03:40:51 +0000 (03:40 +0000)]
c-arcmt-test/Makefile: Update USEDLIBS for -static.

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

10 years ago[SemaObjC] Fix ObjCInterfaceDecl::inheritsDesignatedInitializers(), if there are no
Argyrios Kyrtzidis [Sat, 26 Apr 2014 21:28:41 +0000 (21:28 +0000)]
[SemaObjC] Fix ObjCInterfaceDecl::inheritsDesignatedInitializers(), if there are no
designated initializers in the super class hierarchy then it should return false.

rdar://16692535

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

10 years ago[Sema] Adjust Sema::getCurBlock()/getCurLambda() to take into account that we may...
Argyrios Kyrtzidis [Sat, 26 Apr 2014 18:29:13 +0000 (18:29 +0000)]
[Sema] Adjust Sema::getCurBlock()/getCurLambda() to take into account that we may have
switch CurContext due to class template instantiation.

Fixes crash of the included test case.
rdar://16527205

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

10 years agolibclang: remove 'CXDiagnostic_Remark'
Alp Toker [Sat, 26 Apr 2014 14:43:53 +0000 (14:43 +0000)]
libclang: remove 'CXDiagnostic_Remark'

The change was landed without review or test cases.

It trivially broke almost any stable application checking for Severity >=
CXDiagnostic_Error or indeed any other kind of severity comparison upon
encountering a 'remark'.

Mapped to CXDiagnostic_Warning until a workable solution is proposed to the
list that preserves API stability.

(It's also not clear why the rest of r202475 wasn't simply implemented as a
modifier to the existing 'warning' level.)

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

10 years agoAdd mangling for attribute enable_if. The demangling patch for libcxxabi is still...
Nick Lewycky [Sat, 26 Apr 2014 00:14:00 +0000 (00:14 +0000)]
Add mangling for attribute enable_if. The demangling patch for libcxxabi is still in review.

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

10 years agoFixed Assert In CGRecordLowering
Warren Hunt [Fri, 25 Apr 2014 21:56:30 +0000 (21:56 +0000)]
Fixed Assert In CGRecordLowering
Prior to this patch, CGRecordLower assumed that virtual bases could not
be placed before the nvsize of an object.  This isn't true in Itanium
mode, virtual bases are placed at dsize rather than vnsize and in the
case of zero sized non-virtual bases nvsize can be larger than dsize.
This patch fixes CGRecordLowering to avoid an assert and to clip
bitfields properly in this case.  A test case is included.

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

10 years agoCodeGen: add __yield intrinsic for ARM
Saleem Abdulrasool [Fri, 25 Apr 2014 21:13:29 +0000 (21:13 +0000)]
CodeGen: add __yield intrinsic for ARM

The __yield intrinsic generates a hint instruction to indicate that the thread
is not performing any useful operations at the moment.  This is for
compatibility with MSVC, although, the intrinsic is also part of the ACLE, and
is enabled globally as a result.

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

10 years agoMake test pass on 32 bit architectures.
Benjamin Kramer [Fri, 25 Apr 2014 20:49:10 +0000 (20:49 +0000)]
Make test pass on 32 bit architectures.

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

10 years agoPrint detailed vector type information on diagnostics.
Benjamin Kramer [Fri, 25 Apr 2014 20:41:38 +0000 (20:41 +0000)]
Print detailed vector type information on diagnostics.

We never aka vector types because our attributed syntax for it is less
comprehensible than the typedefs. This leaves the user in the dark when
the typedef isn't named that well.

Example:
  v2s v; v4f w;
  w = v;

The naming in this cases isn't even that bad, but the error we give is
useless without looking up the actual typedefs.
t.c:6:5: error: assigning to 'v4f' from incompatible type 'v2s'

Now:
t.c:6:5: error: assigning to 'v4f' (vector of 4 'float' values) from
    incompatible type 'v2s' (vector of 2 'int' values)

We do this for all diagnostics that print a vector type.

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

10 years agoFix leak of GlobalModuleIndex::IdentifierIndex, found by LSan.
Nico Weber [Fri, 25 Apr 2014 19:45:23 +0000 (19:45 +0000)]
Fix leak of GlobalModuleIndex::IdentifierIndex, found by LSan.

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

10 years agoPR19558: don't produce an "unused variable" warning for a variable template partial...
Richard Smith [Fri, 25 Apr 2014 19:21:40 +0000 (19:21 +0000)]
PR19558: don't produce an "unused variable" warning for a variable template partial specialization.

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

10 years agoCodeGen: replace use of @llvm.arm.sevl with @llvm.arm.hint
Saleem Abdulrasool [Fri, 25 Apr 2014 17:25:46 +0000 (17:25 +0000)]
CodeGen: replace use of @llvm.arm.sevl with @llvm.arm.hint

Use the new generic @llvm.arm.hint hint intrinsic rather than the specialised
@llvm.arm.sevl hint instruction.

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

10 years agoCodeGen: Cleanup variable linkage calculation
David Majnemer [Fri, 25 Apr 2014 17:08:41 +0000 (17:08 +0000)]
CodeGen: Cleanup variable linkage calculation

Almost all linkage calculation for VarDecls occured inside of
GetLLVMLinkageVarDefinition except for static data members.  Centralize
the logic so that it can be more readily reused.

No functionality change.

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

10 years agoCodeGen: Refactor linkage/visibility calculation
David Majnemer [Fri, 25 Apr 2014 17:07:16 +0000 (17:07 +0000)]
CodeGen: Refactor linkage/visibility calculation

It turns out that linkage and visibility have rather similar logic for
both functions and non-variable globals.  Split the calculation out so
that both sides may share this code.

No functionality change.

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

10 years agoPush unique_ptr ownership of ASTUnits further back into their factories.
David Blaikie [Fri, 25 Apr 2014 17:01:33 +0000 (17:01 +0000)]
Push unique_ptr ownership of ASTUnits further back into their factories.

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

10 years agoclang-cl: /fallback only applies to C or C++ files
Hans Wennborg [Fri, 25 Apr 2014 16:44:17 +0000 (16:44 +0000)]
clang-cl: /fallback only applies to C or C++ files

We would previously hit an assert if using /fallback with an .ll file.

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

10 years agoclang-cl: pass -debug flag to the linker when compiling with debug info
Hans Wennborg [Fri, 25 Apr 2014 16:24:19 +0000 (16:24 +0000)]
clang-cl: pass -debug flag to the linker when compiling with debug info

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

10 years agoImprove ownership of ASTUnits in libTooling by using std::unique_ptr.
David Blaikie [Fri, 25 Apr 2014 14:49:37 +0000 (14:49 +0000)]
Improve ownership of ASTUnits in libTooling by using std::unique_ptr.

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

10 years agoRevert "Reland r206934 with a hopefully fixed test"
Rafael Espindola [Fri, 25 Apr 2014 13:29:03 +0000 (13:29 +0000)]
Revert "Reland r206934 with a hopefully fixed test"

This reverts commit r207155.
The test was still failing.

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

10 years agofix a test-only leak found by lsan, PR19521
Kostya Serebryany [Fri, 25 Apr 2014 12:58:42 +0000 (12:58 +0000)]
fix a test-only leak found by lsan, PR19521

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

10 years agoCodeGen: Avoid instrumenting implicit Decls more effectively
Justin Bogner [Fri, 25 Apr 2014 07:20:05 +0000 (07:20 +0000)]
CodeGen: Avoid instrumenting implicit Decls more effectively

We don't assign counters for implicit Decls, but we were emitting code
to increment the (non-existent) counters and adding empty counter
lists in the output. This fixes the checks in assignRegionCounters and
emitInstrumentationData to do the right thing, and adds an assert for
the pathological case of emitting zero counters.

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

10 years agobindings: expose C++ access specifiers
Saleem Abdulrasool [Fri, 25 Apr 2014 02:58:03 +0000 (02:58 +0000)]
bindings: expose C++ access specifiers

Expose the enum CX_CXXAccessSpecifier in the python bindings as a property of
the cursor.  If access specifier is not applicable to the node, return the
INVALID specifier rather than raising an exception.

Patch by Tamás Szeli!

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

10 years agoReland r206934 with a hopefully fixed test
Reid Kleckner [Thu, 24 Apr 2014 23:06:17 +0000 (23:06 +0000)]
Reland r206934 with a hopefully fixed test

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

10 years agoIf we see an explicit instantiation declaration or definition of a function
Richard Smith [Thu, 24 Apr 2014 22:45:46 +0000 (22:45 +0000)]
If we see an explicit instantiation declaration or definition of a function
after we've already instantiated a definition for the function, pass it to the
ASTConsumer again so that it knows the specialization kind has changed and can
update the function's linkage.

This only matters if we instantiate the definition of the function before we
reach the end of the TU; this can happen in at least three different ways:
C++11 constexpr functions, C++14 deduced return types, and functions
instantiated within modules.

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

10 years agoMicrosoftVTableContext: Don't leak VPtrInfos. Found by LSan, PR19522.
Nico Weber [Thu, 24 Apr 2014 19:52:12 +0000 (19:52 +0000)]
MicrosoftVTableContext: Don't leak VPtrInfos. Found by LSan, PR19522.

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

10 years agoFix a tiny test-only leak, found by LSan.
Nico Weber [Thu, 24 Apr 2014 19:04:10 +0000 (19:04 +0000)]
Fix a tiny test-only leak, found by LSan.

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

10 years agoIntrin.h: remove __rdtsc and __rdtscp declarations
Hans Wennborg [Thu, 24 Apr 2014 18:40:06 +0000 (18:40 +0000)]
Intrin.h: remove __rdtsc and __rdtscp declarations

Since r207132, these are defined in ia32intrin.h.

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

10 years ago[X86] Add Clang support for intrinsics __rdtsc and __rdtscp.
Andrea Di Biagio [Thu, 24 Apr 2014 18:26:35 +0000 (18:26 +0000)]
[X86] Add Clang support for intrinsics __rdtsc and __rdtscp.

This patch:
 1. Adds a definition for two new GCCBuiltins in BuiltinsX86.def:
   __builtin_ia32_rdtsc;
   __builtin_ia32_rdtscp;

 2. Replaces the already existing definition of intrinsic __rdtsc in
    ia32intrin.h with a simple call to the new GCC builtin __builtin_ia32_rdtsc.

 3. Adds a definition for the new intrinsic __rdtscp in ia32intrin.h

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

10 years agoSquelch leak found by LSan by handling missing switch case.
Jordan Rose [Thu, 24 Apr 2014 17:27:18 +0000 (17:27 +0000)]
Squelch leak found by LSan by handling missing switch case.

Also, use the enum type in the switch so this doesn't happen again.

PR19523

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

10 years ago[mips] Support 128-bit int in N32 ABI by overriding TargetInfo::hasInt128Type()
Daniel Sanders [Thu, 24 Apr 2014 16:05:26 +0000 (16:05 +0000)]
[mips] Support 128-bit int in N32 ABI by overriding TargetInfo::hasInt128Type()

Summary: The condition in the base class is rather strange. It says a target has the 128-bit integer type if the size of a pointer is >= 64-bits. N32 has 32-bit pointers but 64-bit integers. I'm a bit reluctant to change this for all targets so this patch makes the method virtual and overrides it for MIPS64.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: llvm-commits

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

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

10 years agoAArch64: update tests to new way of printing NEON lists.
Tim Northover [Thu, 24 Apr 2014 14:06:31 +0000 (14:06 +0000)]
AArch64: update tests to new way of printing NEON lists.

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

10 years agoCommentToXMLConverter: Don't use "default" to method(s). It is unavailable in msc17.
NAKAMURA Takumi [Thu, 24 Apr 2014 12:44:34 +0000 (12:44 +0000)]
CommentToXMLConverter: Don't use "default" to method(s). It is unavailable in msc17.

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

10 years ago[mips] Correct size_t and ptrdiff_t for N32.
Daniel Sanders [Thu, 24 Apr 2014 09:58:52 +0000 (09:58 +0000)]
[mips] Correct size_t and ptrdiff_t for N32.

Summary:
Correct size_t to be unsigned int and ptrdiff_t to be signed long. The types were the correct size before this change but
the exact type matters for name mangling and exception handling in C++.

Reviewers: atanasyan

Reviewed By: atanasyan

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

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

10 years agoComment to XML conversion: use unique_ptr for SimpleFormatContext
Dmitri Gribenko [Thu, 24 Apr 2014 07:52:31 +0000 (07:52 +0000)]
Comment to XML conversion: use unique_ptr for SimpleFormatContext

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

10 years agoSimplify leak fix of r207076, by just disposing the previous CXString.
Argyrios Kyrtzidis [Thu, 24 Apr 2014 06:05:40 +0000 (06:05 +0000)]
Simplify leak fix of r207076, by just disposing the previous CXString.

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

10 years agoDon't leak _all_ directives in -verify mode. Found by LSan, PR19520.
Nico Weber [Thu, 24 Apr 2014 05:39:55 +0000 (05:39 +0000)]
Don't leak _all_ directives in -verify mode. Found by LSan, PR19520.

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

10 years agoDon't leak invalid RegexDirectives. Probably a small part of PR19520.
Nico Weber [Thu, 24 Apr 2014 05:32:03 +0000 (05:32 +0000)]
Don't leak invalid RegexDirectives. Probably a small part of PR19520.

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

10 years agoFix two leaks found by LSan.
Nico Weber [Thu, 24 Apr 2014 05:16:45 +0000 (05:16 +0000)]
Fix two leaks found by LSan.

A CursorPlatformAvailability can have several "unavailable" attributes, don't
leak all but the first.  I'm not sure if there can be several "deprecate"ds too,
but add the same logic there to keep the two code paths looking the same.

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

10 years agoFix two leaks found by LSan (one is test-only).
Nico Weber [Thu, 24 Apr 2014 04:58:41 +0000 (04:58 +0000)]
Fix two leaks found by LSan (one is test-only).

The result of llvm::MemoryBuffer::getMemBuffer() needs to be freed. Don't
pass "don't free" flag to overrideFileContents() to fix.

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

10 years agoFix two test-only leaks found by LSan.
Nico Weber [Thu, 24 Apr 2014 04:26:18 +0000 (04:26 +0000)]
Fix two test-only leaks found by LSan.

The result of getBufferForFile() must be freed.
(Should we change functions that expect the caller to assume ownership so
that they return unique_ptrs instead? Then the type system makes sure we get
this right.)

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

10 years agoFix two leaks in c-index-test found by LSan.
Nico Weber [Thu, 24 Apr 2014 04:14:12 +0000 (04:14 +0000)]
Fix two leaks in c-index-test found by LSan.

The result of clang_getCursorSpelling() needs to be clang_getCursorSpelling()ed.

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

10 years agoFix four more test-only leaks found by LSan.
Nico Weber [Thu, 24 Apr 2014 03:48:09 +0000 (03:48 +0000)]
Fix four more test-only leaks found by LSan.

Tool::run() doesn't take ownership of the passed action.

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

10 years agoRevert the "don't leak" part of r207065, looks like the bots don't like it :-/
Nico Weber [Thu, 24 Apr 2014 03:31:27 +0000 (03:31 +0000)]
Revert the "don't leak" part of r207065, looks like the bots don't like it :-/
http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/22506

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

10 years agoFix 3 test-only leaks found by LSan.
Nico Weber [Thu, 24 Apr 2014 03:30:22 +0000 (03:30 +0000)]
Fix 3 test-only leaks found by LSan.

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

10 years agoMore spellchecking for Index.h
Nico Weber [Thu, 24 Apr 2014 03:17:47 +0000 (03:17 +0000)]
More spellchecking for Index.h

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

10 years agocompeltions are never appropriate.
Nico Weber [Thu, 24 Apr 2014 03:06:18 +0000 (03:06 +0000)]
compeltions are never appropriate.

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

10 years agoDon't leak objects in load-from-ast path unless DisableFree is set.
Nico Weber [Thu, 24 Apr 2014 02:42:04 +0000 (02:42 +0000)]
Don't leak objects in load-from-ast path unless DisableFree is set.

Also update a comment to match a code change that was done in r110978.

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

10 years agoWhen two templates get merged together, also merge their pattern declarations
Richard Smith [Thu, 24 Apr 2014 02:25:27 +0000 (02:25 +0000)]
When two templates get merged together, also merge their pattern declarations
together. This is extremely hairy, because in general we need to have loaded
both the template and the pattern before we can determine whether either should
be merged, so we temporarily violate the rule that all merging happens before
reading a decl ends, but *only* in the case where a template's pattern is being
loaded while loading the template itself.

In order to accomodate this for class templates, delay loading the injected
class name type for the pattern of the template until after we've loaded the
template itself, if we happen to load the template first.

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

10 years agoFix test to not depend on llvm optimizations.
Michael J. Spencer [Thu, 24 Apr 2014 02:16:29 +0000 (02:16 +0000)]
Fix test to not depend on llvm optimizations.

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

10 years agoBury leaked sema pointer when reading from AST files.
Nico Weber [Thu, 24 Apr 2014 00:51:03 +0000 (00:51 +0000)]
Bury leaked sema pointer when reading from AST files.

Should suppress several LSan reports.

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

10 years agoFix another leak in ParseMicrosoftAsmStatement(), found by LSan.
Nico Weber [Wed, 23 Apr 2014 22:07:21 +0000 (22:07 +0000)]
Fix another leak in ParseMicrosoftAsmStatement(), found by LSan.

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

10 years agoSuppress unused variable warning
Reid Kleckner [Wed, 23 Apr 2014 22:03:04 +0000 (22:03 +0000)]
Suppress unused variable warning

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

10 years agoChange -Wfloating-point-conversion to -Wfloat-conversion.
Richard Trieu [Wed, 23 Apr 2014 21:53:59 +0000 (21:53 +0000)]
Change -Wfloating-point-conversion to -Wfloat-conversion.

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

10 years agoFixed comments (thanks to Richard Smith).
Abramo Bagnara [Wed, 23 Apr 2014 21:49:00 +0000 (21:49 +0000)]
Fixed comments (thanks to Richard Smith).

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

10 years agoMake RewriteRope less confusing for me. No intended behavior change.
Nico Weber [Wed, 23 Apr 2014 21:42:27 +0000 (21:42 +0000)]
Make RewriteRope less confusing for me. No intended behavior change.

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

10 years agoFix leak introduced in r194610, found by LSan.
Nico Weber [Wed, 23 Apr 2014 21:41:51 +0000 (21:41 +0000)]
Fix leak introduced in r194610, found by LSan.

LSan folks: LSan pointed to
    #0 0x4953e0 in operator new[](unsigned long) llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:64
    #1 0x7fb82af5372f in clang::RewriteRope::MakeRopeString(char const*, char const*) llvm/tools/clang/lib/Rewrite/Core/RewriteRope.cpp:796
instead of to the actual leak, which made tracking this down slower than
it could have been.

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

10 years agoMoved operator delete to public area to appease gcc and conform to C++ standard.
Abramo Bagnara [Wed, 23 Apr 2014 21:28:18 +0000 (21:28 +0000)]
Moved operator delete to public area to appease gcc and conform to C++ standard.

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

10 years agoDo not print inferred submodules explicitly in __inferred_module.map
Ben Langmuir [Wed, 23 Apr 2014 21:10:46 +0000 (21:10 +0000)]
Do not print inferred submodules explicitly in __inferred_module.map

Otherwise including a header in your source file that is not included by
framework's umbrella header will silently add an empty submodule with that
name.

is automatically translated to
@import Foo.NotInModule;

which then would have succeeded because the inferred module map
contained an empty submodule called NotInModule.

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

10 years agoFix a memory leak found by LSan.
Nico Weber [Wed, 23 Apr 2014 19:19:20 +0000 (19:19 +0000)]
Fix a memory leak found by LSan.

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

10 years agoQuick fix for layering that broke shared library build.
John Thompson [Wed, 23 Apr 2014 19:04:32 +0000 (19:04 +0000)]
Quick fix for layering that broke shared library build.

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

10 years agoMS ABI: Use a different guard variable for each weak global
Reid Kleckner [Wed, 23 Apr 2014 18:22:11 +0000 (18:22 +0000)]
MS ABI: Use a different guard variable for each weak global

We were using the same guard variable and failing to initialize the
second global.

Clang is still not MS ABI compatible in this area.  Fixing that is
PR16959, which will require LLVM changes to @llvm.global_ctors.

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

10 years agoMake TypeDecl much less friendly.
Richard Smith [Wed, 23 Apr 2014 18:20:42 +0000 (18:20 +0000)]
Make TypeDecl much less friendly.

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

10 years agoObjective-C [IRGen]. Fixes a crash in IRGen involving use of
Fariborz Jahanian [Wed, 23 Apr 2014 17:44:58 +0000 (17:44 +0000)]
Objective-C [IRGen]. Fixes a crash in IRGen involving use of
'typeof' to extract type of an @encode expression used
in an initializer. // rdar://16655340

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

10 years ago[analyzer] Fix a leak found by LSan.
Jordan Rose [Wed, 23 Apr 2014 16:54:52 +0000 (16:54 +0000)]
[analyzer] Fix a leak found by LSan.

PR19524

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

10 years agoDon't pass llvm::DenseSet<> by value.
Alexander Kornienko [Wed, 23 Apr 2014 16:39:41 +0000 (16:39 +0000)]
Don't pass llvm::DenseSet<> by value.

Summary: Fixes massive performance problems on large translation units.

Reviewers: jordan_rose

Reviewed By: jordan_rose

Subscribers: cfe-commits

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

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

10 years agoReview feedback.
Diego Novillo [Wed, 23 Apr 2014 15:21:23 +0000 (15:21 +0000)]
Review feedback.

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

10 years agoReview feedback.
Diego Novillo [Wed, 23 Apr 2014 15:21:21 +0000 (15:21 +0000)]
Review feedback.

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

10 years agoReview feedback
Diego Novillo [Wed, 23 Apr 2014 15:21:20 +0000 (15:21 +0000)]
Review feedback

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

10 years agoAdd documentation for sample profiling support.
Diego Novillo [Wed, 23 Apr 2014 15:21:07 +0000 (15:21 +0000)]
Add documentation for sample profiling support.

Summary:
This documents the usage of sample profilers with Clang and the
profile format expected by LLVM's optimizers. It also documents the
profile conversion tool used by Linux Perf.

Reviewers: doug.gregor

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

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

10 years agoPrune \param introduced in r206977, possibly committed ahead. [-Wdocumentation]
NAKAMURA Takumi [Wed, 23 Apr 2014 15:13:39 +0000 (15:13 +0000)]
Prune \param introduced in r206977, possibly committed ahead. [-Wdocumentation]

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

10 years agoAdd missing test input for r206979.
Logan Chien [Wed, 23 Apr 2014 15:00:03 +0000 (15:00 +0000)]
Add missing test input for r206979.

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

10 years agoThe rewrite constructor should actually rewrite.
Aaron Ballman [Wed, 23 Apr 2014 14:40:19 +0000 (14:40 +0000)]
The rewrite constructor should actually rewrite.

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

10 years agoReplacing a naked pointer with a unique_ptr. No functional changes intended.
Aaron Ballman [Wed, 23 Apr 2014 14:26:59 +0000 (14:26 +0000)]
Replacing a naked pointer with a unique_ptr. No functional changes intended.

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

10 years agoMinor formatting and simplification cleanup -- no functional changes intended.
Aaron Ballman [Wed, 23 Apr 2014 14:22:06 +0000 (14:22 +0000)]
Minor formatting and simplification cleanup -- no functional changes intended.

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

10 years agoUpdated to be a bit more const friendly. Also switched the linkage to be static since...
Aaron Ballman [Wed, 23 Apr 2014 13:58:21 +0000 (13:58 +0000)]
Updated to be a bit more const friendly. Also switched the linkage to be static since this function is file-local. No functional changes intended.

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

10 years agoFix unused variable.
John Thompson [Wed, 23 Apr 2014 13:45:44 +0000 (13:45 +0000)]
Fix unused variable.

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

10 years agoAdd aarch64-linux-android triple for Android.
Logan Chien [Wed, 23 Apr 2014 13:36:23 +0000 (13:36 +0000)]
Add aarch64-linux-android triple for Android.

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

10 years agoInitial implementation of -modules-earch-all option, for searching for symbols in...
John Thompson [Wed, 23 Apr 2014 12:57:01 +0000 (12:57 +0000)]
Initial implementation of -modules-earch-all option, for searching for symbols in non-imported modules.

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

10 years agoAdd yet another vtordisp test
Timur Iskhodzhanov [Wed, 23 Apr 2014 12:46:26 +0000 (12:46 +0000)]
Add yet another vtordisp test

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

10 years agoThis reverts commit r206934 and r206935.
Rafael Espindola [Wed, 23 Apr 2014 12:38:13 +0000 (12:38 +0000)]
This reverts commit r206934 and r206935.

The original messages were:
  "Driver: Honor %INCLUDE% when built with MinGW"
  "Add missing test triples"

The test was still failing on OS X.

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

10 years agoUpdate Target::createMCAsmParser calls for the LLVM interface change.
Evgeniy Stepanov [Wed, 23 Apr 2014 11:15:49 +0000 (11:15 +0000)]
Update Target::createMCAsmParser calls for the LLVM interface change.

Patch by Yuri Gorshenin.

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

10 years ago[ARM64] Enable more CodeGen tests for ARM64. The crypto and neon intrinsics tests...
James Molloy [Wed, 23 Apr 2014 10:26:23 +0000 (10:26 +0000)]
[ARM64] Enable more CodeGen tests for ARM64. The crypto and neon intrinsics tests needed changing slightly due to the naming differences between AArch64 and ARM64.

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

10 years ago[ARM64] Change inline assembly constraints to be more lax, to match the behaviour...
James Molloy [Wed, 23 Apr 2014 10:26:19 +0000 (10:26 +0000)]
[ARM64] Change inline assembly constraints to be more lax, to match the behaviour of Clang/AArch64 and GCC.

GCC allows sub-64bit values to use the 'r' register constraint.

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

10 years ago[ARM64] Enable the test aarch64-type-sizes.c for ARM64 BE.
James Molloy [Wed, 23 Apr 2014 10:26:12 +0000 (10:26 +0000)]
[ARM64] Enable the test aarch64-type-sizes.c for ARM64 BE.

This completes the port of r203918 (cpirker "AArch64_be specific clang target settings") to ARM64.

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

10 years ago[ARM64] Add a missed case label for arm64_be, and enable the aarch64-varargs test...
James Molloy [Wed, 23 Apr 2014 10:26:08 +0000 (10:26 +0000)]
[ARM64] Add a missed case label for arm64_be, and enable the aarch64-varargs test for arm64_be.

This ensures that r203917 (cpirker "AArch64_be varargs processing for ARM ABI") is ported to ARM64.

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

10 years agoMS ABI: Implement mangling for ref-qualifiers on methods
David Majnemer [Wed, 23 Apr 2014 05:16:56 +0000 (05:16 +0000)]
MS ABI: Implement mangling for ref-qualifiers on methods

Mangle ref-qualifiers like the Nov 2013 CTP.

This fixes PR19361.

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

10 years agoMS ABI: Use range-based for loops in the mangler
David Majnemer [Wed, 23 Apr 2014 05:16:53 +0000 (05:16 +0000)]
MS ABI: Use range-based for loops in the mangler

No functional change.

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

10 years agoMS ABI: Cleanup some egregious style violations
David Majnemer [Wed, 23 Apr 2014 05:16:51 +0000 (05:16 +0000)]
MS ABI: Cleanup some egregious style violations

No functional change.

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

10 years agoAST: Cleanup/simplify some LV calculation code
David Majnemer [Wed, 23 Apr 2014 05:16:48 +0000 (05:16 +0000)]
AST: Cleanup/simplify some LV calculation code

No functional change.

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

10 years agoCodeGen: Unify handling guard variables in the Itanium C++ ABI
Justin Bogner [Wed, 23 Apr 2014 01:50:10 +0000 (01:50 +0000)]
CodeGen: Unify handling guard variables in the Itanium C++ ABI

We previously treated ARM separately from the generic Itanium ABI for
initializing guard variables. This code duplication led to things like
the ARM path missing the memory barrier for threadsafe handling, and a
highly misleading comment about how we were (mis)using the generic ABI
for ARM64 when really it went through the ARM codepath.

This unifies the two code paths. Functionally, this changes the ARM
and ARM64 codepath to use one byte loads instead of 4 and 8,
respectively, and adds the missing atomic acquire to these loads.
Other architectures are unchanged.

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