]> granicus.if.org Git - clang/log
clang
10 years agoPass -gdwarf-N options to integrated assembler
Oliver Stannard [Mon, 19 May 2014 13:39:13 +0000 (13:39 +0000)]
Pass -gdwarf-N options to integrated assembler

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

10 years agoARM: PCS non-compliance when struct is padded to avoid register/stack split, and...
Oliver Stannard [Mon, 19 May 2014 13:10:05 +0000 (13:10 +0000)]
ARM: PCS non-compliance when struct is padded to avoid register/stack split, and requires internal padding

When we were padding a struct to avoid splitting it between registers and
the stack, we were throwing away the type which the argument should be coerced
to.

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

10 years agoMake the ARCMT tests self-contained.
Manuel Klimek [Mon, 19 May 2014 11:51:44 +0000 (11:51 +0000)]
Make the ARCMT tests self-contained.

This is necessary to reduce staging times on parallel build systems.

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

10 years agoclang-format: Don't force line breaks in ObjC calls with ColumnLimit 0.
Daniel Jasper [Mon, 19 May 2014 08:06:34 +0000 (08:06 +0000)]
clang-format: Don't force line breaks in ObjC calls with ColumnLimit 0.

Before:
  [self.x a:b c:d];

Got reformatted toi (with ColumnLimit set to 0):
  [self.x a:b
          c:d];

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

10 years agoclang-format: [JS] Support ES6 destructuring assignments.
Daniel Jasper [Mon, 19 May 2014 07:37:07 +0000 (07:37 +0000)]
clang-format: [JS] Support ES6 destructuring assignments.

Before:
  var[a, b, c] = [1, 2, 3];

After:
  var [a, b, c] = [1, 2, 3];

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

10 years agoclang-format: [JS] Support for EC6 arrow functions.
Daniel Jasper [Mon, 19 May 2014 07:27:02 +0000 (07:27 +0000)]
clang-format: [JS] Support for EC6 arrow functions.

Before:
  var b = a.map((x) = > x + 1);

After:
  var b = a.map((x) => x + 1);

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

10 years agoRAV reunification: MSPropertyRefExpr visitation
Alp Toker [Sun, 18 May 2014 21:01:45 +0000 (21:01 +0000)]
RAV reunification: MSPropertyRefExpr visitation

r179585 introduced different MSPropertyRefExpr visitation for RAV and DRAV that
appears to have been unintentional. Let's use the more complete one.

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

10 years agoRAV reunification: merge r162133 (visit the TypeLoc when RecursiveASTVisitor visits...
Alp Toker [Sun, 18 May 2014 21:00:44 +0000 (21:00 +0000)]
RAV reunification: merge r162133 (visit the TypeLoc when RecursiveASTVisitor visits a CompoundLiteralExpr)

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

10 years agoOngoing RAV reunification
Alp Toker [Sun, 18 May 2014 18:38:28 +0000 (18:38 +0000)]
Ongoing RAV reunification

 * Shuffle around code to reduce delta between the two RAVs.
 * Merge r189185 that was applied only to one of the RAVs and became apparent during the unification work.
 * Fix Enqueue data recursion typo.

Our delta is down to +-579!

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

10 years agoFormat the two RecursiveASTVisitors
Alp Toker [Sun, 18 May 2014 18:38:19 +0000 (18:38 +0000)]
Format the two RecursiveASTVisitors

Apply current ToT clang-format on the two RAVs to reduce delta and help
identify differences between the two.

We lose a little pretty formatting in the headers but that's the price to pay
so we can diff these two files effectively and look to a future where we don't
have to maintain two copies of this code.

Formatting and whitespace only.

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

10 years agoBegin RAV reunification: s/DataRecursiveASTVisitor/RecursiveASTVisitor/
Alp Toker [Sun, 18 May 2014 18:38:08 +0000 (18:38 +0000)]
Begin RAV reunification: s/DataRecursiveASTVisitor/RecursiveASTVisitor/

Define a macro to reduce the delta between RecursiveASTVisitor and
DataRecursiveASTVisitor.

Some years ago, someone thought it was a good idea to copy the entire RAV to
support cursor visitation in libclang.

Since then the two have diverged needlessly and the rest is history.

This series of commits aims to reduce delta between the two so that we can
reason about their differences, apply bugfixes that were only made to one but
not the other, and ultimately find a way to unify two two chunks of code.

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

10 years agoRemove historical Unicode TODOs
Alp Toker [Sun, 18 May 2014 18:37:59 +0000 (18:37 +0000)]
Remove historical Unicode TODOs

There's no immediate demand or plan to work on these.

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

10 years agoRemove unused diagnostic.
Benjamin Kramer [Sun, 18 May 2014 12:05:21 +0000 (12:05 +0000)]
Remove unused diagnostic.

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

10 years agoDriver: force restricted IT blocks for Windows on ARM
Saleem Abdulrasool [Sun, 18 May 2014 06:42:02 +0000 (06:42 +0000)]
Driver: force restricted IT blocks for Windows on ARM

Windows on ARM expects ARMv8 (restricted IT) conditional instructions only.
Force enable the restricted IT mode via the backend option when targeting WoA.

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

10 years ago[C++11] Use 'nullptr'. Lex edition.
Craig Topper [Sat, 17 May 2014 23:10:59 +0000 (23:10 +0000)]
[C++11] Use 'nullptr'. Lex edition.

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

10 years agoUpdate for llvm api change.
Rafael Espindola [Sat, 17 May 2014 21:30:14 +0000 (21:30 +0000)]
Update for llvm api change.

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

10 years agoUpdate for llvm api change.
Rafael Espindola [Sat, 17 May 2014 19:58:16 +0000 (19:58 +0000)]
Update for llvm api change.

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

10 years ago[C++11] Use 'nullptr'. ASTMatchers edition.
Craig Topper [Sat, 17 May 2014 18:49:24 +0000 (18:49 +0000)]
[C++11] Use 'nullptr'. ASTMatchers edition.

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

10 years ago[C++11] Use 'nullptr'. Driver edition.
Craig Topper [Sat, 17 May 2014 16:56:41 +0000 (16:56 +0000)]
[C++11] Use 'nullptr'. Driver edition.

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

10 years agoCodeGen: remove MinGW and Cygwin legacy entries
Saleem Abdulrasool [Sat, 17 May 2014 15:46:59 +0000 (15:46 +0000)]
CodeGen: remove MinGW and Cygwin legacy entries

These are now treated as environments.  Remove references to these enumeration
values in order to clean up the unused enumeration entries in LLVM.  The target
normalisation prior to tool invocation should ensure that the old values
continue to function properly.

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

10 years agoProvide and use a safe Token::getRawIdentifier() accessor
Alp Toker [Sat, 17 May 2014 04:53:25 +0000 (04:53 +0000)]
Provide and use a safe Token::getRawIdentifier() accessor

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

10 years agoMore fixes for isBetterOverloadCandidate not being a strict weak ordering. The
Richard Smith [Sat, 17 May 2014 04:36:39 +0000 (04:36 +0000)]
More fixes for isBetterOverloadCandidate not being a strict weak ordering. The
bug was obvious from inspection, figuring out a way to test it was... less so.

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

10 years ago[objcmt] Don't wrap a PCH generation action with a ObjCMigrateAction one, it messes...
Argyrios Kyrtzidis [Sat, 17 May 2014 04:35:12 +0000 (04:35 +0000)]
[objcmt] Don't wrap a PCH generation action with a ObjCMigrateAction one, it messes up the PCH file.

rdar://16941811

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

10 years agoSwitch to a more efficient expression of this check.
Richard Smith [Sat, 17 May 2014 02:21:47 +0000 (02:21 +0000)]
Switch to a more efficient expression of this check.

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

10 years agoCorrect incoherent function versus function template partial ordering for conversion...
Richard Smith [Sat, 17 May 2014 01:58:45 +0000 (01:58 +0000)]
Correct incoherent function versus function template partial ordering for conversion operators (the comparison could claim that two conversion operators are both better than each other). Actually implement DR495, rather than passing its test by chance because the declarations happened to be in the "lucky" order.

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

10 years agoTweak diagnostic wording for init list narrowing
Alp Toker [Sat, 17 May 2014 01:13:18 +0000 (01:13 +0000)]
Tweak diagnostic wording for init list narrowing

The conventional form is '<action> to silence this warning'.

Also call the diagnostic an 'issue' rather than a 'message' because the latter
term is more widely used with reference to message expressions.

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

10 years agoAdd missed file from r209046.
Richard Smith [Fri, 16 May 2014 23:16:06 +0000 (23:16 +0000)]
Add missed file from r209046.

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

10 years agoIf a declaration is loaded, and then a module import adds a redeclaration, then
Richard Smith [Fri, 16 May 2014 23:01:30 +0000 (23:01 +0000)]
If a declaration is loaded, and then a module import adds a redeclaration, then
ensure that querying the first declaration for its most recent declaration
checks for redeclarations from the imported module.

This works as follows:
 * The 'most recent' pointer on a canonical declaration grows a pointer to the
   external AST source and a generation number (space- and time-optimized for
   the case where there is no external source).
 * Each time the 'most recent' pointer is queried, if it has an external source,
   we check whether it's up to date, and update it if not.
 * The ancillary data stored on the canonical declaration is allocated lazily
   to avoid filling it in for declarations that end up being non-canonical.
   We'll still perform a redundant (ASTContext) allocation if someone asks for
   the most recent declaration from a decl before setPreviousDecl is called,
   but such cases are probably all bugs, and are now easy to find.

Some finessing is still in order here -- in particular, we use a very general
mechanism for handling the DefinitionData pointer on CXXRecordData, and a more
targeted approach would be more compact.

Also, the MayHaveOutOfDateDef mechanism should now be expunged, since it was
addressing only a corner of the full problem space here. That's not covered
by this patch.

Early performance benchmarks show that this makes no measurable difference to
Clang performance without modules enabled (and fixes a major correctness issue
with modules enabled). I'll revert if a full performance comparison shows any
problems.

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

10 years agoUse getAliasee instead of getAliasedGlobal.
Rafael Espindola [Fri, 16 May 2014 22:20:18 +0000 (22:20 +0000)]
Use getAliasee instead of getAliasedGlobal.

No functionality change.

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

10 years agoMissed a ! in the if statement when these were being set and the options
Eric Christopher [Fri, 16 May 2014 20:46:14 +0000 (20:46 +0000)]
Missed a ! in the if statement when these were being set and the options
are inverted in clang and llvm.

I'll attempt to get a testcase for this that doesn't involve compiling to .s,
but it's unlikely.

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

10 years agoUpdate for llvm api change.
Rafael Espindola [Fri, 16 May 2014 19:35:48 +0000 (19:35 +0000)]
Update for llvm api change.

Now that llvm cannot represent alias cycles, we have to diagnose erros just
before trying to close the cycle. This degrades the errors a bit. The real
solution is what it was before: if we want to provide good errors for these
cases, we have to be able to find a clang level decl given a mangled name
and produce the error from Sema.

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

10 years ago[ASTMatchers] Move the 'isImplicit' matcher from CXXConstructorDecl to Decl.
Joey Gouly [Fri, 16 May 2014 19:31:08 +0000 (19:31 +0000)]
[ASTMatchers] Move the 'isImplicit' matcher from CXXConstructorDecl to Decl.

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

10 years agoMerge a couple of copy-and-pasted functions
Alp Toker [Fri, 16 May 2014 18:59:21 +0000 (18:59 +0000)]
Merge a couple of copy-and-pasted functions

No change in functionality.

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

10 years agoRename SourceManager::createFileIDForMemBuffer()
Alp Toker [Fri, 16 May 2014 17:23:01 +0000 (17:23 +0000)]
Rename SourceManager::createFileIDForMemBuffer()

It makes more sense to just overload createFileID().

Gardening only.

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

10 years agoTooling: use stderr, not stdout for missing command line messages
Alp Toker [Fri, 16 May 2014 13:45:29 +0000 (13:45 +0000)]
Tooling: use stderr, not stdout for missing command line messages

Matches other tooling output that use stderr.

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

10 years agoUpdate for llvm API change.
Rafael Espindola [Fri, 16 May 2014 13:34:28 +0000 (13:34 +0000)]
Update for llvm API change.

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

10 years agoImprove a scan-build message
Sylvestre Ledru [Fri, 16 May 2014 07:03:15 +0000 (07:03 +0000)]
Improve a scan-build message

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

10 years agoInstrProf: Look for the PIC-version of the profile runtime
Duncan P. N. Exon Smith [Fri, 16 May 2014 04:09:41 +0000 (04:09 +0000)]
InstrProf: Look for the PIC-version of the profile runtime

If `-shared` is specified, pull in a PIC-version of the profile runtime,
which was added to compiler-rt in r208947.  I'm hoping this will get the
bots on my side.

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

10 years agoPush implicitly-declared allocation functions into the IdResolver. Otherwise,
Richard Smith [Fri, 16 May 2014 02:14:42 +0000 (02:14 +0000)]
Push implicitly-declared allocation functions into the IdResolver. Otherwise,
declaration merging in modules is unable to find them and we get bogus errors
and even crashes.

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

10 years agoReplace a fake enum class with the real thing.
Richard Smith [Fri, 16 May 2014 01:56:53 +0000 (01:56 +0000)]
Replace a fake enum class with the real thing.

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

10 years agoSwitch another write_escaped to yaml::escape
Ben Langmuir [Fri, 16 May 2014 01:38:59 +0000 (01:38 +0000)]
Switch another write_escaped to yaml::escape

I missed one in r206443.

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

10 years agoInstrProf: Set profile data to visibility hidden
Duncan P. N. Exon Smith [Fri, 16 May 2014 01:24:00 +0000 (01:24 +0000)]
InstrProf: Set profile data to visibility hidden

Shared objects are fairly broken for InstrProf right now -- a follow-up
commit in compiler-rt will fix the rest of this.

The main problem here is that at link time, profile data symbols in the
shared object might get used instead of symbols from the main
executable, creating invalid profile data sections.

<rdar://problem/16918688>

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

10 years agotest/CodeGenCXX/dllexport.cpp: we already correctly emit b() even when
Hans Wennborg [Fri, 16 May 2014 00:09:31 +0000 (00:09 +0000)]
test/CodeGenCXX/dllexport.cpp: we already correctly emit b() even when
it's not used, because CodeGenModule::EmitGlobal consults
ASTContext::DeclMustBeEmitted via CodeGenModule::MayDeferGeneration.

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

10 years agoMS ABI: Use musttail for thunk IR generation
Reid Kleckner [Thu, 15 May 2014 23:01:46 +0000 (23:01 +0000)]
MS ABI: Use musttail for thunk IR generation

This allows us to perfectly forward non-trivial arguments that use
inalloca.

We still can't forward non-trivial arguments through thunks when we have
a covariant return type with a non-trivial adjustment.  This would
require emitting an extra copy, which is non-conforming anyway.

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

10 years agoEliminate DefaultImageName from the Driver constructor
Alp Toker [Thu, 15 May 2014 22:26:36 +0000 (22:26 +0000)]
Eliminate DefaultImageName from the Driver constructor

All callers were passing in "a.out" or garbage so a sensible default works fine
here as a cleanup.

This also brings about the possibility of adapting the value based on the
driver's compatibility mode in future.

The setting can still be changed via Driver::DefaultImageName as needed.

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

10 years agoAllow dllimport/dllexport on inline functions and adjust the linkage.
Hans Wennborg [Thu, 15 May 2014 22:07:49 +0000 (22:07 +0000)]
Allow dllimport/dllexport on inline functions and adjust the linkage.

This is a step towards handling these attributes on classes (PR11170).

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

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

10 years agoThread Safety Analysis: fixes to SExpr pretty printing.
DeLesley Hutchins [Thu, 15 May 2014 22:07:41 +0000 (22:07 +0000)]
Thread Safety Analysis: fixes to SExpr pretty printing.

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

10 years agoRefactoring another for loop to use a range-based for loop instead. Also cleaned...
Aaron Ballman [Thu, 15 May 2014 20:58:55 +0000 (20:58 +0000)]
Refactoring another for loop to use a range-based for loop instead. Also cleaned up a bit of formatting. No functional changes intended.

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

10 years agoRefactoring some for loops to use range-based for loops instead. No functional change...
Aaron Ballman [Thu, 15 May 2014 20:50:47 +0000 (20:50 +0000)]
Refactoring some for loops to use range-based for loops instead. No functional changes intended.

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

10 years agoUse the virtual name of headers when searching for a module
Ben Langmuir [Thu, 15 May 2014 16:20:33 +0000 (16:20 +0000)]
Use the virtual name of headers when searching for a module

When using the VFS, we want the virtual header location when searching
for a framework module, since that will be the one in the correct
directory structure for the module.

I'll add a regression test once I finish reducing the larger one I have.

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

10 years agoclang-format: Fix Sphinx build error.
Daniel Jasper [Thu, 15 May 2014 13:55:19 +0000 (13:55 +0000)]
clang-format: Fix Sphinx build error.

Patch by Adam Strzelecki, thank you!

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

10 years agoC++11 - Use nullptr in lib/Sema/SemaOpenMP.cpp and some reformatting (no functional...
Alexander Musman [Thu, 15 May 2014 13:04:49 +0000 (13:04 +0000)]
C++11 - Use nullptr in lib/Sema/SemaOpenMP.cpp and some reformatting (no functional changes).

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

10 years agoARM64: update tests now that we print "mov" & "mvn".
Tim Northover [Thu, 15 May 2014 12:11:10 +0000 (12:11 +0000)]
ARM64: update tests now that we print "mov" & "mvn".

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

10 years agoAArch64: update test after LLVM CodeGen change
Tim Northover [Thu, 15 May 2014 11:21:39 +0000 (11:21 +0000)]
AArch64: update test after LLVM CodeGen change

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

10 years agoAST: Remove dead-code/update reference to standard
David Majnemer [Thu, 15 May 2014 06:25:57 +0000 (06:25 +0000)]
AST: Remove dead-code/update reference to standard

GetGVALinkageForFunction handles TSK_ExplicitInstantiationDeclaration
twice, remove the redundant code trying to handle it again.

While we are here, update the reference we make to the standard.  It
seems like another paragraph was added causing this text to get
renumbered.

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

10 years ago[libclang] Introduce clang_Module_isSystem(), which returns non-zero if the given...
Argyrios Kyrtzidis [Thu, 15 May 2014 04:44:25 +0000 (04:44 +0000)]
[libclang] Introduce clang_Module_isSystem(), which returns non-zero if the given CXModule is a system one.

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

10 years agoReplace completely bogus ambiguous-compound-literal-in-C++ code with something
Richard Smith [Thu, 15 May 2014 02:51:15 +0000 (02:51 +0000)]
Replace completely bogus ambiguous-compound-literal-in-C++ code with something
that isn't always wrong.

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

10 years agoPR19748: Make sure we don't lose colon protection after the parenthesized type-id...
Richard Smith [Thu, 15 May 2014 02:43:47 +0000 (02:43 +0000)]
PR19748: Make sure we don't lose colon protection after the parenthesized type-id in a cast-expression.

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

10 years agoFix typos
Alp Toker [Thu, 15 May 2014 01:35:53 +0000 (01:35 +0000)]
Fix typos

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

10 years agoRevert Itanium parts of "Don't copy objects with trivial, deleted copy ctors"
Reid Kleckner [Thu, 15 May 2014 01:26:32 +0000 (01:26 +0000)]
Revert Itanium parts of "Don't copy objects with trivial, deleted copy ctors"

This undoes half of r208786.

It had problems with lazily declared special members in cases like this:
  struct A {
    A();
    A &operator=(A &&o);
    void *p;
  };
  void foo(A);
  void bar() {
    foo({});
  }

In this case, the copy and move constructors are implicitly deleted.
However, Clang doesn't eagerly declare the copy ctor in the AST, so we
pass the struct in registers.  Furthermore, GCC passes this in registers
even though this class should be uncopyable.

Revert this for now until the dust settles.

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

10 years agoFill in the options in the MCOptions struct directly like the other
Eric Christopher [Thu, 15 May 2014 01:21:56 +0000 (01:21 +0000)]
Fill in the options in the MCOptions struct directly like the other
options.

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

10 years agoThread Safety Analysis: add new node types to thread safety TIL.
DeLesley Hutchins [Thu, 15 May 2014 00:50:36 +0000 (00:50 +0000)]
Thread Safety Analysis: add new node types to thread safety TIL.
This fills in a few missing gaps in functionality.

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

10 years agoPR19742: cv-qualifiers and ref-qualifiers aren't allowed on functions within
Richard Smith [Wed, 14 May 2014 23:23:27 +0000 (23:23 +0000)]
PR19742: cv-qualifiers and ref-qualifiers aren't allowed on functions within
pointer and reference types, even if those types are produced by template
instantiation.

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

10 years agoWhen an overloaded comparison operator returns a reference, do not consider
Richard Trieu [Wed, 14 May 2014 23:22:10 +0000 (23:22 +0000)]
When an overloaded comparison operator returns a reference, do not consider
it for -Wunused-comparion warnings.  This fixes PR19724.

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

10 years ago[liblang] Introduce clang_getModuleForFile, which given a CXFile header file, returns...
Argyrios Kyrtzidis [Wed, 14 May 2014 23:14:37 +0000 (23:14 +0000)]
[liblang] Introduce clang_getModuleForFile, which given a CXFile header file, returns the module that contains it, if one exists.

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

10 years agoMake verbose clang builds also build compiler_rt verbosely
Jonathan Roelofs [Wed, 14 May 2014 23:07:16 +0000 (23:07 +0000)]
Make verbose clang builds also build compiler_rt verbosely

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

10 years agoConverting some for loops to use range-based for loops. No functional changes intended.
Aaron Ballman [Wed, 14 May 2014 20:42:13 +0000 (20:42 +0000)]
Converting some for loops to use range-based for loops. No functional changes intended.

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

10 years agoRename CodeGenModule::getLLVMLinkageforDeclarator -> getLLVMLinkageForDeclarator
Hans Wennborg [Wed, 14 May 2014 19:54:53 +0000 (19:54 +0000)]
Rename CodeGenModule::getLLVMLinkageforDeclarator -> getLLVMLinkageForDeclarator

No functionality change.

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

10 years agoAmending r208783 based on a suggestion by David Blaikie.
Aaron Ballman [Wed, 14 May 2014 18:32:59 +0000 (18:32 +0000)]
Amending r208783 based on a suggestion by David Blaikie.

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

10 years agoWhen we generate a redeclaration for an
John McCall [Wed, 14 May 2014 18:31:48 +0000 (18:31 +0000)]
When we generate a redeclaration for an
elaborated-type-specifier, place it in the correct
context.

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

10 years agoclang-cl: Fall back immediately if /GR and /fallback were both passed
Reid Kleckner [Wed, 14 May 2014 16:03:05 +0000 (16:03 +0000)]
clang-cl: Fall back immediately if /GR and /fallback were both passed

None of our tests use /fallback, so this lets us gradually add RTTI
support without breaking projects using /fallback.

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

10 years agoDon't copy objects with trivial, deleted copy ctors
Reid Kleckner [Wed, 14 May 2014 16:02:09 +0000 (16:02 +0000)]
Don't copy objects with trivial, deleted copy ctors

This affects both the Itanium and Microsoft C++ ABIs.

This is in anticipation of a change to the Itanium C++ ABI, and should
match GCC's current behavior.  The new text will likely be:

"""
Pass an object of class type by value if every copy constructor and
move constructor is deleted or trivial and at least one of them is not
deleted, and the destructor is trivial.
"""
http://sourcerytools.com/pipermail/cxx-abi-dev/2014-May/002728.html

On x86 Windows, we can mostly use the same logic, where we use inalloca
instead of passing by address.  However, on Win64, there are register
parameters, and we have to do what MSVC does.  MSVC ignores the presence
of non-trivial move constructors and only considers the presence of
non-trivial or deleted copy constructors.  If a non-trivial or deleted
copy ctor is present, it passes the argument indirectly.

This change fixes bugs and makes us more ABI compatible with both GCC
and MSVC.

Fixes PR19668.

Reviewers: rsmith

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

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

10 years agoReplacing some manual iterations with standard algorithms. No functional changes...
Aaron Ballman [Wed, 14 May 2014 15:01:43 +0000 (15:01 +0000)]
Replacing some manual iterations with standard algorithms. No functional changes intended.

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

10 years agoFormatting and style changes; no functional changes intended.
Aaron Ballman [Wed, 14 May 2014 13:03:55 +0000 (13:03 +0000)]
Formatting and style changes; no functional changes intended.

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

10 years agoRemove empty directory left after r207995.
Alexander Kornienko [Wed, 14 May 2014 11:34:48 +0000 (11:34 +0000)]
Remove empty directory left after r207995.

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

10 years ago[OPENMP] Fix warning in Release builds.
Alexey Bataev [Wed, 14 May 2014 10:40:54 +0000 (10:40 +0000)]
[OPENMP] Fix warning in Release builds.

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

10 years agoclang-format: Add clang-format-diff usage examples for SVN.
Daniel Jasper [Wed, 14 May 2014 09:36:11 +0000 (09:36 +0000)]
clang-format: Add clang-format-diff usage examples for SVN.

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

10 years agoclang-format: Add option to allow short blocks on a single line.
Daniel Jasper [Wed, 14 May 2014 09:33:35 +0000 (09:33 +0000)]
clang-format: Add option to allow short blocks on a single line.

With AllowShortBlocksOnASingleLine, clang-format allows:
  if (a) { return; }

Based on patch by Gonzalo BG, thank you!

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

10 years ago[ARM64]Fix the bug right shift uint64_t by 64 generates incorrect result.
Hao Liu [Wed, 14 May 2014 08:59:30 +0000 (08:59 +0000)]
[ARM64]Fix the bug right shift uint64_t by 64 generates incorrect result.

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

10 years agoSema::FindAllocationFunctions(): Fix \param. [-Wdocumentation]
NAKAMURA Takumi [Wed, 14 May 2014 08:07:56 +0000 (08:07 +0000)]
Sema::FindAllocationFunctions(): Fix \param. [-Wdocumentation]

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

10 years agoCreate a redeclaration when an elaborated type specifier
John McCall [Wed, 14 May 2014 07:54:17 +0000 (07:54 +0000)]
Create a redeclaration when an elaborated type specifier
resolves to an existing declaration if there are attributes
present.

This gives us something to apply the attributes to.

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

10 years agoDebugInfo: Avoid creating DILexicalScopeFiles when the filename in the current scope...
David Blaikie [Wed, 14 May 2014 00:29:00 +0000 (00:29 +0000)]
DebugInfo: Avoid creating DILexicalScopeFiles when the filename in the current scope has not changed.

This looks like the right way for this check to work, but there is
another semi-obvious bug, I would think: why is CurLoc not zero'd out
between functions? The possibility for it to bleed between them seems
problematic. (& indeed I caused tests to fail when I fixed this a
different way, by setting CurLoc to SourceLocation() and the end of
EmitFunctionEnd... )

The changes to debug-info-blocks.m are due to a mismatch between the
source manager's file naming and CGDebugInfo's default handling when no
-main-file-name is specified. This actually reveals somewhat of a bug in
the debug info when using source files from standard in, too. See the
comment in CGDebugInfo::CreateCompileUnit for more details.

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

10 years agoPush record return type classification into CGCXXABI
Reid Kleckner [Tue, 13 May 2014 22:05:45 +0000 (22:05 +0000)]
Push record return type classification into CGCXXABI

In the Microsoft C++ ABI, instance methods always return records
indirectly via the second hidden parameter.  This was implemented in
X86_32ABIInfo, but not WinX86_64ABIInfo.

Rather than exposing a handful of boolean methods in the CGCXXABI
interface, we can expose a single method that applies C++ ABI return
value classification rules.

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

10 years agoMake this test target independent.
Eric Christopher [Tue, 13 May 2014 20:16:43 +0000 (20:16 +0000)]
Make this test target independent.

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

10 years agoPR19729: Delete a bunch of bogus code in Sema::FindAllocationOverload. This
Richard Smith [Tue, 13 May 2014 19:56:21 +0000 (19:56 +0000)]
PR19729: Delete a bunch of bogus code in Sema::FindAllocationOverload. This
caused us to perform copy-initialization for the parameters of an allocation
function called by a new-expression multiple times, resulting in us rejecting
allocations that passed non-copyable parameters (and much worse things in
MSVC compat mode, where we potentially called this function multiple times).

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

10 years agoAdd a requires for the arm-registered-target needed by this test as
Eric Christopher [Tue, 13 May 2014 19:52:18 +0000 (19:52 +0000)]
Add a requires for the arm-registered-target needed by this test as
well.

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

10 years agoAdd __ARM_DWARF_EH__ to signify the use of Itanium ABI for unwind
Joerg Sonnenberger [Tue, 13 May 2014 18:58:36 +0000 (18:58 +0000)]
Add __ARM_DWARF_EH__ to signify the use of Itanium ABI for unwind
instructions.

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

10 years agoTest preprocessor defines for NetBSD/ARM.
Joerg Sonnenberger [Tue, 13 May 2014 18:58:00 +0000 (18:58 +0000)]
Test preprocessor defines for NetBSD/ARM.

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

10 years agoUpdate for llvm API change.
Rafael Espindola [Tue, 13 May 2014 18:45:53 +0000 (18:45 +0000)]
Update for llvm API change.

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

10 years agoFix the AST printer for attributed statements so that it does not print duplicate...
Aaron Ballman [Tue, 13 May 2014 16:12:14 +0000 (16:12 +0000)]
Fix the AST printer for attributed statements so that it does not print duplicate attribute introducers. Eg) [[clang::fallthrough]] instead of  [[[[clang::fallthrough]]]]

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

10 years agoUpdated the test case to show that no diagnostics are expected, and not require emitt...
Aaron Ballman [Tue, 13 May 2014 15:14:59 +0000 (15:14 +0000)]
Updated the test case to show that no diagnostics are expected, and not require emitting the AST until after the AST printing for statement attributes is updated.

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

10 years agoNo longer triggering a checked iterator assert on Windows when using std::copy while...
Aaron Ballman [Tue, 13 May 2014 14:55:01 +0000 (14:55 +0000)]
No longer triggering a checked iterator assert on Windows when using std::copy while deserializing attributed statements with more than one attribute.

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

10 years agoDefine the InterlockedCompareExchange64 intrinsic on 32-bits too
Timur Iskhodzhanov [Tue, 13 May 2014 13:59:05 +0000 (13:59 +0000)]
Define the InterlockedCompareExchange64 intrinsic on 32-bits too

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

10 years agotry to make test/Driver/masm.c work with the hexagon bot
Nico Weber [Tue, 13 May 2014 11:30:01 +0000 (11:30 +0000)]
try to make test/Driver/masm.c work with the hexagon bot

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

10 years agoDrop AST's version of ARMCXXABI, it doesn't differ from the Itanium base
Joerg Sonnenberger [Tue, 13 May 2014 11:20:16 +0000 (11:20 +0000)]
Drop AST's version of ARMCXXABI, it doesn't differ from the Itanium base
class.

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

10 years agoSupport -masm= flag for x86 targets.
Nico Weber [Tue, 13 May 2014 11:11:24 +0000 (11:11 +0000)]
Support -masm= flag for x86 targets.

`clang -S -o - file.c -masm=att` will write assembly to stdout in at&t syntax
(the default), `-masm=intel` will instead output intel style asm.

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

10 years agoclang-format: Don't break in the middle of ">>".
Daniel Jasper [Tue, 13 May 2014 08:01:47 +0000 (08:01 +0000)]
clang-format: Don't break in the middle of ">>".

Before:
  zzzzzzzzzz = bbbbbbbbbbbbbbbbb >
               > aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaa);

After:
  zzzzzzzzzz
      = bbbbbbbbbbbbbbbbb
        >> aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaa);

This fixes llvm.org/PR19731.

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

10 years agoMS ABI: Tighten RTTI mangling
David Majnemer [Tue, 13 May 2014 06:57:43 +0000 (06:57 +0000)]
MS ABI: Tighten RTTI mangling

r208661 contained WIP code, commit the *actual* manglings.

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

10 years agoFixed a few tests and moved a comment to its proper place
Filipe Cabecinhas [Tue, 13 May 2014 05:21:11 +0000 (05:21 +0000)]
Fixed a few tests and moved a comment to its proper place

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

10 years agoPatched clang to emit x86 blends as shufflevectors.
Filipe Cabecinhas [Tue, 13 May 2014 02:37:02 +0000 (02:37 +0000)]
Patched clang to emit x86 blends as shufflevectors.

Summary:
Most of the clang header patch by Simon Pilgrim @ SCEE.
Also fixed (or added) clang tests for these intrinsics.

LLVM tests to make sure we get the blend instruction out of these
shufflevectors are at http://reviews.llvm.org/D3600

Reviewers: eli.friedman, craig.topper, rafael

Subscribers: cfe-commits

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

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